Hi everyone, I wanted to share my experience with setting up a Shelly Mini Gen 3 relay to control my motorized gate. Ordinarily, the relay is set to a momentary button press to trigger the gate opening, but I wanted to add a toggle functionality that allows me to keep the gate open or close it. This was a bit of a challenge, but I managed to figure it out with some research and experimentation!
First, I looked into creating a custom automation in Home Assistant. I found that using MQTT was the way to go, but I had to admit, I was a bit nervous since I’d never worked with MQTT before. After some research, I discovered that I could use the mqtt component to send commands to the Shelly Mini. I set up a button in the Home Assistant UI that, when pressed, sends an MQTT message to toggle the relay state.
Here’s a quick breakdown of what I did:
- MQTT Configuration: I enabled the MQTT integration in Home Assistant and configured it to connect to my local MQTT broker.
- Shelly Mini Setup: I made sure the Shelly Mini was properly configured in Home Assistant and noted its MQTT topic for sending commands.
- Automation Script: I created an automation that listens for a button press in the UI and triggers an MQTT message to toggle the relay.
This setup now allows me to have a seamless experience with my gate, switching between momentary and toggle modes as needed. It’s been a great learning experience, and I’m excited to explore more automation possibilities with my Shelly devices!
If anyone has questions or suggestions, feel free to reach out. I’d love to hear how others have tackled similar projects!