Garage door opener using Shelly 1

Moderator: leecollings

Post Reply
MikeF
Posts: 350
Joined: Sunday 19 April 2015 0:36
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.2
Location: UK
Contact:

Garage door opener using Shelly 1

Post by MikeF »

I have created a garage door opener, using a Shelly 1, flashed with Tasmota, with a simple magnetic reed switch to detect whether the door is open or not. For the purposes of safety, I am using a 12V DC power supply, rather than 240V AC mains. I am using it with a Garador (UK) / Hormann door, which can be operated manually with a simple push-button 'impulse' switch wired to the actuator. It should be possible to use this with other garage door actuators, which can be operated with an impulse switch, but I accept no liability for any issues which may occur implementing this approach!

The Shelly is wired up as follows:

Image

The Shelly relay contacts are 'dry' (zero volt), and can be connected to the garage door actuator in parallel with, or in place of, the existing impulse switch. The Shelly can be configured to send a 1-second pulse to the garage door actuator, and such that the reed switch does not trigger the relay, but instead sends an MQTT message to Domoticz (for which you will need an MQTT broker in your system).

Prerequisites
  • Magnetic reed switch, fixed in a position to detect opening of the garage door
  • Dummy Domoticz switch, type Light/switch, Push On Button - note the IDX for Tasmota configuration. This will be the switch device in Domoticz for operating the garage door
  • Dummy Domoticz switch, type Light/switch, Contact - note the IDX for Tasmota configuration. This will show the status of the garage door (open / closed)
  • MQTT broker
Tasmota configuration
Go to the Tasmota web UI, select Configuration > Domoticz, and enter the first IDX above in Idx 1, Save, and return to Main Menu.

Enter the following in the Tasmota web UI Console (one line at a time, press Enter at the end of each line):

Code: Select all

switchmode1 1
poweronstate 0
setoption0 0
pulsetime1 10
- this last command will turn the relay on then off after 1 second (= 10 * 0.1)
Then enter the following:

Code: Select all

setoption114 1
- this will cause the Shelly to publish an MQTT message, instead of switching the relay when the reed switch opens / closes.
Now enter the following, all on one line (again, press Enter at the end):

Code: Select all

rule1 on switch1#state=0 do publish domoticz/in {"command": "switchlight", "idx": XXX, "switchcmd": "Off" } endon on switch1#state=1 do publish domoticz/in {"command": "switchlight", "idx": XXX, "switchcmd": "On" } endon
- where XXX is the IDX of the second dummy switch created above.
Finally, enter

Code: Select all

rule1 1
- and you should be good to go!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest