jerrod-lankford / GarageQTPi

An MQTT server for a raspberry pi garage door opener. Most commonly used as a HomeAssistant cover component.
MIT License
75 stars 36 forks source link

Convert to Python 3 #38

Closed bg1000 closed 4 years ago

bg1000 commented 4 years ago

This request converts from python2 to python3 and updates the libraries in requirements.txt to current versions.

bg1000 commented 4 years ago

@Jerrkawz Forgot to add that in addition to getting this more up to update this is in preparation for a couple of additional changes I would like to make: 1) Add support for home assistant availability topic - This code is already in the master branch of my fork and I am using it. 2) Add support for opening and closing states which will be added to the mqtt cover in the next release of home assistant. The initial work for this is in the opening-closing branch which I plan to test once the beta for the next release comes out.

jerrod-lankford commented 4 years ago

Looks fine, curious about the .bak files, github maintains revision history if we really needed to go back. I no longer run this myself, i moved and my new house came with a wifi garage door opener already installed so I trust that you test and use this enough to know it works.

bg1000 commented 4 years ago

@Jerrkawz thanks for the reply. I ran 2to3 on the code to get the conversion started which I think is where those .bak files came from. I agree they can be deleted. I figured you weren't going to respond and have made additional changes in my fork at this point. These include support for an availability topic and opening and closing states for the doors (with the addition of a second switch). I have a couple of additional things planned. Since you're not using this anymore I'm not sure if you want me to submit pull requests for all this or not. I can just maintain this as a fork if that would be better for you. Please let me know.