PRJ · 2019
Smart Garage Hack
A Sonoff SV garage-door controller on Home Assistant, MQTT and Alexa: monitored as well as controlled. Design later sold.

The problem
Two practical ones: never wondering whether the garage door was left open, and letting someone in when I'm not home. I also wanted the door's history over time, along with temperature and humidity — not just a remote button (yes, the clicker works fine).
The build
- Controller: an Itead Sonoff SV flashed with Sonoff-Tasmota firmware, housed in a soap-box enclosure.
- Door state: a wired magnetic reed switch, with the magnet mounted on the door itself.
- Environment: a DHT11 temperature and humidity sensor on GPIO4.
- Integration: MQTT into Home Assistant as a garage-door cover, with Amazon Alexa voice commands ("OK, opening garage door one") through Home Assistant intent scripts.
One design choice worth copying
The relay switches itself off after one second using a rule on the Sonoff, instead of waiting for Home Assistant to send an off command over MQTT. That saved 300–400 ms, removed an external dependency, and means a lost message can never leave the opener's button held down.
Outcome
An intermediate build of about two hours. I later sold the design and concepts to an investor.
The full build — wiring, Tasmota commands and the Home Assistant configuration — is on Hackster. Code: the Sonoff SV sketch and the MQTT Sonoff configurations.
