Bluetooth-Devices / bthome-ble

Parser for BTHome BLE devices
https://bthome.io/
MIT License
64 stars 11 forks source link

Sensor Type changed with latest pvvx firmware #93

Closed yannpub closed 8 months ago

yannpub commented 8 months ago

Since firmware 4.5, pvvx firmware is using BThome v2.

Before firmware 4.5, devices were recognised as BTHome sensor. After firmware 4.5, devices are recognised as "Temperature/Humidity sensor", and that seems to impact the readings:

image

I have opened the following issue on pvvx repo: https://github.com/pvvx/ATC_MiThermometer/issues/405

Ernst79 commented 8 months ago

Not sure why, but it looks like HA still has the old data in the database. Try to delete the device from ha fro the BLE monitor settings or from the BTHome integration, restart HA and re-add it again.

yannpub commented 8 months ago

I deleted the device 'Office' (The one in FW4.6) from BTHome, restarted HA. The device was discovered again by the BTHome integration, and I could recreate it. But it still appears as Temp/Humidity sensor and not like the other ones still in FW4.4 :

image

Readings from Nov 9th, FW4.4, BTHome v1:

image

Readings from Nov 13th, FW4.6, BTHome v2:

image

Readings from today (device recreated around 4:50pm):

image
Ernst79 commented 8 months ago

That device type change is by design. In BTHome v2 ATC sensors are recognized as temperature/humidity sensors. The manufacturer is Xiaomi. See https://github.com/Bluetooth-Devices/bthome-ble/blob/4cb68589dabe995df04bb6abf2cbc9a1e62d9687/src/bthome_ble/parser.py#L319-321

I don’t think the reading can be affected by this name change. I tried 4.6 firmware myself today, but I don’t see any issue. Is there anything in the log?

yannpub commented 8 months ago

It seems the issue was coming from my Intel Bluetooth module, which is known to have some issues with the current 6.1 kernel : https://github.com/home-assistant/operating-system/issues/2535#issuecomment-1784219788 All my devices are now on 4.6, BTHome v2 and have proper readings.

Shutdown of the server was the solution to get stable readings. Still doesn't understand though why the firmware update triggered this lower layer bluetooth issue.

Ernst79 commented 8 months ago

Ah, yes, a full system restart is often needed after a Home Assistant OS update. It often contains a Bluetooth firmware update, and without the restart it can fail to work properly.

pvvx commented 6 months ago

https://github.com/pvvx/ATC_MiThermometer/issues/442