-
Notifications
You must be signed in to change notification settings - Fork 140
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
Connection aborts after firmware update #83
Comments
I just noticed that if the sensor is not reachable again and I execute the following command, it returns an error message:
|
Hi @Markkuuss, I can confirm this behaviour, same kernel. I also rebooted, restarted and so on, but no difference – I only got this:
Interesting: I have a running Home Assistant instance, miflora configured as a sensor; it stopped working, too – HA only reports messages like these:
The iPhone App
That's really crazy. Does distance make a difference for you, too? I just started to search for Cheers, |
Hey guys, Hey Marianna! |
I have changed the firmware of my Raspberry back to the kernel with the last kernel version 4.14: So it works again. The command for this is: @ThomDietrich: But what happens if I download the current Raspbian Image? Then the default firmware has a kernel higher than 4.14 and Miflora won't work anymore? |
I tested it again yesterday. With the current stable kernel 1.20190517, which comes with the standard Raspbian update/upgrade process (sudo apt-get dist-upgrade), miflora-mqtt-daemon no longer works. The previous stable kernel version 1.20190401 (https://github.com/raspberrypi/firmware/releases/tag/1.20190401) is available with a downgrade via rpi-update: @sysadmama: I didn't notice any difference in the distance. In the beginning it runs with the current kernel at exactly the same distance as with the old kernel. But if it runs longer, after a certain time no connection can be established. This is also reproduceable. |
it looks like this is the problem why it is not working on my brand new raspberry pi 4... |
Probably that's the problem. Post your Linux version - the output of the command "uname -a". |
i don't understand why, but it started working again... so forget my post...
|
I had similar problem with not working connections or working for a while an then not anymore. Since the downgrade (like @Markkuuss) suggested, everthing seems fine. Will do further testing... |
I am experiencing the same problem on a raspberry pi v3 with Stretch since a long time, but it seems to me that my kernel is older than the one reported here. Linux raspberrypi2 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l GNU/Linux I implemented a rule in OpenHAB (apt-get version 2.4 installed on raspbian stretch) that restarts bluetooth and miflora services. I updated right now to the version suggested a few post above, and in my case it does not seem a downgrade, rather it is an upgrade. Linux raspberrypi2 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/Linux I will see how it proceed and will report back |
in my case the daemon works on a RaPi with Raspbian (no OH installed) and kernel: the daemon does not work if activated on another RaPi with openhabian and kernel: the 2 RaPis (both are model 3b+) are positioned close to each other so position is not part of the problem. |
Any news here? Has anyone made it stable with the latest firmware? I'm afraid my attempts were all negative. After some time no more data will be read. |
Tried it on Pi 0, 3 and 4. Same issue. Its even the same in Node Red. |
I have an error too. I installed this library first time raspberry pi zero w (with ble), cat /etc/*-release xiaomi mi flower care firmware: 3.2.2 bluez is the newest version (5.50-1.2~deb10u1+rpt1).
bluetooth daemon has some warnings too: sap-server: Operation not permitted (1)
—— little more debug info (
more exceptions (I commented some except branches and revealed some exception)
but it’s still not clear I also tried to pair with xiaomi flower care devices via bluetoothctl:
I keep devices nearby |
UPD. I found my mistake. I must run it with sudo! Make errors clear, please! It took many hours of my life. Good example: another miflower api project: https://github.com/vrachieru/xiaomi-flower-care-api. It said I must run with sudo. When I tried it here too, it started works. Any way, big thank you for your work! |
Hey @a-x- thanks for the exhaustive analysis. Let me just clarify that root privileges are not needed for the daemon. Also see the service definition: https://github.com/ThomDietrich/miflora-mqtt-daemon/blob/master/template.service#L8 I wonder if there were changes in buster leading to missing permissions, e.g. users not being added to the Quick note: The
I thought we already do that. Which error message is missing in your opinion? A pull request would be highly appreciated! |
Were you able to find anything else in the meantime, @cropab and @milkpirate ? I'm currently at kernel version 4.19.66-v7+ #1253. Unfortunately it doesn't work after a while. Then I have to do a reset every time: sudo hciconfig hci0 reset |
I think I have now found the solution. With the firmware, which is currently distributed as a stable with Raspbian Stretch (1.20190819 / 4.19.66), the Bluetooth does not work correctly on my Raspberry Pi 3b+. The problem existed since the first update to 4.19. I have now updated to the last available version 4.19.118 (1.20200512: kernel: Latest 4.19). Since then miflora runs stable again, at least it runs 24h without problems. This was unthinkable before. The command for the update to the last 4.19 is |
Since I updated my Raspberry (Linux 4.19.42-v7+ #1219; newest released kernel), the Miflora sensor is no longer accessible after some time. In the beginning, when I started the service, it works fine for some time, but after a while the Miflora sensor is no longer accessible. It looks similar to what @aymeric106 described in #80.
The sensor no longer returns any values. Even a restart of the service or even of the complete system does not result in the connection being restored.
By rebooting several times, connecting to the Android App, removing the battery, etc. I made it work again somehow. But it is not an unique problem. The battery is 99% full and it has happened several times after the update.
I still have no idea what it could be. Do any of you have a similar problem after upgrading the kernel?
The text was updated successfully, but these errors were encountered: