Garage door automation with multiple sensors

I have used the Taasmota app and a sonoff module that allows me to send an impulse over MQTT to open my garage door. Currently, I have it set up as a light that reverts to “off” 2 seconds after it receives an ON-command.

This works nicely; I just tell google to “turn on the garage door” and it opens, closes or stops the garage door when it receives the command.

With the goal of being able to treat it as a door, to tell it to open/close or lock/unlock I’ve attached a Xiaomi vibration sensor that gives the tilt-value of the door to homey.

My thought was to use that as a sensor to judge if the door is open or closed, combining that with a switch that allows me to input the impulse. As two separate devices, it works perfectly using virtual devices; I can have it as a “lock” with the state unlock/lock changing depending of the status of the garage door.

  • Lock/unlock pressed> operate the garage door
  • Tilt changes > change status of door to locked/unlocked depending on tilt. (LOOP; setting status to lock/unlock is considered as a button press)

However, I cannot use the same device to send the instruction, this is because the tilt sensor sets the garage door to “unlocked/locked” when a change in orientation is detected when this happens the garage door, that is triggered based on the lock/unlock command triggers again, essentially creating a loop of the door going up and down.

Is there any smarter way to build this logic so that the intended goal is reached?

Hi,

Did you find a solution?

I have a Shelly 1 for operating the garage door and a fibaro doorsensor which I would like to use for the open/close status of the door.

Thanks.

Hi,
I am also looking for a solution here. I currently have a sonoff SV with HAA soft and it presents in Homekit as a garage door/gate. However, I would like to flash the sonoff with Tasmota (hoping for better stability) but would like to maintain the ability for it to present itself as a door rather than an on/off switch.

Sounds like a virtual device [App][Pro] Virtual Devices may be of use as an alternate representation.


Use your door sensor and a flow to set a logic value, a yes/no one. There was a quirk with the shelly 1 in the app and the above shows the workaround. I have an else section so that if the door already open I get a push notification telling me it is already open

I tried a similar solution, however it created a loop where the flow wrote the open/close value but the change of that value triggered the open/close action.

Your flow shouldn’t be writing any values, just reading them