-
Notifications
You must be signed in to change notification settings - Fork 60
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
Adding MQTT and Python 3 support. #8
base: master
Are you sure you want to change the base?
Conversation
Feature/python3
Seems like the check for "None" in the source for serial no does not work properly. Have added another check in the connect() method on the WavePlus() Class |
I like the idea of using the MQTT broker to publish current values from Wave Plus, but shouldn't it rather be in a separate module? I think that if someone else wants to use the reader with another protocol they then depend on MQTT. If you get what I mean? |
I think that is a good idea. I can split the mqtt part into a different module. So the non-mqtt users are not neccessarily depandant on the paho-mqtt library. |
Added some changes yesterday. Now all classes are in their own files and the mqtt functionality (and include) is in a separate file. Works on my pi :-) |
Hi @stenjo
So if you could merge in the latest version and still have the support for phyton 3 that would be great. But you will have to move the MQTT support to another repo. |
mqtt is great for home assistant and other home automation platforms. i will try to set this up when I have som free time. would be very interesting to adapt this for use with an ESP32 if possible. |
Change filename in usage message
Python 2 is officially end-of-lifed in 1 month: https://www.python.org/doc/sunset-python-2/ |
Seems to be updated already. What changes are missing? |
Hi @stenjo , Can you please share your *.things file for the openHAB? I have the Airthings Wave 2nd generation, that is not supported by either script (neither read_wave.py, nor read_waveplus.py) but with help from orjangj I managed to get the read_waveplus.py working (as well as yours WavePlus.py) , now I just need the mqtt setup/configure on the openHAB. |
I'd be happy to. Are you able to make a PR with the changes needed for these scripts to work for you? I need to get home to pull the .things file from my OpenHAB setup. |
I will try ;-), never used GitHub before |
This PR is now updated with an openhab waveplus.items file for usage in an OpenHab installation. |
I'd also be happy to know what changes you had to do to make it work. Also bought a Airthings Wave (Radon, Temp and humidity only) and are not able to make that work with either of the programs (not this PR or the original). |
You both changed the same files (namely read_waveplus.py), yours clearing the changes that fixed issue 4. |
We are, indeed, changing the same file, but the code is basically moved into separate class files and kept the same (for the most part). I am not able to see how my changes invalidates or reverses the fixes in issue 4. |
I just want to jump in here... for nerds like myself, having Python 3 support is super important. I'm looking to deploy these scripts on a Debian 11 server that's hosting a Home Assistant Docker container. Python 3 really is the way to go. So I'd love to see this make it back "upstream" to the primary Airthings project. Not too much trouble for me to have cloned @stenjo's fork, but for newer folks, it would be much better to get direct access to the Python 3 content. Not to mention, having up-to-date code makes a big difference when considering the viability of Airthings products in a self-hosted or tech-savvy world. So... I'd love to see this get merged. I see there's merge conflicts, but are there other reasons this hasn't been merged? |
bump |
Closes #7