Pete's Blog Tiny Tasmota Garage Door Opener - Temperature Sensor - 2 contact sensors

Blog posts by pete_c

pete_c

Guru
This is a redo / rebuilt of a Tasmota Sonoff Basic generation 1 that has been working now for 3+ years.

This works fine with the Tasmota web interface, Homeseer 3-4 and Home Assistant.
Note with the Sonoff Basic R1 cut the 120VAC traces of the board with a small saw.
sonoffbasicr1.jpg

You need some soldering skills for this project.
This is being done to take the MyQ GDO off of the Internet. I also have the OmniPro 2 panel connected to the garage door opener and sensors.
Sandbox house is using the MyQ GDO (2 years now)

Hardware: (all items purchased on Amazon)

Wemos mini D1
Wemos mini D1 relay hat
WemosMiniD1andRelayHat.jpg

DS18x20 temperature sensor. Here soldered the drop down resistor between data pin and vcc and extended 3 wires about 8" or so from Wemos D1 Mini. I heat shrink wrapped the end of the sensor with resistor. Doing a second one and will take some granular pictures of it.

DS18B20.jpg
2 contact magnetic reed sensors

contactsensor.jpg

Modified garage door button for my garage door opener.
LiftMaster 883LMW Wall-Mounted Wired Push Garage Door Opener and Doorbell Button with Light Button *
* Must be LiftMaster branded garage door opener button. This is the modification to convert digital button to analog.

digitaltoanalog2.jpg


6 port electrical outlet with USB ports. This is the one I purchased and using.

outlet.jpg

Drawing of wiring for relay hat when soldered in to place. D1 is GPIO 5.

relayhat.jpg
Wiring drawing - pics - made two of them.

1 - solder the Relay hat over the Wemo Mini D1 - pin label to pin label.

WemoxD1MiniX2.jpg

2 - diagram of pins used.

GDO-Sensors-Temp.jpg

3 - DS1820B20 - rewire to short cable - noticed when wired directly to Wemos D1 Mini sensor was too warm.

4 - Tasmota configuration with one reed sensor connected. Note "toggle 2" is reed switch 1. When garage door opens it goes to "on"

Tasmota commands in console specific to GDO.

pulsetime1 1
This makes the devices relay activates for a second, The garage door will think it’s you pushing a button.

Switchretain 1
This will make it so that Home Assistant gets the last state from the door sensor after a reboot.

Powerretain 1
This will stop the relay from randomly triggering when the Sonoff disconnects and reconnects to the MQTT broker.

poweronstate 0

switchmode1 2
switchmode2 2

poweronstate 0


Rules:

Switch1
Rule1 on switch1#state=0 do publish2 stat/%topic%/status open endon on switch1#state=1 do publish2 stat/%topic%/status closed endon
rule1 1

Switch2
Rule2 on switch2#state=0 do publish2 stat/%topic%/status open endon on switch2#state=1 do publish2 stat/%topic%/status closed endon
Rule2 1

tasmota.jpg
 
Last edited:
Configuration using Home Assistant Cover.

This is what I see using devices created by the mini GDO with temperature sensor. First entity is the button to open the garage door.
Second entity is the reed sensor.
IE: switch.tasmota is the button and switch.tasmota2 is the reed switch.

HA-GDO1TP.jpg

Put this in my configuration.yaml file.

Code:
cover:
  - platform: template
    covers:
      garage_doortp:
        device_class: garage
        friendly_name: "Garage Door TP"
        value_template: "{{ is_state('switch.tasmota2', 'on') }}"
        open_cover:
          service: switch.turn_on
          entity_id: switch.tasmota
        close_cover:
          service: switch.turn_on
          entity_id: switch.tasmota
        stop_cover:
          service: switch.turn_on
          entity_id: switch.tasmota

Code:
icon_template: >-
          {% if is_state('switch.tasmota2', 'on') %}
            mdi:garage-open
          {% else %}
            mdi:garage
          {% endif %}

After restart now have a cover entity which I called cover for time bean. It has an up, stop and down button.

The issue I had was that it automagically created a cover for the myQ garage door opener in house two.

I have Amcrest PT cameras in each garage looking at the garage doors in each house. This helps me validate function of the new GDO.

cover1.jpg

garage2.jpg
 
Last edited:
Enclosure for new combo GDO.

garage-door-opener.jpg

21d8584c5713514e2323aa789ebe7a49_preview_featured.jpg


6bf632b22f31e06487e6689b4def7533_preview_featured.jpg


011e3eeacd721b2af89029c3f4c64fac_preview_featured.jpg
 
Back
Top