-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xiaomi ble temperature and humidity sensor polling error #19326
Comments
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 👍 |
Home Assistant release with the issue: Last working Home Assistant release (if known): Operating environment (Hass.io/Docker/Windows/etc.): Component/platform: Description of problem: Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant): - platform: mitemp_bt
name: p0 floor
mac: '4C:65:A8:xx'
scan_interval: 60
median: 2
timeout: 60
retries: 3 Traceback (if applicable):
Additional information: Extra info: My system consists of ~10 bluetooth devices (BT and BLE), and one USB BT transmitter with self made antenna. There are always issues with the BT (on linux and windows), but there is no other way for me. I have low signal, connection losses, etc, but other subsystems catch the errors properly and do not die like this :) At the moment I will try to switch back to hygrothermo. |
I have the same issue. Time until failure is completely variable, sometimes it seems to work for a few days other times a few hours. I've tried both the Pi3 internal Bluetooth and a USB Bluetooth adapter, with the device ~20cm away. The device is still visible and connectable from bluetoothctl in the HassOS 2.12 host / developer SSH. |
Same issue here. Have this problem since a few versions ago. Tried lots of things... getting sensor closer, different settings, even a different pi3 :) |
I have exactly the same issue described by Yunnanpl. (Polling error [Errno 32] Broken pipe |
having same issue here with the latest version, not working with mitemp_bt and the mi_flora component. Bluetooth tracking is fine, just sensors stops working after a few errors with |
The same error is also reported by other users on the Home Assistant forum. Hope it will get fixed in the next release of hass.io. |
I have the same issue, it works fine for a few hours and then it stops updating like the others described. The errors are the same as listed above. |
Subscribed - same issue & seems to be related to a recent update of HA/HASSIO as was working fine for months before this. My battery level is still >90% and position of sensor and host system has not changed. |
I've moved over to Hassbian to see if the issue continues. I can confirm it is still present with the exact same HA config on Hassbian. Only error present in the HA log is: |
seems to be getting worse too, some don't even update on reboot now. |
looks like it's not fixed on the latest 0.97 release :-( |
I confirm: |
Any update? |
Nope, still not working with 0.97.1 |
something new? |
There is a custom component that solves the issue. Please take a look at the hassio forum https://community.home-assistant.io/t/xiaomi-mijia-bluetooth-temperature-humidity-sensor-compatibility/43568/155?u=mat44150 |
Do you know if is it possible to apply same modification for miflora? |
Sorry, I don't know how the mi flora works |
Just noting that other sensors have the same issues: #24453 |
I see that someone solved by installing libglib2.0-dev, I cannot try because I'm on HASSIO. |
I think this is finally fixed in 0.99, been 24 hours and still updating! Thank you developers! |
I am glad the official component works for you psp888. I am going to stick with the custom component for now and hope it eventually becomes the standard component in a future release of home assistant. In my opinion, it is much better. It acquires much more data points in the same time interval, and since the data is automatically sent by the sensor, it has no impact on the battery's life. It is also more reliable to get data from more remote sensors: It virtually increased my communication range to 10m compared to 3-4m with the previous polling component. |
@psp888 It is still working fine? Could you update? |
Yes been working for 2 days straight and counting |
I got mitemp and miflora, they both work perfectly now |
For me, it works a few hours at longest but usually a few minutes after restart home assistant. I am really confused because I have some other components behave like this I mean stops updating after a few minutes. Most of them are related to the command line I guess like binary sensors... ping, cat... For me, issues appeared when docker build migrated to alpine instead of Debian. Has anyone had the same issues with other components or it's only xiaomi ble related? |
I'm using hassio |
The problem still persists even with 0.99.3 |
Additional info: on the Pi Zero W this does not happen. Got a friend with a Pi Zero W and similar setup with xiaomi stuff and the ble temp sensor works perfectly for him. ( since last year ) |
i'm using Pi4 |
So this is only for the Pi3 ? I am wondering if there is a difference between the 32 and 64 versions... |
@pixeldublu no i have the same issues on a zero w. I am using a pi3 and zero w as HA slaves |
@fbrinker interesting... have a buddy with the same ble temp sensor and pi zero with same hassio versions and works flawlessly for him :| |
With new We have to find a solution ASAP! Commits are not accepted May be a special or new addon for Mi sensors? |
I gave up a few releases ago. To work around this you can use esphome ;) |
I was follwing this issue for some time and also tried other solutions to narrow down the cause of the instabilities. for me it seems that this issue and #24313 and #24792 are about the same cause... My installation (raspbian, docker, hass 0.100.3) finally seems to be running stable IF I restart the bluetooth.service on the host (raspbian) regulary (like every day). Therefore I adjusted the systemd file with:
I know, not a final solution, but a workaround I can live with... |
@0x646f6d thanks, interesting idea, i will give it a try. Restarting the service from time to time is also my workaround, but didn't "automate" it yet |
How and where can you set these settings? :) |
With the following command you can edit systemd unit files. |
Ah is see this is not possible in hass.io running on my Pi... while in ssh you are limited in what you can do, no sudo potability's. Is this restart of Bluetooth services possible with my setup? |
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. |
I have the latest HA version. This issue is still happening. |
Home Assistant release with the issue:
0.84.2Last working Home Assistant release (if known):
Operating environment (Hass.io/Docker/Windows/etc.):
Hass.ioComponent/platform:
https://www.home-assistant.io/components/sensor.mitemp_bt/Description of problem:
Polling error Could not read data from Mi Temp sensor 4C:65:A8:DA:89:E3
Problem-relevant
configuration.yaml
entries and (fill out even if it seems unimportant):Traceback (if applicable):
Additional information:
even if the sensor is at 2cm from pi3 don't work. i've tried everything my config was ok (triple check) and the mac was the right one.
The text was updated successfully, but these errors were encountered: