๐Ÿ“ฆ dsymonds / garagemon

Garage door automation

โ˜… 0 stars โ‘‚ 0 forks ๐Ÿ‘ 0 watching
๐Ÿ“ฅ Clone https://github.com/dsymonds/garagemon.git
HTTPS git clone https://github.com/dsymonds/garagemon.git
SSH git clone git@github.com:dsymonds/garagemon.git
CLI gh repo clone dsymonds/garagemon
David Symonds David Symonds Fix roughDuration for very short durations. b0128d2 2 years ago ๐Ÿ“ History
๐Ÿ“‚ master View all commits โ†’
๐Ÿ“„ favicon.png
๐Ÿ“„ front.html.tmpl
๐Ÿ“„ garagemon.service
๐Ÿ“„ go.mod
๐Ÿ“„ go.sum
๐Ÿ“„ led-setup.sh
๐Ÿ“„ main_test.go
๐Ÿ“„ main.go
๐Ÿ“„ README.md
๐Ÿ“„ README.md

Garagemon

This is a program to run on a Raspberry Pi for controlling a garage door.

For me, my garage door opener can be triggered by closing a circuit, so a simple relay module is effective.

My specific hardware:

  • Raspberry Pi Zero WH
  • 3 Channel Relay Module Shield Smart Home for Raspberry Pi (Waveshare)
  • Aussie Openers 800N
To configure for that, fill in a garagemon.yaml file like this:

mode: hardware

hardware:
  action_pin: 26
  action_active_low: true
  led_path: /sys/class/leds/led0
  blink_led: true

See main.go:Config for documentation on the structure and details.

Manual use

If the program breaks like

setting up manual control of built-in LED: open /sys/class/leds/led0/trigger: permission denied

then you'll want to permit non-root access to the built-in LED. Run led-setup.sh.

systemd Automation

To have this run all the time from boot, customise garagemon.service and then

sudo cp garagemon.service /lib/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable garagemon.service
sudo systemctl start garagemon.service

Tailscale

If using Tailscale on the Raspberry Pi, pass -net_interface=tailscale0 so HTTP is served only on that interface, isolating it from the local network.