Controlling a garage door through relays & mqtt (for integration with HomeAssistant)
Based on the work of Nickduino / Pi-Somfy https://github.com/Nickduino/Pi-Somfy
There are two ways to run 'Pi-Garage':
- Regular way (python3 on raspbian as pi-user)
- Within docker (and using the hosts pigpiod-service)
In case you run into errors with dependencies, please check the Pi-Somfy-readme which this project is based on.
Copy the pi-garage.service from this project to your user homefolder in '.config/systemd/user/', e.g.: /home/pi/.config/systemd/user/pi-garage.service
You might want to edit the paths if they differ from mine.
Then you might have to reload systemd (user):
systemctl --user daemon-reload
If you want to start the service on boot, run as root:
loginctl enable-linger <user>
Then also enable the service (and start it if you like):
systemctl --user enable pi-garage
systemctl --user start pi-garage
First, install docker-ce (preferably via the script).
bash dockernetwork.command
bash dockerbuild.command
sudo systemctl edit pigpiod
[Service]
ExecStart=
ExecStart=/usr/bin/pigpiod -n localhost -n 172.18.0.2
then daemon-reload systemd and restart the service:
sudo systemctl daemon-reload
sudo systemctl restart pigpiod
Afterwards, you can check using ps -ef
if the service is running with the correct arguments.
bash dockerrun.command
If there is no 'operateGarage.conf' yet, it will be created in the data-folder. You can modify the related GPIO-settings according to your setup.