DIY Smart Home - Ep#7 | Smart Garage Door Solutions | How to with no fees or cloud



We added a bit of DIY automation to the garage door for minimal costs and of course without any fees or forced cloud control  Taking a deep dive for the new folks to the DIY Garage scene and for the semi-DIY'ers we also show some other easy solutions.

Parts


Tasmota Garage Setup & Rules (for easy copy and paste from the video)

Shelly1 Users! See the Section at the bottom of this Post for modified rules/commands

switchmode2 1
poweronstate 0
setoption0 0
pulsetime1 10

(This rule below should all be pasted at one time)
Rule1 on switch2#state=0 do publish2 stat/%topic%/status closed endon on switch2#state=1 do publish2 stat/%topic%/status open endon

Turn on the rule with this command:

Rule1 1

Sample YAML Config

cover:
  - platformmqtt
    name"Garage Door"
    command_topic"cmnd/GarageDoor/POWER"
    state_topic"stat/GarageDoor/status"
    availability_topic"tele/GarageDoor/LWT"
    qos1
    payload_available"Online"
    payload_not_available"Offline"
    payload_open"ON"
    payload_close"ON"
    payload_stop"ON"
    state_open"open"
    state_closed"closed"
    device_classgarage

Change the MQTT Topic of "GarageDoor" in all three spots if  you use a different topic in the Tasmota MQTT Config

How to Utilize a Wireless Door/Window Sensor (Wyze, Zwave, Zigbee, 433mhz etc)

Setup the wireless sensor in Home Assistant and verify it is working.  The switch2 rule and setup of the wired reed sensor will not be needed in Tasmota.  You will still need the pulsetime1 command done to only make the relay toggle for the short period to simulate the garage door button push.  

Create an automation in Home Assistant either via the YAML editor or Automation GUI as follows.  Edit the binary_sensor and MQTT topic name as needed. This will push the state of the wireless sensor state changes into MQTT which Home Assistant will then read as an all in one sensor/relay from the Garage Door.  A small but quick loop around trick!  

YAML Method

id'15912322314808'
  aliasReed2MQTT
  description''
  trigger:
  - entity_idbinary_sensor.wyzebenchreed
    platformstate
  action:
  - data:
      payload_template"{{ states.binary_sensor.wyzebenchreed.state }}"
      topicstat/GarageDoor/status
    servicemqtt.publish

GUI Method
















YAML Config (small change to state payloads)

cover:
  - platformmqtt
    name"Garage Door"
    command_topic"cmnd/GarageDoor/POWER"
    state_topic"stat/GarageDoor/status"
    availability_topic"tele/GarageDoor/LWT"
    qos1
    payload_available"Online"
    payload_not_available"Offline"
    payload_open"ON"
    payload_close"ON"
    payload_stop"ON"
    state_open"on"
    state_closed"off"
    device_classgarage


Shelly 1 Tasmota Garage Setup & Rules (for easy copy and paste from the video)

switchmode1 2
poweronstate 0
setoption0 0
pulsetime1 10

(This rule below should all be pasted at one time)
Rule1 on switch1#state=0 do publish2 stat/%topic%/status closed endon on switch1#state=1 do publish2 stat/%topic%/status open endon

Turn on the rule with this command:

Rule1 1

Sample YAML Config

cover:
  - platformmqtt
    name"Garage Door"
    command_topic"cmnd/GarageDoor/POWER"
    state_topic"stat/GarageDoor/status"
    availability_topic"tele/GarageDoor/LWT"
    qos1
    payload_available"Online"
    payload_not_available"Offline"
    payload_open"ON"
    payload_close"ON"
    payload_stop"ON"
    state_open"open"
    state_closed"closed"
    device_classgarage


-=-=-=-Products We Use/Recommend-=-=-=-

-=-=-=-Come chat with us!-=-=-=-

Comments

  1. Hey,

    I have subscribed to your channel on youtube and looked just the latest videos of smart garage door. I have a similar project where I am installing in my warehouse electric lock.
    But I'm having trouble getting the lock reed switch to work.

    I also have a tasmotised sonoff sv which is modified in isolated mode and the reed switch is connected to the gpio 14 pin.

    I know the reed switch works and I have the right cables connected because if I move the door then sonoff sv behaves the same as in your video before you modified the settings from the console.

    Can you help me get the reed switch to work in sonoff sv and get the information about the door status sent to the home assistant.
    Best regards
    Mika Nenonen

    ReplyDelete
    Replies
    1. That might not be bad to solve but probably easier to jump into the discord chat server and hit me up instead of the messaging back and forth here.

      Delete
  2. Thanks for the great tutorial!

    I am having trouble with the Home Assistant portion. When I paste the yaml into config.yaml my entity shows an error. It shows unavailable. I used the all the same names but I don't get the arrows in HA.

    Any thoughts?

    Thanks!

    ReplyDelete
    Replies
    1. It might help to jump into the discord chat with the link above but in the meantime. Make sure the availability topic matches yours in your Tasmota device. A real easy way is to go to the console of Tasmota and type "restart 1" (no quotes) and hit enter. It will reboot and look for the LWT = online message. Make sure yours matches.

      Delete
  3. This comment has been removed by the author.

    ReplyDelete
  4. Thanks for this great tutorial. I have sonoff SV. The reed switch is located at the opener so I used switchmode2 2 indicating that when the circuit is closed the door is open and vice versa. Hopefully I got that right. When opening the door, I am seeing the rule trigger and the correct state (open) being sent but then immediately is reverts back to closed. I have reset the SV and redone the SV 2x and keep getting this issue. Here is the console output:

    00:39:12 MQT: stat/GarageDoor/POWER = ON
    00:39:13 MQT: stat/GarageDoor/RESULT = {"POWER":"OFF"}
    00:39:13 MQT: stat/GarageDoor/POWER = OFF
    00:39:32 MQT: stat/GarageDoor/RESULT = {"POWER":"ON"}
    00:39:32 MQT: stat/GarageDoor/POWER = ON
    00:39:33 MQT: stat/GarageDoor/RESULT = {"POWER":"OFF"}
    00:39:33 MQT: stat/GarageDoor/POWER = OFF
    00:39:37 RUL: SWITCH2#STATE=1 performs "publish2 stat/GarageDoor/status open"
    00:39:37 MQT: stat/GarageDoor/status = open (retained)
    00:39:37 RUL: SWITCH2#STATE=0 performs "publish2 stat/GarageDoor/status closed"
    00:39:37 MQT: stat/GarageDoor/status = closed (retained)

    The garage door is opening, setting the status to open and then flipping it right back to closed. Do you know what is causing this?

    ReplyDelete
    Replies
    1. Something with your reed sensor I would suspect. You can easily see if you take the two wires of the reed switch and twist them together...then open them up, see if they toggle by themselves .

      Delete
    2. Yep that was it. I had them mounted horizontally. When I moved them to a vertical mount they work fine. Thanks!

      Delete
  5. Great tutorial. I built 2 of them at the same time for both garage doors and they work great. I always expect working with HA that there is going to be some bugs to work out but not this time. It all worked exactly as expected.

    ReplyDelete

Post a Comment

Popular posts from this blog

Tuya Convert 2.3 Update | Flash Tuya Smartlife Devices | No Soldering! | Remove the cloud | Custom Firmware

How to use the Sonoff Zigbee Bridge with Home Assistant

Tuya Convert 2 - Flash Tuya Smartlife Devices - No Soldering - Remove the cloud with Tasmota ESPHome