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

Autostart and relay invert #12

Closed tagno25 closed 7 years ago

tagno25 commented 7 years ago

I added support for inverting the relay logic (new default is relay pin off by default), and created an autostart script for systemd. I also changed the config file from using the working directory to using the same directory as the main.py file.

jerrod-lankford commented 7 years ago

I haven't forgotten about the PR. Thanks for this! I want to test it before I merge but I've been busy lately. I'll try to get to it tomorrow.

tagno25 commented 7 years ago

Had to add a few lines to the service file to restart after a crash, because if the MQTT server was unresponsive the service would crash.

jerrod-lankford commented 7 years ago

@tagno25 I have not had a chance to test this PR I'm so sorry. I promise ill check it out this weekend :)

jerrod-lankford commented 7 years ago

I left one comment. When that is resolved i will merge the PR.

tagno25 commented 7 years ago

I have not been able to find the comment with the issue.

jerrod-lankford commented 7 years ago

I was just asking if line five of autostart_systemd.sh should be changed from:

systemctl enable home-assistant@`whoami`

to

systemctl enable garageqtpi@`whoami`.service

tagno25 commented 7 years ago

It doesn't have to have the .service at the end, but it may make it simpler to read and understand...

Fixing now

jerrod-lankford commented 7 years ago

But its home-assist@`whoami`. Shouldnt it be garageqtpi@`whoami`?

jerrod-lankford commented 7 years ago

Excellent thanks. Merging

tagno25 commented 7 years ago

Sorry, I noticed that it had the wrong service name after making the previous comment

jerrod-lankford commented 7 years ago

Np! Thanks again