home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.46k stars 29.39k forks source link

Readings become unavailable all the time (and then come back). #109499

Closed galmok closed 3 months ago

galmok commented 6 months ago

The problem

The logged readings are not continuous. This means the devices keep becoming unavailable and then come back. Can we please have an option that prevents logging when the device is unavailable? That would save spare and be more useful.

What version of Home Assistant Core has the issue?

core-2024.1.6

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Airthings BLE

Link to integration documentation on our website

https://www.home-assistant.io/integrations/airthings_ble/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 6 months ago

Hey there @vincegio, @lastrada, mind taking a look at this issue as it has been labeled with an integration (airthings_ble) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `airthings_ble` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign airthings_ble` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


airthings_ble documentation airthings_ble source (message by IssueLinks)

v1kke commented 6 months ago

I have this same issue. From beginning of February or so the integration started to be very unreliable and the sensor values update only by soft booting or sometimes not even then, and sometimes recovering randomly for a moment.

Core 2024.1.6 Supervisor 2023.12.1 Operating System 11.4 Frontend 20240104.0

v1kke commented 6 months ago

Here is some sample data showing how the data is breaking. It was alright until end of Jan, but then it started this glitching. image

galmok commented 6 months ago

Here is some sample data showing how the data is breaking. It was alright until end of Jan, but then it started this glitching. image

The intermittent logging to the right is what I see. I don't get the long pauses, though.

To me it seems that the integration logs failed readings, which don't really makes sense to me.

v1kke commented 6 months ago

Here is some sample data showing how the data is breaking. It was alright until end of Jan, but then it started this glitching. image

The intermittent logging to the right is what I see. I don't get the long pauses, though.

To me it seems that the integration logs failed readings, which don't really makes sense to me.

Correct, the long pauses are not really relevant in this scope. The long pauses are caused by my attempts to reboot and solve the issue, but I had hard time to get the integration to provide any data for a while. Anyway the relevant samples are the beginning where the integration operated normally and the later part which is clearly very fragmented.

estofira commented 6 months ago

After updating to 2024.1.6 i'v got the same behaviour. Arting is randomly (not)available.

nrm94ee330 commented 6 months ago

same for me as well. keep going unavailable way too many times.. I have three airthings wave plus.. and each of them goes of randomly unavailable...

sdaltons1 commented 6 months ago

Same issue here. I was really starting to worry about my setup haha.

cturra commented 6 months ago

i have been observing the same, running:

here you can see how frequent my drops are over the past 24 hours...

Screenshot 2024-02-07 at 11 48 33

i reviewed the home-assistant.log, but nothing jumps out to me here. no exceptions are logged that i can see.

Legrand5382 commented 6 months ago

Same for me here, keep dropping and sometime it come back for 30min or so then drop again, reboot will bring it back for a short time.

AntoninSlovacek commented 6 months ago

The same issue here. But noticed it some time ago already. Now running latest versions. By any chance, can this be somehow effected by other integrations? Matter? Zigbee? OR: update on AirThings side?

estofira commented 6 months ago

Everything is possible, but probably all of us started to have these problems after installing 2024.1.6, which had and airthing-ble update in it...

nrm94ee330 commented 6 months ago

I ended up creating an automation that reloads the integration every 5 minutes..!! ( with condition if reading is unavailable)I would definitely like to avoid this unnecessary burden on my HA and Air things WaveBut so far it is good.. pretty much no missed valuesOn Feb 8, 2024, at 8:07 AM, Erik Stofira @.***> wrote: Everything is possible, but probably all of us started to have these problems after installing 2024.1.6, which had and airthing-ble update in it...

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

jac2424 commented 6 months ago

Have been having same issue for couple of weeks now as well. Entities go unavailable and back multiple times a day.

def1149 commented 6 months ago

Now all my Wave+ data entries have gone unavailable. I hadn't done anything. The Aithing Wave+ is a nice device but the BT integration has been problematic for months ... complete garbage

SuppleCowChunks commented 6 months ago

This has been getting worse. After the first issue in 2024.1.6 I downgraded back to 2024.1.4 and it was all good. When a new core update shows up I give it a try and if it still doesn't work I go back to 2024.1.4. However, now 2024.1.4 no longer works. The device goes to unavailable and occasionally the integration has issues initializing and will fail.

Core - 2024.1.4 Supervisor - 2024.01.1 Operating System - 11.5 Frontend - 20240104.0

mwaterbu commented 6 months ago

About every 15 minutes, my Wave+ disconnects for ~5 minutes. This is highly annoying, and breaks some automations that use the unavailable state (ex. to detect a dead battery).

roblamoreaux commented 6 months ago

It seems to me that the Airthings device updates less frequently than the timeout that makes the entity be marked as unknown. It would be nice if this timeout could be set longer for the Airthings Integration.

Matss0n commented 6 months ago

image

Same thing happened for me with 2024.1.6 update. No need to reload but sensor becomes "unavailable" frequently

cturra commented 6 months ago

following up that i am seeing the same unavailable behaviour described in my last comment after upgrading core to 2024.2.1 from 2024.1.6.

staleand commented 5 months ago

Have this exact issue as well.

AntoninSlovacek commented 5 months ago

I updated everything I could. Not only restarted HA, but power cycled my HA device. Took fresh batteries for the Airthings Wave+, placed it just next to each other. And it works just fine now!

peregrines2 commented 5 months ago

I tried the same. Brand new batteries & power cycling ... problem still persists with dropouts multiple times per hour :(

jac2424 commented 5 months ago

I updated everything I could. Not only restarted HA, but power cycled my HA device. Took fresh batteries for the Airthings Wave+, placed it just next to each other. And it works just fine now!

I did the same but still have issues. The frequency of the drops seem to have reduced a bit with recent home assistant release but still happens.

AntoninSlovacek commented 5 months ago

Update on SW on the AirThings Wave side? Distance reduction? Just thinking out loud....

jac2424 commented 5 months ago

Update on SW on the AirThings Wave side? Distance reduction? Just thinking out loud....

No changes other than newer version of home assistant, not sure if any auto firmware updates happened in the background on the Airthings.

LaStrada commented 5 months ago

Update on SW on the AirThings Wave side? Distance reduction? Just thinking out loud....

No changes other than newer version of home assistant, not sure if any auto firmware updates happened in the background on the Airthings.

For BLE connected devices you will see a message in the Airthings app you need to click on. No messages in the app = newest version.

def1149 commented 5 months ago

What? New version of what?

jac2424 commented 5 months ago

What? New version of what?

https://www.home-assistant.io/blog/2024/02/07/release-20242/

LaStrada commented 5 months ago

What? New version of what?

I answered on firmware updates ("Update on SW on the AirThings Wave side?" / "not sure if any auto firmware updates happened in the background on the Airthings."). Here you can find latest FW version for Wave Radon/Plus/Mini: https://help.airthings.com/en/articles/6951942-firmware-release-notes

You can compare it with what's listed in Home Assistant.

There hasn't been any FW for a while, so this has nothing to do with this topic, except maybe if you bought it years ago and never connected it to the Airthings app to update it.

def1149 commented 5 months ago

Explain this firmware "information": HA Integration: Firmware: G-BLE-2.2.0-master+0 My Device: BLE: 2.2.0 MSP:2.2.2 SUB:2.2.0 From your link current firmware: Wave Plus and Wave Radon- G-2.3.0

I checked for updates in the app and was informed my device is up to date

It looks like my device is 2.2.0 and the current is 2.3.0 but I can't update My device was purchased about a year ago What's the actual current firmware version for Airthings Wave Plus? Why are there discrepancies/variations in firmware identification?

cturra commented 5 months ago

stopping by to chime in on the device firmware comment. in my case, i have a wave+ which is on BLE: 2.2.0 / MSP: 2.2.0 / SUB1: 2.2.0 for months before these connection issues showed up. like @def1149, no option to upgrade is available on my device through the Airthings Wave app.

my home assistant environment is also on current stable, as you can see in my comment above.

LaStrada commented 5 months ago

That's a good point. Internally we use "bundle version", because it contains FW for multiple chips inside the device. I can see that 2.3.x contains FW 2.2.x for the BLE/MSP/SUB chips. So your device is up to date.

Will double check this and see if the integration should fetch the FW bundle version instead of the current solution.

sdaltons1 commented 5 months ago

Think it might be time for me to plug the hub back in and switch to the cloud connection until this can be fixed.

rsiv commented 5 months ago

After experiencing frequent disconnects with my Wave+ for a couple of weeks, I disabled the Bluetooth interface in Home Assistant and switched to a Bluetooth proxy on an ESP32. It has been rock solid since then.

MrNiero commented 5 months ago

I've got the exact same problem. The workaround that I've implemented was: On NodeRed I created a 5 min timer that checks one of the AirThings BLE entities (Illuminance in this case) and if it's "unavailable", it restarts the Bluetooth integration and then the Airthings BLE. Works "ok" I would say,...

image

jac2424 commented 5 months ago

Received an Home Assistant OS and Core update yesterday and the issue seems to have gotten slightly worse again (similar to frequency of drops from few weeks ago where integration showed in unavailable hourly). Up till yesterday’s update, the frequency of unavailability had dropped off to only few times a day.

estofira commented 5 months ago

For now it is cca permanently unavailable, and only after reboot working for a few minutes

AllenBurgett commented 5 months ago

After experiencing frequent disconnects with my Wave+ for a couple of weeks, I disabled the Bluetooth interface in Home Assistant and switched to a Bluetooth proxy on an ESP32. It has been rock solid since then.

@rsiv, mind walking through what you did for this exactly? I'm using Bluetooth Proxy, but my connectivity is still horrid (9/13 of my devices are randomly unavailable). I haven't done anything to disable my Bluetooth interface and I'm starting question whether my Bluetooth Proxy is actually doing anything.

Would be great to hear exactly what you did 🙂

Legrand5382 commented 5 months ago

I also now use esp32 proxy and the connection stay connect much longer but still disconnect and reconnect every 1-2 hours.

rsiv commented 5 months ago

@AllenBurgett I configured an esp32 with:

bluetooth_proxy:
  active: true

Then I disabled the bluetooth adapter in Settings > Integrations > Bluetooth > Integration Entries > Disable. I have a Wave+ and about 10 Govee thermometers, all very stable with a single esp32 proxy. I have an automation that notifies me if my Wave+ becomes unavailable/unknown and I had just one disconnect in the past two weeks that resolved on its own.

Depending on your house size and layout, you might need more than one proxy to cover all the devices. Try bringing all the devices near the proxy for a couple of days and see if they stay connected.

AllenBurgett commented 5 months ago

@AllenBurgett I configured an esp32 with:

bluetooth_proxy:
  active: true

Then I disabled the bluetooth adapter in Settings > Integrations > Bluetooth > Integration Entries > Disable. I have a Wave+ and about 10 Govee thermometers, all very stable with a single esp32 proxy. I have an automation that notifies me if my Wave+ becomes unavailable/unknown and I had just one disconnect in the past two weeks that resolved on its own.

Depending on your house size and layout, you might need more than one proxy to cover all the devices. Try bringing all the devices near the proxy for a couple of days and see if they stay connected.

Seems like my Bluetooth integration was the only thing actually reading any of my devices. When I disabled it, I lost all updates from my Airthings. I've started going around the house and power cycling all of my bluetooth proxies. I'm now getting readings across the board! So, apparently my proxies were just borked.

Thanks for giving me a troubleshooting path!

LaStrada commented 5 months ago

A bit off topic, but you can add a restart button to your ESPHome nodes: https://esphome.io/components/button/restart.html

roblamoreaux commented 5 months ago

I noticed the other day that there are a lot of USB Bluetooth adapters that are marked as frequently dropping connection in the Home Assistant integration documentation(https://www.home-assistant.io/integrations/bluetooth/). None of mine were on the list of fast connecting ones so I ordered a $7 one to see if that helps. In the mean time I replaced that location with an esp32 bluetooth proxy which so far is much better.

jac2424 commented 5 months ago

I noticed the other day that there are a lot of USB Bluetooth adapters that are marked as frequently dropping connection in the Home Assistant integration documentation(https://www.home-assistant.io/integrations/bluetooth/). None of mine were on the list of fast connecting ones so I ordered a $7 one to see if that helps. In the mean time I replaced that location with an esp32 bluetooth proxy which so far is much better.

I have couple of other Bluetooth sensors being monitored by home assistant including one outside passed a brick wall and one floor down which have no connectivity issues which leads me to believe it’s a Airthings integration issue rather than Bluetooth stack or hardware issue.

AllenBurgett commented 5 months ago

I noticed the other day that there are a lot of USB Bluetooth adapters that are marked as frequently dropping connection in the Home Assistant integration documentation(https://www.home-assistant.io/integrations/bluetooth/). None of mine were on the list of fast connecting ones so I ordered a $7 one to see if that helps. In the mean time I replaced that location with an esp32 bluetooth proxy which so far is much better.

I have couple of other Bluetooth sensors being monitored by home assistant including one outside passed a brick wall and one floor down which have no connectivity issues which leads me to believe it’s a Airthings integration issue rather than Bluetooth stack or hardware issue.

Mine was definitely mostly an issue with my proxies. However, I'm still seeing some go unavailable, but they're mostly being cleaned up by my reloader automation. So, I would agree that there still seems to be something wrong with the Airthings integration.

Screenshot_20240311-121536

The first part of the graph is before restarting my proxies, the 100% is when I shut down the Bluetooth integration. It's been mostly zero since I restarted the proxies.

def1149 commented 5 months ago

Any estimate on when a new integration will drop?

zacs commented 5 months ago

After experiencing frequent disconnects with my Wave+ for a couple of weeks, I disabled the Bluetooth interface in Home Assistant and switched to a Bluetooth proxy on an ESP32. It has been rock solid since then.

Thanks for this. I've had GL-S10 bluetooth proxies for a while now, and for some reason I thought the Bluetooth integration itself needed to also be enabled. All my Airthings have been a disaster since 2024.2. But just disabling the Bluetooth integration (using an internal radio on a micro PC that sits in a metal rack....) got them all back on immediately. Thank you!

jac2424 commented 5 months ago

Issue still happening with latest Home assistant 2024.3 release that contained update for Airthings integration.

JesusSanchezLopez commented 5 months ago

I have same issue. The issue starts appearing with upgrade to Home Assistant Core 2024.1.6 or newer and issue still exists with HA Core 2024.3.1. Last working version is HA Core 2024.1.5.

Issue can be reliably recreated by upgrading to anything newer than 2024.1.5 and issue is resolved when downgrading to 2024.1.5 or older.

This is not an Airthings firmware, distance or battery issue. Only solution is to stay on HA Core 2024.1.5 for now

@LaStrada: looks like #108612 broke Airthings-ble integration for a bunch of us. Looks like airthings-ble integration was bumped up in HA Core 2024.1.6: #108612