DMBlakeley / homebridge-awair2

Homebridge dynamic platform plugin for Awair air quality sensor.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Awair2 plugin is not updating the homebridge values

dcosson opened this issue · comments

Describe The Bug:

I have an Awair Element and have the homebridge plugin hooked up to my account. I turned on the verbose logging in homekit so I can see the API responses from Awair and that part is working fine. In the response for my device it returned temp: 25.137

But the homebridge accessories tab, this device is showing up as current temperature 21.7. That's the same value I see within the Home app, and it has been stuck on this temp for at least a few days (maybe it's been stuck weeks or months, I don't remember looking at it recently and I first connected the Awair plugin maybe 9 months ago)

I tried restarting homebridge but the value still isn't updating.

To Reproduce:
Connect Awair integration

Wait until the awair plugin makes another API call and the temperature has changed

see in the homebridge accessories tab that temperature is not updating.

Expected behavior:
The accessory temperature should update to the value from the latest Awair API call.

Logs:

[27/10/2022, 23:33:48] [Awair2] [XXX] updateAirQualityData: [{"timestamp":"2022-10-27T22:30:00.000Z","score":89.77272727272727,"sensors":[{"comp":"voc","value":290.3636363636364},{"comp":"co2","value":922.9090909090909},{"comp":"pm25","value":5.409090909090909},{"comp":"temp","value":25.137727217240766},{"comp":"humid","value":44.4118182442405}],"indices":[{"comp":"co2","value":1.5},{"comp":"temp","value":0},{"comp":"humid","value":0},{"comp":"pm25","value":0},{"comp":"voc","value":0.3181818181818182}]}]

Plugin Config:

 {
           "token": "xxx",
            "userType": "users/self",
            "airQualityMethod": "awair-pm",
            "endpoint": "15-min-avg",
            "limit": 1,
            "carbonDioxideThreshold": 2000,
            "carbonDioxideThresholdOff": 1200,
            "enableTvocPm25": false,
            "occupancyDetection": false,
            "occupancyOffset": 2,
            "occupancyRestart": false,
            "logging": true,
            "verbose": true,
            "enableModes": false,
            "development": false,
            "platform": "Awair2"
}

Environment:

  • Plugin Version: homebridge-awair2 v5.9.10
  • Homebridge Version: 1.5.1
  • Node.js Version: 16.17.1
  • NPM Version:
  • Operating System: Raspbian 10 (buster)

Hi Danny,

Sorry to hear that you are experiencing this issue and thanks for reaching out! I used your configuration values on my setup and do not see the problem.

As a first step to make sure that you do not have any homebridge cache issues, can I ask you to go "Homebridge Settings", then "Remove Single Cached Accessory", then select the garbage can next to "Awair Element" which will remove the device. Then restart Homebridge which will re-initialize the device. The only downside will be the Awair Element will appear in your default HomeKit room which can be corrected in HomeKit.

A couple other comments unrelated to the problem you reported:

  • Your high/low for CO2 is quite high. Suggest changing to the default 1000/800 values.
  • You are using the awair-pm AirQuality Method. This is intended if you want to control an air purifier based on particulate matter. If this is not the case I suggest changing to awair-score which is the value that is displayed on the Awair Element display.

Let me know either way.
Regards,
Doug

Ah ok I guess it was some issue in homebridge then and not your plugin, sorry. That worked after deleting the cache, I didn't realize there was an easy way to do that. Thanks for the help