Closed therealhalifax closed 1 year 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)
I see the same, even with "active: true" in the esp-config:
bluetooth_proxy:
active: true
I am not so sure if this issue is caused by the fact that you are using a bluetooth proxy. I have two devices that both connect via bluetooth proxies: The HHCCJCY01 plant sensor does not report its battery state, but the LYWSDCGQ temperature/humidity sensor does indeed report its battery state.
The plant sensor requires connecting to the device, LYWSDCGQ puts the battery status in broadcasts so doesn't need a connection to the device. So that device is not a good comparison, unfortunately.
Couple of environmental things - your proxies might be close enough to receive data but might actually be weaker at transmitting. We only need to receive data to get moisture, temp, conductivity, etc. but battery requires sending and receiving. Moving the plant close to the proxy would help with this. You'd potentially have to wait 24h to see, though.
Also we only poll once a day (polling is the worst thing we can do in terms of battery life so doing it more often would be a mistake). We poll the first dongle we see at startup, so if HA thinks your plant sensor is in range of bluez it will use that. That might then not be in range, we won't try again for 24h. That attempt will use the dongle with the best signal. And if you are restarting HA a lot you'll never see it poll with the right proxy.
(There is a HA API change I need to add support for that will improve this case).
Have enabled active connections on my proxy and will see if my upstairs plant sensors start getting battery data..
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
The problem
The xiaomi_ble integration works fine in general and also via the new ESPhome proxcs. But the Battery status is reported only if the sensor is in distance to the Bluetooth dongle on my HA. If one of the plant sensors has connection only via the ESP proxy the Battery status is not reported anymore.
What version of Home Assistant Core has the issue?
2022.10.5
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
xiaomi_ble
Link to integration documentation on our website
https://www.home-assistant.io/integrations/xiaomi_ble/
Diagnostics information
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
No response