Closed lwis closed 7 years ago
Unfortunately I don't have any information how to read the battery level and the history. The standard battery attribute doesn't seem to be supported (if I checked this correctly)
Hi, I don't know for the history but for battery level and firmware version seems to be in 0x38. (cf https://github.com/LeonGaultier/fhem-XiaomiFlowerMonitor/blob/devel/74_XiaomiFlowerSens.pm#L297)
battery = read_ble(self._mac, '0x038', retries=self.retries)[0]
return battery
For version 2.6.6 you need to write in 0x33 before getting information (cf: https://github.com/LeonGaultier/fhem-XiaomiFlowerMonitor/blob/devel/74_XiaomiFlowerSens.pm#L278)
@julcollas : Thanks, I will integrate this.
This has been implemented now. Can you do a test with the latest version?
Seems ok for me . Thanks !
I read your post on reverse engineering the BLE API, and noticed that the app is able to query the battery level of the sensor - would it be possible to query this, and potentially other things? Such as syncing the history of the sensor?