Home Assistant & RuuviTags not properly working after FW upgrade

I upgraded the the FWs of my 6 RuuviTags from version 2.X to 3.31.1.

I’m using Home Assistant on Raspberry Pi 3 Model B Rev 1.2 with external BT dongle (see my previous thread (https://f.ruuvi.com/t/ruuvitags-in-ha-more-and-more-unstable-with-time/3953) with GitHub - akx/hass-ruuvitag: Hass.io addon for Ruuvitag Weather Stations. HA & RuuviTags worked fine until the FW upgrade.

However not the data is not collected after some time, usually after a day or so. Restarting HA isn’t enough - I really have to reboot the RPi, i.e., hardware.

Have you any idea what might have caused this (in the FW upgrade) and what should I change to make it work again?

Hello,

v2->v3 update adds a scan response to Bluetooth data, my guess is that your BLE scanner requests that scan response and doesn’t know how to handle it.

This issue has been fixed in most community projects, updating software versions to latest might work. If not, the fix is most likely to either use passive BLE scanning which does not request scan response or to add support for discarding the scan response / other unknown data from RuuviTag

@otso thanks for replying!

Yes, that is what is guessed that something has changed and HA integration and/or dongle and/or RPi does not necessarily handle it correctly. Can this scan response be somehow disabled at Ruuvitag end? One thing I don’t understand is that why the system works for some time, e.g. now it worked for ~12 hrs?

The scan response is needed for GATT connection to read history and have alerts in iOS, currently we do not have a runtime configuration option for disabling the scan responses / GATT in firmware.

It is strange if the system works of 12 hours, if the issue is in scan responses the readers should crash in few minutes. Does the Ruuvi Station mobile application see the tags just fine?

Yes,I went Ruuvi Station software and synchronized the data and for all the tags it was fine for past days. Any clues/hints how proceed? Is this fixable in HA integration or should something be changed at HW level?

This should be fixable in HA level, possibly somewhere in RuuviDriver dependency. First place where I’d start looking at is line ruuvidriver/parse.js at bb304c5ee2c46d82ec4ab06b34dbf10b7891aacb · akx/ruuvidriver · GitHub, if there is unknown data does it crash the HA plugin due to error thrown there?

Hi!

It seems that akx at GitHub may not be upgrading the HA integration (and I don’t have the required skills).

Are you aware any HA integrations for RuuviTags that would work with v3 FW?

Theengs Gateway can be installed as a Home Assistant add-on, and it supports RuuviTag RAWv1 and RAWv2 advertisements. Maybe try this? See how this looks like in Home Assistant.