-
Notifications
You must be signed in to change notification settings - Fork 141
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
Deamon stopps working if Sensor not found #39
Comments
Thanks for the bug report! |
I enjoy the same. At first, i configured the service as restart=always, but that doesn't help. I am quite clueless regarding python, but i did a change. I added the "BluetoothBackendException" which is raised by the backend to the "IOError" Exception handler. Similar is in line 314. Only IOError Exception is handled, but BluetoothBackenException is raised. But as i said, i am clueless with python, this may be nonsense. |
Hey guys, I had a quick look. Please replace those two lines: miflora-mqtt-daemon/miflora-mqtt-daemon.py Line 221 in 9cf5482
miflora-mqtt-daemon/miflora-mqtt-daemon.py Line 316 in 9cf5482
by except (IOError, BluetoothBackendException): If you can proof the correct behavior please let me know and I'll add the change (or you can push a PR!) Thanks! |
That's exactly what i did. :-D I am testing it currently. I will do a PR when i am confident this helps. |
@jboeddeker good job, thank you very much!! line 15: |
Thanks. I currently just use the import of BluetoothBackendException. Are all of these neccessary? Line 15: Service doesn't stop anymore, although i have an unreachable sensor. |
hmm, no.
|
Exchanging the backend would be the main task for a next version. |
OK, i made the changes. Works fine. But i am confused with github. (Not really used to it, still use SVN for all my projects.) I made the changes in the version installed on my pi with openHABian. Works. But how can i apply the changes to the version which was cloned to my pi by openhabian? This is a simple bugfix and people needing the bugfix, shouldn't go to a new version manually to obtain this. |
In order to create a PR here you could actually just work with the GitHub provided editor. As the program is just one script file it is easy to add all changes, then create a PR based on that. After the PR was accepted and merged, you should be able to update your setup on the Pi by re-executing the openhabian-config step. |
Hey guys, are you still working on this PR? |
I'm running into this (one of my sensors 'drifts' in and out of Bluetooth range, so I'm seeing this pretty often) - will try out the fix @jboeddeker and @JoanMCD over the next few days and put up a PR unless someone beats me to it |
Whats the status on this? |
Any update on this? |
Deeply sorry for the delay guys. This should be solved now. |
* Added config dir to simplify docker handling * Added a Dockerfile * Implement suggested fix for issue #39 * Improved documentation * Added documentation on homeasssistant-mqtt reporting mode * Use local directory as default for config * Update README.md
Thomas, thanks for adding this in and maintaining this daemon. It works great and makes it much easier to work with the MiFlora! |
Hi !
The demon works fine if the miflora sensor is in range. If not the deamon (or the underlaying library) stops working with the message:
I test this by simply add a not existing mac in the config.ini
I have installed miflora v0.4. Any ideas ?
The text was updated successfully, but these errors were encountered: