DMBlakeley / homebridge-awair2

Homebridge dynamic platform plugin for Awair air quality sensor.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No data returning for four recognized devices

mmorper opened this issue · comments

Hey there. I just transitioned from the from original homebridge-awair plugin to this new one. I have removed the previous plugin and have confirmed the legacy plugin's params are no longer present in the config. After setting up this new plugin, I can see that my token is recognized and returning my four Awair devices, however no data from the devices is returning. Thanks in advance for the assistance.

Here is what the log looks like after initial reboot:

[11/27/2020, 09:00:56] [Awair2] getAwairDevices: number discovered: 4
[11/27/2020, 09:00:56] [Awair2] getAwairDevices: discovered device: [0] {"name":"1 Room","macAddress":"{{removed}}","latitude": {{removed}},"preference":"GENERAL","timezone":"America/Los_Angeles","roomType":"BEDROOM","deviceType":"awair-glow-c","longitude":{{removed}},"spaceType":"HOME","deviceUUID":"awair-glow-c_4781","deviceId":4781,"locationName":"{{removed}}"}
[11/27/2020, 09:00:56] [Awair2] getAwairDevices: discovered device: [1] {"name":"2 Room","macAddress":"{{removed}}","latitude":{{removed}},"preference":"GENERAL","timezone":"America/Los_Angeles","roomType":"LIVING_ROOM","deviceType":"awair-r2","longitude":{{removed}},"spaceType":"HOME","deviceUUID":"awair-r2_19667","deviceId":19667,"locationName":"{{removed}}"}
[11/27/2020, 09:00:56] [Awair2] getAwairDevices: discovered device: [2] {"name":"3 Room","macAddress":"{{removed}}","latitude":{{removed}},"preference":"GENERAL","timezone":"America/Los_Angeles","roomType":"BEDROOM","deviceType":"awair-glow-c","longitude":{{removed}},"spaceType":"HOME","deviceUUID":"awair-glow-c_4618","deviceId":4618,"locationName":"{{removed}}"}
[11/27/2020, 09:00:56] [Awair2] getAwairDevices: discovered device: [3] {"name":"4 Room","macAddress":"{{removed}}","latitude":{{removed}},"preference":"GENERAL","timezone":"America/Los_Angeles","roomType":"BEDROOM","deviceType":"awair-glow-c","longitude":{{removed}},"spaceType":"HOME","deviceUUID":"awair-glow-c_4547","deviceId":4547,"locationName":"{{removed}}"}
[11/27/2020, 09:00:56] [Awair2] Initializing platform accessory 1 Room...
[11/27/2020, 09:00:56] [Awair2] 1 Room exists, using data from cache
[11/27/2020, 09:00:56] [Awair2] Initializing platform accessory 2 Room...
[11/27/2020, 09:00:56] [Awair2] 2 Room exists, using data from cache
[11/27/2020, 09:00:56] [Awair2] Initializing platform accessory 3 Room...
[11/27/2020, 09:00:56] [Awair2] 3 Room exists, using data from cache
[11/27/2020, 09:00:56] [Awair2] Initializing platform accessory 4 Room...
[11/27/2020, 09:00:56] [Awair2] 4 Room exists, using data from cache
[11/27/2020, 09:00:56] [Awair2] [70886B1142BA] Getting API usage status...awair-glow-c_4781
[11/27/2020, 09:00:56] [Awair2] [70886B131D54] Getting API usage status...awair-r2_19667
[11/27/2020, 09:00:56] [Awair2] [70886B113F86] Getting API usage status...awair-glow-c_4618
[11/27/2020, 09:00:56] [Awair2] [70886B113931] Getting API usage status...awair-glow-c_4547
[11/27/2020, 09:00:56] [Awair2] [70886B1142BA] Getting initial status...awair-glow-c_4781
[11/27/2020, 09:00:56] [Awair2] [70886B131D54] Getting initial status...awair-r2_19667
[11/27/2020, 09:00:56] [Awair2] [70886B113F86] Getting initial status...awair-glow-c_4618
[11/27/2020, 09:00:56] [Awair2] [70886B113931] Getting initial status...awair-glow-c_4547
HAP Warning: Characteristic undefined not in required or optional characteristics for service 0000008A-0000-1000-8000-0026BB765291. Adding anyway.
[11/27/2020, 09:00:56] [Awair2] apiUsage for awair-glow-c_4781: {"usages":[{"scope":"FIFTEEN_MIN","usage":96}]}
[11/27/2020, 09:00:56] [Awair2] apiUsage for awair-glow-c_4547: {"usages":[{"scope":"FIFTEEN_MIN","usage":96}]}
[11/27/2020, 09:00:56] [Awair2] apiUsage for awair-glow-c_4618: {"usages":[{"scope":"FIFTEEN_MIN","usage":96}]}
[11/27/2020, 09:00:56] [Awair2] apiUsage for awair-r2_19667: {"usages":[{"scope":"FIFTEEN_MIN","usage":96}]}
[11/27/2020, 09:00:56] [Awair2] updateAirData error: Error: Request failed with status code 400
[11/27/2020, 09:00:56] [Awair2] updateAirData error: Error: Request failed with status code 400
[11/27/2020, 09:00:56] [Awair2] updateAirData error: Error: Request failed with status code 400
[11/27/2020, 09:00:56] [Awair2] updateAirData error: Error: Request failed with status code 400

And each subsequent 15 min interval returns this:

[11/27/2020, 09:15:56] [Awair2] [70886B1142BA] Updating status...awair-glow-c_4781
[11/27/2020, 09:15:56] [Awair2] [70886B131D54] Updating status...awair-r2_19667
[11/27/2020, 09:15:56] [Awair2] [70886B113F86] Updating status...awair-glow-c_4618
[11/27/2020, 09:15:56] [Awair2] [70886B113931] Updating status...awair-glow-c_4547
[11/27/2020, 09:15:56] [Awair2] updateAirData error: Error: Request failed with status code 400
[11/27/2020, 09:15:56] [Awair2] updateAirData error: Error: Request failed with status code 400
[11/27/2020, 09:15:56] [Awair2] updateAirData error: Error: Request failed with status code 400
[11/27/2020, 09:15:56] [Awair2] updateAirData error: Error: Request failed with status code 400

Here is my config:

        {
            "token": "{{removed}}",
            "airQualityMethod": "awair-aqi",
            "endpoint": "15-min-avg",
            "carbonDioxideThreshold": 1200,
            "carbonDioxideThresholdOff": 1000,
            "occupancyDetection": false,
            "occupancyRestart": false,
            "logging": true,
            "verbose": true,
            "development": false,
            "platform": "Awair2"
        }

Hi Mike,
Thanks for installing homebridge-awair2!

What does not look as expected is that on initial reboot awair2 is finding devices in the Homebridge accessory cache probably from the original homebridge-awair plugin. The HAP Warning is also not expected.

Could you try:

  • Assuming that you are using Config-UI-X for setting up Homebridge, can you go to the Homebridge settings and make sure "Keep accessories of uninstalled plugins" is not enabled.
  • Then, uninstall awair2, reboot Homebridge (which should clear cache of any old accessories), reinstall awair2 followed by a reboot and see if behavior is correct?

Thanks,
Doug

Thanks for the quick reply, Doug. I completed your two suggestions. Quick summary: I am still in the same state.

  1. "Keep accessories of uninstalled plugins"
    It was not enabled when I checked. For bonus points, I went to "Managed Cached Accessories" and saw that all four of my Awair devices were present (prior to uninstalling) and associated with Awair2 plugin. Not sure if that tells you anything or not, but I thought I'd share.

  2. Uninstall/Reinstall
    As requested, I uninstalled the Awair2 plugin (btw, I then confirmed that the devices were no longer present in "Managed Cached Accessories" afterward), rebooted. Next installed the plugin again, and configured.

Here are some additional environmental details:

OS: Raspbian GNU/Linux Buster (10)
NodeJS: v12.18.3
NPM: v6.14.8

I'm happy to continue troubleshooting. Let me know what you think...

Here's my log:

[11/27/2020, 11:11:42] [Awair2] getUserInfo error: Error: Request failed with status code 404
[11/27/2020, 11:11:42] [Awair2] getAwairDevices: number discovered: 4
[11/27/2020, 11:11:42] [Awair2] getAwairDevices: discovered device: [0] {"name":"1 Room","macAddress":"{{Removed}}","latitude":{{Removed}},"preference":"GENERAL","timezone":"America/Los_Angeles","roomType":"BEDROOM","deviceType":"awair-glow-c","longitude":{{Removed}},"spaceType":"HOME","deviceUUID":"awair-glow-c_4781","deviceId":4781,"locationName":"{{Removed}}"}
[11/27/2020, 11:11:42] [Awair2] getAwairDevices: discovered device: [1] {"name":"2 Room","macAddress":"{{Removed}}","latitude":{{Removed}},"preference":"GENERAL","timezone":"America/Los_Angeles","roomType":"LIVING_ROOM","deviceType":"awair-r2","longitude":{{Removed}},"spaceType":"HOME","deviceUUID":"awair-r2_19667","deviceId":19667,"locationName":"{{Removed}}"}
[11/27/2020, 11:11:42] [Awair2] getAwairDevices: discovered device: [2] {"name":"3 Room","macAddress":"{{Removed}}","latitude":{{Removed}},"preference":"GENERAL","timezone":"America/Los_Angeles","roomType":"BEDROOM","deviceType":"awair-glow-c","longitude":{{Removed}},"spaceType":"HOME","deviceUUID":"awair-glow-c_4618","deviceId":4618,"locationName":"{{Removed}}"}
[11/27/2020, 11:11:42] [Awair2] getAwairDevices: discovered device: [3] {"name":"4 Room","macAddress":"{{Removed}}","latitude":{{Removed}},"preference":"GENERAL","timezone":"America/Los_Angeles","roomType":"BEDROOM","deviceType":"awair-glow-c","longitude":{{Removed}},"spaceType":"HOME","deviceUUID":"awair-glow-c_4547","deviceId":4547,"locationName":"{{Removed}}"}
[11/27/2020, 11:11:42] [Awair2] Initializing platform accessory 1 Room...
[11/27/2020, 11:11:42] [Awair2] [70886B1142BA] addServices completed
[11/27/2020, 11:11:42] [Awair2] Initializing platform accessory 2 Room...
[11/27/2020, 11:11:42] [Awair2] [70886B131D54] addServices completed
[11/27/2020, 11:11:42] [Awair2] Initializing platform accessory 3 Room...
[11/27/2020, 11:11:42] [Awair2] [70886B113F86] addServices completed
[11/27/2020, 11:11:42] [Awair2] Initializing platform accessory 4 Room...
[11/27/2020, 11:11:42] [Awair2] [70886B113931] addServices completed
[11/27/2020, 11:11:42] [Awair2] [70886B1142BA] Getting API usage status...awair-glow-c_4781
[11/27/2020, 11:11:42] [Awair2] [70886B1142BA] Getting API usage status...awair-glow-c_4781
[11/27/2020, 11:11:42] [Awair2] [70886B131D54] Getting API usage status...awair-r2_19667
[11/27/2020, 11:11:42] [Awair2] [70886B131D54] Getting API usage status...awair-r2_19667
[11/27/2020, 11:11:42] [Awair2] [70886B113F86] Getting API usage status...awair-glow-c_4618
[11/27/2020, 11:11:42] [Awair2] [70886B113F86] Getting API usage status...awair-glow-c_4618
[11/27/2020, 11:11:42] [Awair2] [70886B113931] Getting API usage status...awair-glow-c_4547
[11/27/2020, 11:11:42] [Awair2] [70886B113931] Getting API usage status...awair-glow-c_4547
[11/27/2020, 11:11:42] [Awair2] [70886B1142BA] Getting initial status...awair-glow-c_4781
[11/27/2020, 11:11:42] [Awair2] [70886B1142BA] Getting initial status...awair-glow-c_4781
[11/27/2020, 11:11:42] [Awair2] [70886B131D54] Getting initial status...awair-r2_19667
[11/27/2020, 11:11:42] [Awair2] [70886B131D54] Getting initial status...awair-r2_19667
[11/27/2020, 11:11:42] [Awair2] [70886B113F86] Getting initial status...awair-glow-c_4618
[11/27/2020, 11:11:42] [Awair2] [70886B113F86] Getting initial status...awair-glow-c_4618
[11/27/2020, 11:11:42] [Awair2] [70886B113931] Getting initial status...awair-glow-c_4547
[11/27/2020, 11:11:42] [Awair2] [70886B113931] Getting initial status...awair-glow-c_4547
HAP Warning: Characteristic undefined not in required or optional characteristics for service 0000008A-0000-1000-8000-0026BB765291. Adding anyway.
[11/27/2020, 11:11:42] [Awair2] apiUsage for awair-glow-c_4618: {"usages":[{"scope":"FIFTEEN_MIN","usage":87}]}
[11/27/2020, 11:11:42] [Awair2] apiUsage for awair-glow-c_4781: {"usages":[{"scope":"FIFTEEN_MIN","usage":87}]}
[11/27/2020, 11:11:42] [Awair2] updateAirData error: Error: Request failed with status code 400
[11/27/2020, 11:11:42] [Awair2] apiUsage for awair-r2_19667: {"usages":[{"scope":"FIFTEEN_MIN","usage":87}]}
[11/27/2020, 11:11:42] [Awair2] apiUsage for awair-glow-c_4781: {"usages":[{"scope":"FIFTEEN_MIN","usage":87}]}
[11/27/2020, 11:11:42] [Awair2] updateAirData error: Error: Request failed with status code 400
[11/27/2020, 11:11:42] [Awair2] updateAirData error: Error: Request failed with status code 400
[11/27/2020, 11:11:42] [Awair2] updateAirData error: Error: Request failed with status code 400
[11/27/2020, 11:11:42] [Awair2] apiUsage for awair-glow-c_4618: {"usages":[{"scope":"FIFTEEN_MIN","usage":87}]}
[11/27/2020, 11:11:42] [Awair2] updateAirData error: Error: Request failed with status code 400
[11/27/2020, 11:11:42] [Awair2] updateAirData error: Error: Request failed with status code 400
[11/27/2020, 11:11:42] [Awair2] apiUsage for awair-glow-c_4547: {"usages":[{"scope":"FIFTEEN_MIN","usage":87}]}
[11/27/2020, 11:11:42] [Awair2] updateAirData error: Error: Request failed with status code 400
[11/27/2020, 11:11:42] [Awair2] updateAirData error: Error: Request failed with status code 400
[11/27/2020, 11:11:42] [Awair2] apiUsage for awair-r2_19667: {"usages":[{"scope":"FIFTEEN_MIN","usage":87}]}
[11/27/2020, 11:11:42] [Awair2] apiUsage for awair-glow-c_4547: {"usages":[{"scope":"FIFTEEN_MIN","usage":87}]}

Actually some progress has been made as now you are getting message "Initializing platform accessory" rather than "recovering from cache". So, for those migrating uninstall homebridge-awair, reboot, install homebridge-awair2 is the right order.

I am running Homebridge on a Mac mini with node 14.15.1 and npm v6.14.8 but do not think the node difference is the problem but I am certainly not a node expert.

Can you try rolling back a version to 5.5.8? You can do directly from the config-ui-x plugin page by selecting the circular back arrow. Accessory cache between the 2 versions should not be an issue. After rolling back you will need to reboot Homebridge.

Main change from 5.5.8 to 5.5.9 was replacement of 'request-promise' with 'axios' for HTTP calls. May have gotten something wrong in the implementation. Do note that errors could be handled better.

Thanks for your support!

Getting closer, perhaps ;)

That 404 upfront is interesting.

[11/27/2020, 12:43:30] [Awair2] getUserInfo error: StatusCodeError: 404 - "The requested resource could not be found."
[11/27/2020, 12:43:30] [Awair2] getAwairDevices: number discovered: 4
[11/27/2020, 12:43:30] [Awair2] getAwairDevices: discovered device: [0] {"name":"1 Room","macAddress":"{{Removed}}","latitude":{{Removed}},"preference":"GENERAL","timezone":"America/Los_Angeles","roomType":"BEDROOM","deviceType":"awair-glow-c","longitude":{{Removed}},"spaceType":"HOME","deviceUUID":"awair-glow-c_4781","deviceId":4781,"locationName":"{{Removed}}"}
[11/27/2020, 12:43:30] [Awair2] getAwairDevices: discovered device: [1] {"name":"2 Room","macAddress":"{{Removed}}","latitude":{{Removed}},"preference":"GENERAL","timezone":"America/Los_Angeles","roomType":"LIVING_ROOM","deviceType":"awair-r2","longitude":{{Removed}},"spaceType":"HOME","deviceUUID":"awair-r2_19667","deviceId":19667,"locationName":"Los Alamitos, CA"}
[11/27/2020, 12:43:30] [Awair2] getAwairDevices: discovered device: [2] {"name":"3 Room","macAddress":"{{Removed}}","latitude":{{Removed}},"preference":"GENERAL","timezone":"America/Los_Angeles","roomType":"BEDROOM","deviceType":"awair-glow-c","longitude":{{Removed}},"spaceType":"HOME","deviceUUID":"awair-glow-c_4618","deviceId":4618,"locationName":"{{Removed}}"}
[11/27/2020, 12:43:30] [Awair2] getAwairDevices: discovered device: [3] {"name":"4 Room","macAddress":"{{Removed}}","latitude":{{Removed}},"preference":"GENERAL","timezone":"America/Los_Angeles","roomType":"BEDROOM","deviceType":"awair-glow-c","longitude":{{Removed}},"spaceType":"HOME","deviceUUID":"awair-glow-c_4547","deviceId":4547,"locationName":"{{Removed}}"}
[11/27/2020, 12:43:30] [Awair2] Initializing platform accessory 1 Room...
[11/27/2020, 12:43:30] [Awair2] Alex Bedroom exists, using data from cache
[11/27/2020, 12:43:30] [Awair2] Initializing platform accessory Family Room...
[11/27/2020, 12:43:30] [Awair2] 2 Room exists, using data from cache
[11/27/2020, 12:43:30] [Awair2] Initializing platform accessory 3 Room...
[11/27/2020, 12:43:30] [Awair2] Master Bedroom exists, using data from cache
[11/27/2020, 12:43:30] [Awair2] Initializing platform accessory 4 Room...
[11/27/2020, 12:43:30] [Awair2] Nick Bedroom exists, using data from cache
[11/27/2020, 12:43:30] [Awair2] [70886B1142BA] Getting API usage status...awair-glow-c_4781
[11/27/2020, 12:43:30] [Awair2] [70886B131D54] Getting API usage status...awair-r2_19667
[11/27/2020, 12:43:30] [Awair2] [70886B113F86] Getting API usage status...awair-glow-c_4618
[11/27/2020, 12:43:30] [Awair2] [70886B113931] Getting API usage status...awair-glow-c_4547
[11/27/2020, 12:43:30] [Awair2] [70886B1142BA] Getting initial status...awair-glow-c_4781
[11/27/2020, 12:43:30] [Awair2] [70886B131D54] Getting initial status...awair-r2_19667
[11/27/2020, 12:43:30] [Awair2] [70886B113F86] Getting initial status...awair-glow-c_4618
[11/27/2020, 12:43:30] [Awair2] [70886B113931] Getting initial status...awair-glow-c_4547
HAP Warning: Characteristic undefined not in required or optional characteristics for service 0000008A-0000-1000-8000-0026BB765291. Adding anyway.
[11/27/2020, 12:43:30] [Awair2] apiUsage for awair-glow-c_4618: {"usages":[{"scope":"FIFTEEN_MIN","usage":81}]}
[11/27/2020, 12:43:30] [Awair2] apiUsage for awair-r2_19667: {"usages":[{"scope":"FIFTEEN_MIN","usage":81}]}
[11/27/2020, 12:43:30] [Awair2] apiUsage for awair-glow-c_4781: {"usages":[{"scope":"FIFTEEN_MIN","usage":81}]}
[11/27/2020, 12:43:30] [Awair2] updateAirData error: StatusCodeError: 400 - "The query parameter 'limit' was malformed:\n'undefined' is not a valid 32-bit signed integer value"
[11/27/2020, 12:43:30] [Awair2] apiUsage for awair-glow-c_4547: {"usages":[{"scope":"FIFTEEN_MIN","usage":81}]}
[11/27/2020, 12:43:30] [Awair2] updateAirData error: StatusCodeError: 400 - "The query parameter 'limit' was malformed:\n'undefined' is not a valid 32-bit signed integer value"
[11/27/2020, 12:43:30] [Awair2] updateAirData error: StatusCodeError: 400 - "The query parameter 'limit' was malformed:\n'undefined' is not a valid 32-bit signed integer value"
[11/27/2020, 12:43:30] [Awair2] updateAirData error: StatusCodeError: 400 - "The query parameter 'limit' was malformed:\n'undefined' is not a valid 32-bit signed integer value"

Yes, 404 is upfront is interesting ...

I believe I see this problem. Can you either:

  • edit the config.json file and add "userType": "users/self", after the token entry, or
  • go to the homebridge-awair2 configuration menu and type "users/self" in the entry.

There is definitely an error in the code that is present in 5.5.9, 5.5.8 and probably prior that I did not catch as my config.json file had this entry.

Progress!

The users/type was the 404, good eye. And sorry for not noticing that before. I saw the string pre-populated in the field so I didn't bother to look at it too closely (I assumed it was a default value and left it alone). I should have paid more attention. Just a thought, is it possible for you to put any field validation in to ensure chuckleheads like me actually put a value in there or maybe not put any helper text in the field, therefore forcing peeps like me to do something about it?

That said, it still looks like there is one additional item complaining. Note this line. It is a consistent error for each device (that's good, at least):

[11/27/2020, 14:29:36] [Awair2] updateAirData error: StatusCodeError: 400 - "The query parameter 'limit' was malformed:\n'undefined' is not a valid 32-bit signed integer value"

Here's the balance of the log:

[11/27/2020, 14:29:35] [Awair2] userInfo: {"usages":[{"scope":"API_USAGE","usage":28},{"scope":"USER_DEVICE_LIST","usage":5},{"scope":"USER_INFO","usage":1}],"tier":"Hobbyist","email":"{{removed}}","permissions":[{"scope":"FIFTEEN_MIN","quota":100},{"scope":"FIVE_MIN","quota":300},{"scope":"RAW","quota":500},{"scope":"LATEST","quota":300},{"scope":"PUT_PREFERENCE","quota":300},{"scope":"PUT_DISPLAY_MODE","quota":300},{"scope":"PUT_LED_MODE","quota":300},{"scope":"PUT_KNOCKING_MODE","quota":300},{"scope":"PUT_TIMEZONE","quota":300},{"scope":"PUT_DEVICE_NAME","quota":300},{"scope":"PUT_LOCATION","quota":300},{"scope":"PUT_ROOM_TYPE","quota":300},{"scope":"PUT_SPACE_TYPE","quota":300},{"scope":"GET_DISPLAY_MODE","quota":300},{"scope":"GET_LED_MODE","quota":300},{"scope":"USER_DEVICE_LIST","quota":2147483647},{"scope":"USER_INFO","quota":2147483647},{"scope":"GET_KNOCKING_MODE","quota":300},{"scope":"GET_POWER_STATUS","quota":300},{"scope":"GET_TIMEZONE","quota":300}],"{{Removed}}":"MALE","lastName":"{{Removed}}","firstName":"{{Removed}}","id":"{{Removed}}"}
[11/27/2020, 14:29:36] [Awair2] getAwairDevices: number discovered: 4
[11/27/2020, 14:29:36] [Awair2] getAwairDevices: discovered device: [0] {"name":"1 Room","macAddress":"{{removed}}","latitude":{{removed}},"preference":"GENERAL","timezone":"America/Los_Angeles","roomType":"BEDROOM","deviceType":"awair-glow-c","longitude":{{removed}},"spaceType":"HOME","deviceUUID":"awair-glow-c_4781","deviceId":4781,"locationName":"{{removed}}"}
[11/27/2020, 14:29:36] [Awair2] getAwairDevices: discovered device: [1] {"name":"2 Room","macAddress":"{{removed}}","latitude":{{removed}},"preference":"GENERAL","timezone":"America/Los_Angeles","roomType":"LIVING_ROOM","deviceType":"awair-r2","longitude":{{removed}},"spaceType":"HOME","deviceUUID":"awair-r2_19667","deviceId":19667,"locationName":"{{removed}}"}
[11/27/2020, 14:29:36] [Awair2] getAwairDevices: discovered device: [2] {"name":"3 Room","macAddress":"{{removed}}","latitude":{{removed}},"preference":"GENERAL","timezone":"America/Los_Angeles","roomType":"BEDROOM","deviceType":"awair-glow-c","longitude":{{removed}},"spaceType":"HOME","deviceUUID":"awair-glow-c_4618","deviceId":4618,"locationName":"{{removed}}"}
[11/27/2020, 14:29:36] [Awair2] getAwairDevices: discovered device: [3] {"name":"4 Room","macAddress":"{{removed}}","latitude":{{Removed}}"preference":"GENERAL","timezone":"America/Los_Angeles","roomType":"BEDROOM","deviceType":"awair-glow-c","longitude":{{removed}},"spaceType":"HOME","deviceUUID":"awair-glow-c_4547","deviceId":4547,"locationName":"{{removed}}"}
[11/27/2020, 14:29:36] [Awair2] Initializing platform accessory 1 Room...
[11/27/2020, 14:29:36] [Awair2] 1 Room exists, using data from cache
[11/27/2020, 14:29:36] [Awair2] Initializing platform accessory 2 Room...
[11/27/2020, 14:29:36] [Awair2] 2 Room exists, using data from cache
[11/27/2020, 14:29:36] [Awair2] Initializing platform accessory 3 Room...
[11/27/2020, 14:29:36] [Awair2] 3 Room exists, using data from cache
[11/27/2020, 14:29:36] [Awair2] Initializing platform accessory 4 Room...
[11/27/2020, 14:29:36] [Awair2] 4 Room exists, using data from cache
[11/27/2020, 14:29:36] [Awair2] [70886B1142BA] Getting API usage status...awair-glow-c_4781
[11/27/2020, 14:29:36] [Awair2] [70886B131D54] Getting API usage status...awair-r2_19667
[11/27/2020, 14:29:36] [Awair2] [70886B113F86] Getting API usage status...awair-glow-c_4618
[11/27/2020, 14:29:36] [Awair2] [70886B113931] Getting API usage status...awair-glow-c_4547
[11/27/2020, 14:29:36] [Awair2] [70886B1142BA] Getting initial status...awair-glow-c_4781
[11/27/2020, 14:29:36] [Awair2] [70886B131D54] Getting initial status...awair-r2_19667
[11/27/2020, 14:29:36] [Awair2] [70886B113F86] Getting initial status...awair-glow-c_4618
[11/27/2020, 14:29:36] [Awair2] [70886B113931] Getting initial status...awair-glow-c_4547
HAP Warning: Characteristic undefined not in required or optional characteristics for service 0000008A-0000-1000-8000-0026BB765291. Adding anyway.
[11/27/2020, 14:29:36] [Awair2] apiUsage for awair-glow-c_4781: {"usages":[{"scope":"FIFTEEN_MIN","usage":74}]}
[11/27/2020, 14:29:36] [Awair2] updateAirData error: StatusCodeError: 400 - "The query parameter 'limit' was malformed:\n'undefined' is not a valid 32-bit signed integer value"
[11/27/2020, 14:29:36] [Awair2] apiUsage for awair-r2_19667: {"usages":[{"scope":"FIFTEEN_MIN","usage":74}]}
[11/27/2020, 14:29:36] [Awair2] updateAirData error: StatusCodeError: 400 - "The query parameter 'limit' was malformed:\n'undefined' is not a valid 32-bit signed integer value"
[11/27/2020, 14:29:36] [Awair2] apiUsage for awair-glow-c_4618: {"usages":[{"scope":"FIFTEEN_MIN","usage":74}]}
[11/27/2020, 14:29:36] [Awair2] apiUsage for awair-glow-c_4547: {"usages":[{"scope":"FIFTEEN_MIN","usage":74}]}
[11/27/2020, 14:29:36] [Awair2] updateAirData error: StatusCodeError: 400 - "The query parameter 'limit' was malformed:\n'undefined' is not a valid 32-bit signed integer value"
[11/27/2020, 14:29:36] [Awair2] updateAirData error: StatusCodeError: 400 - "The query parameter 'limit' was malformed:\n'undefined' is not a valid 32-bit signed integer value"

Are you on 5.5.8 or 5.5.9?

5.5.8

There are defaults in the code if there is no entry in the Awair2 Config menu. In the Config menu the light gray entries are "placeholder". Would not normally be a problem if I had the code working correctly.

The "StatusCodeError: 400" is a result of another Config entry mishandling. If you enter "1" in the "Data Points Returned" field this one should be addressed.

Still looking at the "HAP Warning". The characteristic for "service 0000008A-0000-1000-8000-0026BB765291" is a temperature sensor. You have 3 Glow-C units which is a different configuration than I have.

I just updated the "1" value and now I am getting back data for my four sensors. Happy day ;)

Now that I have data coming back... I am seeing my "next item" for you... all four sensors have data coming back into a single Home tile. See: https://cln.sh/CNgwZv ...it would be awesome to have each sensor's data confined to its own title. Let me know if you want me to create another ticket for that feature request. No good deed goes unpunished :)

Glad you now have data coming back! I am working on an update but found that I have a bit of work to fully sort this out.

The screen shot that you attached is how iOS14 now works. Your thermostat and Awair devices are in the "climate" category. When you click on this icon on the main "Home" page you get all of the sensors in this category. If you select "Rooms" at the bottom of the screen and then select a Room you will see the respective Awair in that Room. I am working on the Wiki to explain this a bit better.

Thanks for your patience in helping me sort this out! I should be posting 5.5.10 in the next day or so which should have the full fix. Please don't hesitate to let me know any other issues or suggestions that you may have.

Happy to help. Ping when you want me to test anything. And thanks for the “climate” tip... I wasn’t aware of that.

A little further explanation ...
From the HomeKit perspective an Awair device appears as multiple services - air quality, temperature, humidity and CO2 (not on Glow-C). This is why the separate tiles for a single Awair device.

I have now published v5.5.10 which addresses the issues which you found if you want to give it a go.

I just upgraded from v5.5.8 to .10. All went perfect. I also gave your README a review. Reads great. Thanks for all your help! Feel free to ping me if you ever need someone to help you test future releases.

Glad v.5.5.10 works for you! I well may be pinging you in the future knowing that you have multiple Awair devices. Thanks for your patience.

Closing this issue.