Hi all,
I wanted to share my recent experience setting up a garage door automation using MQTT and HomeAssistant. It’s been a fantastic journey, and I thought I’d walk through my process in case anyone else is looking to do something similar.
The Setup
I have a Hörmann garage door opener with a push button and a photoelectric sensor. Initially, I was using a Shelly 1 to handle the button presses, but I wanted more defined states for the door—like knowing exactly when it was open, closing, or stopped. This led me to explore MQTT integration in HomeAssistant.
The Solution
After some research, I decided to use a Shelly 1 Plus in detached mode. I connected a reed switch to detect when the door was closed and linked it to the Shelly. The Shelly was set up to publish MQTT messages to HomeAssistant, which then handled the state changes and automation.
The Implementation
Here’s a quick overview of what I did:
-
Shelly Configuration
- I set up the Shelly to monitor the reed switch and trigger the garage door opener when needed.
- Defined open and close times to ensure the door had enough time to fully open or close.
- Configured MQTT topics for commands, state updates, and availability.
-
HomeAssistant Integration
- Added the MQTT cover platform to HomeAssistant, specifying the command and state topics.
- Configured availability tracking so I always knew if the system was online.
- Set up optimistic mode to false to ensure accurate state reporting.
-
Automation Rules
- Created rules to handle opening and closing based on button presses and state changes.
- Added safety measures to stop the door if it encountered an obstacle.
The Results
This setup has been working beautifully! I now have precise control over my garage door, with real-time updates in HomeAssistant. It’s incredibly satisfying to see everything working seamlessly, especially after overcoming some initial hurdles like ensuring the MQTT topics were correctly configured.
Tips for Others
- Start Small: Begin with basic MQTT topics and gradually add complexity as you become comfortable.
- Test Thoroughly: Before fully committing, test each component in isolation to ensure it’s working as expected.
- Use Debugging Tools: MQTT clients like MQTT.fx can be invaluable for troubleshooting message flows.
I’d love to hear if anyone else has implemented similar solutions or has tips to improve this setup. Happy automating!
Best regards,
Michael