nathanfaber / meaterble

Meater BLE reverse engineering
71 stars 15 forks source link

Updated to python3, added mqtt option, allows for initial no data package #8

Open strahl opened 3 years ago

strahl commented 3 years ago

Hello nathanfaber,

first a big thanks to you and your contributors, it allowed me to use my Meater from my linux laptop within minutes. :)

I changed the print command to be python3 ready and added a command line interface that allows to optionally send the data to a mqtt server.

I also had the problem when I started readMeater.py and then took the Meater out of the charging box that the first package was empty. Therefore I added a "no data" handling. I think this might also help in #5 .

Please let me know if you would like some changes (e.g. JSON format).

Thanks again and greetings from Germany :) stefan

nathanfaber commented 3 years ago

Thanks for the contribution, I'm glad you were able get it running quickly.

This looks good but I'd like to keep the external modules to a minimum (click/mqtt) so people can just run it and see the dumped output quickly so they can see it working. Is there a way you would like to factor those two components out?

We could have a keep the basic readMeater and add your more enhanced one. I'm also fine with having a dumpMeater or something as well. There isn't much structure to the project so I'm up for anything really.

strahl commented 3 years ago

Ah sorry, I overlooked this. It is indeed a good idea to keep the readMeater.py as easy as possible to be used.

I like the idea to add a more enhanced version, what about readMeater_mqtt.py? Or publishMeater.py? Not 100% satisfied with the names, do you have perhaps a better idea?

nathanfaber commented 3 years ago

publishMeater.py or mqttMeater.py sounds good to me. Also, are you launching with the run.sh helper? We can make that take an optional first argument that defaults to readMeater.py and then we can use ./run.sh mqttMeater.py or whatever.

arzaman commented 2 years ago

Has the publishMeater.py or mqttMeater.py been released ? where I can find ? thanks Davide