Ernst79 / bleparser

Parser for passive BLE advertisements

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LYWSDCGQ battery is not parsed

pulgarzito opened this issue · comments

Hi All,

I've noted that battery is not returned for LYWSDCGQ, at least in version 0.4. It is neither in the test nor in the example in the README. But this sensor reports battery, doesn't it?. Is this just an oversight or I am missing something?.

Thanks and BR.

It is send in a different advertisement, the sensor sends different advertisements, with different payloads. battery advertisements are in the payloads with 0x100A. Battery is indeed not included in a test. Battery advertisement is generally send less often than temperature and humidity.

I can see it now. Just for others reference. I can see advertisements with only temperature, only battery, only humidity and temperature & humidity. The latter ones are the most frecuent.

Thanks and BR.

{'rssi': -76, 'mac': '582D34XXYYZZ', 'type': 'LYWSDCGQ', 'packet': 174, 'firmware': 'Xiaomi (MiBeacon V2)', 'data': True, 'temperature': 26.6}

{'rssi': -77, 'mac': '582D34XXYYZZ', 'type': 'LYWSDCGQ', 'packet': 175, 'firmware': 'Xiaomi (MiBeacon V2)', 'data': True, 'temperature': 26.7, 'humidity': 40.3}

{'rssi': -70, 'mac': '582D34XXYYZZ', 'type': 'LYWSDCGQ', 'packet': 176, 'firmware': 'Xiaomi (MiBeacon V2)', 'data': True, 'battery': 58, 'voltage': 2.722}

{'rssi': -71, 'mac': '582D34XXYYZZ', 'type': 'LYWSDCGQ', 'packet': 128, 'firmware': 'Xiaomi (MiBeacon V2)', 'data': True, 'humidity': 40.5}