Ernst79 / bleparser

Parser for passive BLE advertisements
MIT License
29 stars 16 forks source link

Add workaround for bad govee data #32

Closed bdraco closed 2 years ago

Ernst79 commented 2 years ago

Thanks. There is a filter on the data length in the init.py as well for Govee, so is this bad Govee data always of a fixed length? We will have to change this file as well, I suppose.

bdraco commented 2 years ago

so is this bad Govee data always of a fixed length?

It appears to be. It just the extra 25 bytes glued on to the end

Ernst79 commented 2 years ago

Ok, which Govee is it that shows this behavior?

bdraco commented 2 years ago

At least the H5075 and H5177 both do it

bdraco commented 2 years ago

2022-07-10 12:06:06.510 DEBUG (MainThread) [homeassistant.components.govee_ble.data] Parsing Govee BLE advertisement data: BluetoothServiceInfo(name='GVH5177_2EC8', address='B16C51A4-061F-7952-76EF-1F4B9C1EE77B', rssi=-50, manufacturer_data={1: b'\x01\x01\x03d\xe8dL\x00\x02\x15INTELLI_ROCKS_HWQw\xf2\xff\xc2'}, service_data={}, service_uuids=['0000ec88-0000-1000-8000-00805f9b34fb'])

bdraco commented 2 years ago

raw is b'\x00\x00\x01\x00\x01\x01\x03d\xe8dL\x00\x02\x15INTELLI_ROCKS_HWQw\xf2\xff\xc2

Ernst79 commented 2 years ago

Ok, I'll just modify all govee sensors to also accept the length + 25.