Open chemelli74 opened 7 months ago
Hey there @jc2k, @ernst79, mind taking a look at this issue as it has been labeled with an integration (xiaomi_ble
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
xiaomi_ble documentation xiaomi_ble source (message by IssueLinks)
How long have you had that sensor? If longer than a few days, can I see the graph for signal quality and can you confirm there are no logs from the integration?
For whatever reason, that sensor does not broadcast battery information.
There is a battery sensor that it tries to poll once a day only (as the sensor is not only usually incorrect, but polling it uses a lot of battery). However polling requires a much stronger signal. I'd expect -83 to be a little bit unreliable with this sensor. I would expect to see something in the logs if the poll failed. If nothing in the logs, check again in 24h.
HI, thx for the quick reply.
Device is there since a week (others devices for even more). I can immagine signal strength is not good, but I would expect it to be at least created. If it needs a minimum strength for a long timeframe, I suggest to add this info to the documentation.
Xiaomi BLE integration only creates a battery sensor if it receives the actual battery data. So it can take 24 h, and, as said by @Jc2k, battery data is only collected by connecting to the device (which is done once a day), and requires a good connection. All other data (temperature, etc) is received passively, and is broadcasted at a frequent interval (once per minute).
Yup, I know the difference between actie and passive, but what is missing in the equation is "requires a good connection". Something like: "it needs at least -60 dBm for at least 60 minutes around 11pm" would help ;-)
I can confirm the battery sensor is gone. I have 2 of these sensors for more than a year. The battery sensor never gave any problem but now it is gone. I tried to delete and add the sensors again but that didn't help. I have them laying next to the Bluetooth dongle (about 20 cm) for more than a week. Signal strength about -60dBm.
Hi, can you at least add some debug log lines to help understanding why that sensor is no more created ? Thank you in advance
Hi,
I think there is something to be fixed somewhere in the code path, as using esphome
with myhomeiot_ble_client works perfectly.
I see both firmware and battery status.
FWIW, still works fine here.
My battery level is three, but it always shows 100%. It never changes.
I have two HHCCJCY01 devices since April and the battery sensor never showed up.
The problem
Xiaomi BLE doesn't create battery sensor for HHCCJCY01 devices. All other sensors are created and working properly:
What version of Home Assistant Core has the issue?
2024.2.2
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Core
Integration causing the issue
Xiaomi BLE
Link to integration documentation on our website
https://www.home-assistant.io/integrations/xiaomi_ble/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response