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

Set GPIO pin state when initialising #50

Open Mustard opened 2 years ago

Mustard commented 2 years ago

Hi,

I'm using the invert_relay: true option as my relay module needs to be pulled down to ground to turn on

Currently the GPIO output is set some time after it is initialised, this meant on restart (say a power loss etc) the relay would briefly toggle resulting in the garage door opening.

This is a small change to set the state when the initialising the GPIO pin, I also added hardware pull ups in my case

I have some other changes locally, upgrading to python3 etc, would you be interesting in accepting those later?

Cheers, Dan

Mustard commented 2 years ago

Ah, seems I have independently discovered https://github.com/jerrod-lankford/GarageQTPi/pull/44