ThomDietrich / miflora-mqtt-daemon

Linux service to collect and transfer Xiaomi Mi Flora plant sensor data via MQTT to your smart home system, with cluster support 🌱🌼πŸ₯€πŸ‘🌳
MIT License
610 stars 140 forks source link

Gatttool is deprecated #70

Open Kernald opened 5 years ago

Kernald commented 5 years ago

While it's still available on most distributions, gatttool has been officially deprecated by the BlueZ team two years ago. Is there any plan to migrate to something else? (I just ran into this when trying to use miflora-mqtt-daemon for the first time today.)

Kernald commented 5 years ago

Sorry for the noise, I just opened a similar issue where it actually belongs: https://github.com/open-homeautomation/miflora/issues/121

ThomDietrich commented 5 years ago

Yes definitely planned to move away from gatttool. I did not find the time for it yet and plant care during winter time (Germany) is not my highest priority :) Thanks for reaching out!

Markkuuss commented 5 years ago

Wouldn't it be possible to simply change "GatttoolBackend" to "BluepyBackend" in this line?

https://github.com/ThomDietrich/miflora-mqtt-daemon/blob/c4aae6ec9bbccdb58cac813e5e6cd1422e78b1dc/miflora-mqtt-daemon.py#L220

Has this ever been tried and tested?

Maybe this is also a solution for the current kernel issue https://github.com/ThomDietrich/miflora-mqtt-daemon/issues/83?

ThomDietrich commented 5 years ago

I did not try it. Please try and let us know :) For a permanent change the solution might need some more testing and definitely some updates to the changes. Please contribute a PR! Thanks :)

bigkraig commented 5 years ago

BluepyBackend seems to be working fine for me.

Markkuuss commented 5 years ago

@bigkraig: Can you post your Linux version (output of the command "uname -a") you tested with?

bigkraig commented 5 years ago
Linux pi1 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux
Markkuuss commented 5 years ago

How long has your system been running stable with this configuration without restarting the system or deamon?