Danielhiversen / home_assistant_airthings_cloud

Airthings cloud
Apache License 2.0
32 stars 6 forks source link

Multiple Devices - some do not show up #25

Open JGrantman opened 3 years ago

JGrantman commented 3 years ago

I have 7 Airthings devices (1x Wave, 2x Wave Plus, 3x Wave Mini and an Airthings Hub). All are connected to cloud and operating correctly. I have added the airthings_cloud integration over past few weeks (to multiple Home Assistant new installations). I have setup Home Assistant OS and Home Assistant supervised a couple different methods. Direct install on hardware, as Proxmox VM, Docker install on Debian Linux. The integration seems to work every time but only 2 or 3 of the 6 devices show up. What is really strange is that each time it is a different combination of devices that is pulled into Home Assistant. The first 2 devices I added in my account from an Airthings Home Kit (Wave & Wave Mini) always show up. Then a 3rd or 3rd and 4th -- sometimes 2 Wave Mini, sometimes 1 Wave Plus or Wave Mini.

I tried to determine if it was based on most recent update to cloud account or name or ID... but there does not seem to be any pattern. I also did not find any obvious errors via log that correspond to the missing devices.

I am going to pull everything from my account and try resetting up one at a time -- adding another device after confirming last device works and is showing up in Home Assistant.

I am reaching out just in case there is some inherent limitation on how many devices are read from cloud. I looked at the python code but I am far from a deep expert developer so nothing stood out as limiting what is pulled back from the cloud.

Any input is appreciated.

And thank you for your work on this integration. It seems strange how all other Airthings integration effort is so focused on Bluetooth. It kinda defeats the purpose of a hub or centralized server to run around your house placing extra systems just to have Bluetooth close enough to air monitoring devices to pick up data. Your cloud integration is ideal if you plan to have multiple Airthings devices on one account (assuming I can get all devices to pull back into Home Assistant). I would never have gotten this working on my own.

Regards

JGrantman commented 3 years ago

UPDATE!!!

I removed all devices from my account. Re-added all 6 devices and still could not get the data picked up by Home Assistant.

... THEN I decided to go put every device and every sensor value cards on dashboard. Your integration started picking up everything !!!!!!!!!!!

I saw lines in the python that made me think you call the dashboard and so I may not have had all the devices added to my dashboard before which would explain why I kept getting different devices but not everything. I had never gone and put every device on dashboard (previously).

So it looks like it works perfectly now - 3 Wave Mini's, 2 Wave Plus and a Wave - all connected to a hub, all added to cloud account & added to Airthings web dashboard.

Thanks again for your work.

Danielhiversen commented 3 years ago

Sorry for the late reply.

So it seems to be required that the sensors are added to the dashboard? There is no documentation for the cloud API, but I will see if find a way to solve this.

JGrantman commented 3 years ago

Not sure it is anything to solve... maybe just add to documentation. Since this a cloud integration it makes sense you would have to have the the cloud configured. If you know you have to put the cards on the dashboard then it solves the issue. When I get a chance I will remove the cards and see if it removes the entities in Home Assistant or if maybe once the connection is made it persists regardless of whether there are cards on the Airthings dashboard.

Thank you for creating this... I have several Airthings devices and it's a big help being able to use the data in Home Assistant as well as log the data via InfluxDB to use later for analysis.

JGrantman commented 3 years ago

Thanks again for all your work. Check Paypal.

JGrantman

urielz commented 3 years ago

... THEN I decided to go put every device and every sensor value cards on dashboard. Your integration started picking up everything !!!!!!!!!!!

Thanks for pointing this out! I spent a good chunk of time trying to figure what was wrong. Perhaps worth it to add this info to the readme?

Danielhiversen commented 3 years ago

The Airthings integration will be part of the Home Assistant 2021.10, then you do not need the custom integration anymore