-
-
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 no longer working after update from 0.95.4 to .096.5 #25704
Comments
still not fixed in 0.97.0. devices "unknown" |
Can you use the issue template? It would really help to know and understand the environment where Home Assistant is running. |
Home Assistant release with the issue: 0.97.0 Last working Home Assistant release (if known): 0.95.4 Operating environment (Hass.io/Docker/Windows/etc.): hass.io on raspberry 3B+
Component/platform: https://www.home-assistant.io/components/mitemp_bt/ Description of problem: Problem-relevant - platform: mitemp_bt
mac: '4c:65:a8:df:03:75'
name: termometro BT xiaomi
force_update: true
median: 1
timeout: 20
cache_value: 60
monitored_conditions:
- temperature
- humidity
- battery
- platform: mitemp_bt
mac: '58:2d:34:32:13:35'
name: termometro BT xiaomi 2
force_update: true
median: 1
timeout: 20
cache_value: 60
monitored_conditions:
- temperature
- humidity
- battery Traceback (if applicable):
Additional information: |
I had problems with this sensor for ages but eventually managed to get it working on 0.96.x and 0.97.1. FYI I still get the |
@mikeybeck |
Your issue mirrors mine nearly exactly, except the sensors can appear to be working for several hours after resetting them they still eventually fail. I too have to keep rolling back to 0.95.4, but haven't tested 0.97.2 yet. |
@batwingnz |
I made today a fresh installatiopn of 0.97.2 on the SD of my raspberry and, configuring the BLE sensors, they were coerrectly read this time. |
Yes it works for a few hours but not for many days on end like 0.95.4 |
I tried again with a fresh 0.97.2 installation, just configuring the BLE termometers. It worked. From my log:
Can someone help there??? thanks a lot |
another note on the same issue: on 0.97.2, if I wipe & restore a snapshot with a previously working configuration, the BT devices are recognized and displayed correctly. Two breaking points then:
Can it help to individuate the bug? Thanks |
I confirm that downgrading the system to 0.95.2, everything started to work again like before. Only the Zwave USB dongle still caused a crash to BT devices but configuring directly zwave /dev/ttyACM0 port on configuration.yaml it started to work without affecting the BT . I therefore confirm that it is an issue related to 0.96 and next revision, that affect climate & BT devices. i hope it can be fixed in a future release |
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
I had the same issue and resolved by doing this:
reference: https://www.home-assistant.io/hassio/installation/#debianubuntu The modemmanager package will interfere with any Z-Wave or Zigbee stick and should be removed or disabled. Failure to do so will result in random failures of those integrations. For example you can disable with sudo systemctl disable ModemManager and remove with sudo apt-get purge modemmanager |
But the they're not zigbee or z wave? Is your suggestion even relevant for hass.io or only an install over debian? |
Thanks but I could verify that, even with a fresh installations (097 and latest 0.98) , the Climate related BT devices can work only for a couple of hours, then are no longer recognized. This happened also without using or inserting the Z-wave USB dongle. Anyway I use hassio. Thanks again |
I tried lastest update, it worked for about 12 hours but still eventually broke down and now it fails to restore snapshot. Great. |
I tried to install also on a rasp2 and rasp zero w. WITH VERSION 0.98.3 Help needed GUYS..!!! |
I am having the exact same issue, also on hass.io raspberry 3B+ with version 0.98.3. |
MiJia sensor readings being stop updated after about 2-5h. Does work for a while again whe hassio is restarted. To reproduce the error: config.yaml: - platform: mitemp_bt
name: Room Temp
mac: 58:2D:34:33:xx:xx
force_update: true
median: 1
monitored_conditions:
- temperature
- humidity
- battery ui-lovelace.yaml - type: history-graph
title: 'Temperature & Humidity Sensors'
entities:
- entity: sensor.room_temp_temperature
name: Room
refresh_interval: 5 from log:
|
I have exactly the same problem. After updating from 0.95.4 to 0.98.5 all of my three Xiaomi temp sensors have stopped working. Entity state is unknown. For me they never pick up any value. Error log only shows:
It looks like some bluetooth issue. Downgrading to 0.95.4 and everything works. I never had a problem with them on 0.95.4 I had been using them since the release. I have Pi3 B+ and Hassio. |
The problem still persists after downgrading to 0.95.4 and rebooting the RPi. |
I confirm this. It worked for a while but then stopped. So it doesn't work after downgrading. But before upgrading to 0.98 it was perfectly working on 0.95.4 |
I'm getting this exact issue, after reset works for couple of hours then nothing. I ssh into my ubuntu environment and check |
I've been trying updates then rolling back. Last night HA disappeared off the network, turns out the USB and ethernet died spontaneously on pi 3 b+. When I got back in it had updated from 0.95.4 to 0.96.2 by itself ( no idea how that's possible since the updater would take it to 0.98.5). Anyway I restored my 0.95.4 snapshot and now my sensors don't come back at all, looks like I'll be forced to a clean install but if ethernet is dead that's gonna suck. |
The problem still persists even with 0.99.3 |
Problem disappeared on 0.99.3. I'm happy 🤗 |
Give it a few more hours it will break lol |
4 days left ...lol |
It's been running 4 days? My pi 3 died and I got a pi 4 but builds for it started after 0.95.4 so I've literally had no homeassistant while waiting for a fix. |
Yes, I really enjoy it. My torment is over |
No.. does not work. |
@Isking007 : can you please share your sensor configuration? I'd realize if you have something different or customized.... Thanks |
Are you able to expand on database issue? If that is issue then it's something that can be looked into more, currently I'm not able to figure out issue at all. |
So not sure if this helps, but when I restart home assistant, I get the following error which hangs the restart (i have to manually restart docker image) for home assistant to start again. but it's interesting that it's has to do with the bluepy which is the bluetooth python module home assistant is using, could this be crashing? Or is it just coincidence?
|
For anyone looking for a solution since issue still being investigated, I've ended up doing the following:
Working way better, getting no time out issues or anything, it seems like it's pulling the data way more consistently then via home assistant in docker. I thought I was having issues due to bluetooth range but doing it this way I can pull from all my Xiaomi sensors better. |
I suspect that the lost of bluetooth connection occour when logout from xserver. I'm running Home assistant 0.102 on RPi 3+ with Docker. |
I just noticed that these errors like |
Look at #24313 seems that a custom component works better but there is still an open discussion how to integrate it https://github.com/custom-components/sensor.mitemp_bt |
Replace your file mitemp_bt_poller.py with the lastest (this one) and your problem will be solved. This is the original project where updates are published: https://github.com/ratcashdev/mitemp |
I can't find mitemp_bt_poller.py on my system anywhere. Where is it located? |
UPDATE: poller script replacement doesn't help, alternative solution - use HACS component with @jrmckins In order to get last Login via ssh to HassOS host (see https://developers.home-assistant.io/docs/hassio_debugging/)
in my case result is: /usr/local/lib/python3.7/site-packages/mitemp_bt/mitemp_bt_poller.py
P.S: I've done this for my Home Assistant 0.107.1 (RbP 3B), let's see whether it helps or not |
UPDATE2: |
This problem is referenced in many different issues, some of them: Bluetooth: hci0: Frame reassembly failed (-84) raspberrypi/firmware#1150 Error communicating with local bluetooth adapter (RPi3) home-assistant/core#30147 Xiaomi BLE Temperature and Humidity sensor no longer working after update from 0.95.4 to .096.5 home-assistant/core#25704 Xiaomi BLE Temperature and Humidity sensor home-assistant/core#24313 (comment) Solution seemed to reeduce the boud rate of the serial connection to BT on rpi3b where flow control is missing. The patch to the original btuart file is to reduce the baudrate only for rpi3b models where flow control is missing: - $HCIATTACH /dev/serial1 bcm43xx 921600 noflow - $BDADDR + $HCIATTACH /dev/serial1 bcm43xx 460800 noflow - $BDADDR I'm not a buildroot expert but the best way seemed to move the upstream btuart download in a PRE_PATCH_HOOK so that standard buildroot way of patching can be applied.
This problem is referenced in many different issues, some of them: Bluetooth: hci0: Frame reassembly failed (-84) raspberrypi/firmware#1150 Error communicating with local bluetooth adapter (RPi3) home-assistant/core#30147 Xiaomi BLE Temperature and Humidity sensor no longer working after update from 0.95.4 to .096.5 home-assistant/core#25704 Xiaomi BLE Temperature and Humidity sensor home-assistant/core#24313 (comment) Solution seemed to reeduce the boud rate of the serial connection to BT on rpi3b where flow control is missing. The patch to the original btuart file is to reduce the baudrate only for rpi3b models where flow control is missing: - $HCIATTACH /dev/serial1 bcm43xx 921600 noflow - $BDADDR + $HCIATTACH /dev/serial1 bcm43xx 460800 noflow - $BDADDR I'm not a buildroot expert but the best way seemed to move the upstream btuart download in a PRE_PATCH_HOOK so that standard buildroot way of patching can be applied.
This problem is referenced in many different issues, some of them: Bluetooth: hci0: Frame reassembly failed (-84) raspberrypi/firmware#1150 Error communicating with local bluetooth adapter (RPi3) home-assistant/core#30147 Xiaomi BLE Temperature and Humidity sensor no longer working after update from 0.95.4 to .096.5 home-assistant/core#25704 Xiaomi BLE Temperature and Humidity sensor home-assistant/core#24313 (comment) Solution seemed to reeduce the boud rate of the serial connection to BT on rpi3b where flow control is missing. The patch to the original btuart file is to reduce the baudrate only for rpi3b models where flow control is missing: - $HCIATTACH /dev/serial1 bcm43xx 921600 noflow - $BDADDR + $HCIATTACH /dev/serial1 bcm43xx 460800 noflow - $BDADDR I'm not a buildroot expert but the best way seemed to move the upstream btuart download in a PRE_PATCH_HOOK so that standard buildroot way of patching can be applied.
This problem is referenced in many different issues, some of them: Bluetooth: hci0: Frame reassembly failed (-84) raspberrypi/firmware#1150 Error communicating with local bluetooth adapter (RPi3) home-assistant/core#30147 Xiaomi BLE Temperature and Humidity sensor no longer working after update from 0.95.4 to .096.5 home-assistant/core#25704 Xiaomi BLE Temperature and Humidity sensor home-assistant/core#24313 (comment) Solution seemed to reeduce the boud rate of the serial connection to BT on rpi3b where flow control is missing. The patch to the original btuart file is to reduce the baudrate only for rpi3b models where flow control is missing: - $HCIATTACH /dev/serial1 bcm43xx 921600 noflow - $BDADDR + $HCIATTACH /dev/serial1 bcm43xx 460800 noflow - $BDADDR I'm not a buildroot expert but the best way seemed to move the upstream btuart download in a PRE_PATCH_HOOK so that standard buildroot way of patching can be applied.
It's fixed in hassos 3.13 |
Is it fixed in docker version too? or just to the hassos ? |
It's fixed only in HassOS because the issue was at low level in the serial communication with the BT rpi module. |
This has been working for many days for me. I'm on 3.12 but will upgrade to 3.13 today. |
6 days on 3.13 and it's been solid. |
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. |
Xiaomi BLE Temperature and Humidity sensors no longer discovered and working after upgrade from 0.95.4 to 0.96.5.
i.e in states:
sensor.termometro_bt_xiaomi_temperature | unknown
in info:
Updating mitemp_bt sensor took longer than the scheduled update interval 0:00:30
11:49 helpers/entity_platform.py (WARNING) - message first occured at 11:04 and shows up 88 times
In the original Xiaomi BT app the devices are correctly discovered and shown.
The text was updated successfully, but these errors were encountered: