DMBlakeley / homebridge-awair2

Homebridge dynamic platform plugin for Awair air quality sensor.
Other
50 stars 3 forks source link

Awair Element is missing from Homebridge #429

Closed wernerik closed 1 year ago

wernerik commented 1 year ago

Describe Your Problem: My Awair Element has disappeared from HomeBridge. Not sure when this happened I have only noticed now, but possibly has been few weeks. I have reconfigured the plugin with a fresh token, have tried adding it as a child bridge with no success. I am getting this error: getUserInfo error: undefined. Thanks a lot for pointing me to the right direction! Logs:

[11/15/2022, 11:19:20 AM] [homebridge-awair2] Loaded homebridge-awair2 v5.9.10 child bridge successfully
[11/15/2022, 11:19:20 AM] Loaded 0 cached accessories from cachedAccessories.0E5EC181122F.
[11/15/2022, 11:19:20 AM] [homebridge-awair2] homebridge-awair2 platform didFinishLaunching
[11/15/2022, 11:19:20 AM] Homebridge v1.5.0 (HAP v0.10.2) (homebridge-awair2) is running on port 48139.
[11/15/2022, 11:19:20 AM] [homebridge-awair2] getUserInfo error: undefined
[11/15/2022, 11:19:20 AM] [homebridge-awair2] getAwairDevices error: undefined
[11/15/2022, 11:19:20 AM] [homebridge-awair2] --- Initializing IAQ data, Display mode and LED mode for Awair devices ---
[11/15/2022, 11:19:20 AM] [homebridge-awair2] --- Starting Air and Local data collection ---```

**Plugin Config:**

{ "token": "", "userType": "users/self", "airQualityMethod": "awair-aqi", "endpoint": "15-min-avg", "limit": 1, "enableTvocPm25": false, "occupancyDetection": false, "occupancyRestart": false, "logging": true, "verbose": true, "enableModes": false, "development": false, "_bridge": { "username": "0E:5E:C1:81:12:2F", "port": 48139 }, "platform": "Awair2" }


**Screenshots:**
<!-- If applicable, add screenshots to help explain your problem. -->

**Environment:**

* **homebridge-awair2 v5.9.10**:
* **Homebridge Version**: [v1.5.0]
* **Node.js Version**: [v16.16.0]
* **NPM Version**: don't know, unfo
* **Operating System**: Docker

<!-- Click the "Preview" tab before you submit to ensure the formatting is correct. -->
DMBlakeley commented 1 year ago

@wernerik,

Looks like your account is not being recognized on the Awair side. You stated that you "reconfigured the plugin with a fresh token". To my understanding the token does not change as the token is generated from the user ID associated with your Awair account. First check that the Awair Element is visible in the iOS app. You can obtain/verify your token directly from the iOS app by selecting 'Awair+' in the lower right hand corner, then select 'Awair APIs', select 'Cloud API' and finally 'Get API Token'.

I note that you are running Homebridge on Docker. I have Docker running on a Mac mini. Unfortunately homebridge-docker will not run on this platform. What do you have Docker running on? What other plugins do you have running on Homebridge Docker?

Please let me know if your Developer token is correct and additional information on your Docker configuration so that I can attempt to recreate.

DMBlakeley commented 1 year ago

@wernerik, following up to see if your issue has been resolved.

wernerik commented 1 year ago

Yes. I have finally gotten back to it. I have updated the Homebridge Docker container and everything started to work again. I've spotted more issues with Homebridge as well, so it was nothing in your Awair plugin.

I am still learning Docker, so I am reminded to first reinstall containers before anything else. Sorry to have taken your time, Thanks for your help!

DMBlakeley commented 1 year ago

Thanks for getting back to me and not problem contacting me initially. I like to make sure that the Awair plugin is working correctly for users.

Homebridge on Docker is tricky and will not work on Docker Desktop for Mac or Windows. This is because the Mac and Windows versions run inside of a virtual machine and as a result the Docker ports are not exposed correctly.

Just a heads up. I will be releasing v5.10.0 this week which removes support for Awair, Glow and Glow-C as these devices are being 'sunsetted' by Awair as of Nov 30th. This update should not impact you but if do have an issue please let me know.