My garagedoor opener use a puls to open/close.
I have a relay inserted in the chain. So when I push a button (or ask Google). It will trigger the relay, which will shortcircut the contact of the relay, letting the puls to the garagedoor opener. And it will start to move. My garagedoor opener does not have a state in return. (its an Marantech 252.2 comfort).
The issue is.
I do not know which way it actually moves. If last trigger was closing, then the door will be opening, and vice versa. But if there fore some reason is beeing send two pulses, then the door will start moving and stop somewhere in between.
Now, what I have done to somehow have a sligt overview of this. I have placed a wireless contact at the bottom and another one at the top of the door. (actual the contact switches are placed on the operator rail, cause the contact sensors are magnetic, and can be mounted without screews, glue etc. And then the magnet itself is placed at the Door link). See picture:
(picture is sligthly different as I only use two contacts).
This tells me wheter the door is fully closed or fully open. And if none of this is true, it tells me, the door position is somewhere in between (meaing, the door is open or “on the move”).
In OH I have a rule, (with great help from Rich), where I can tell, if the door three states, (fully open, fully closed or “on the move”). Its works great.
Here is the rule:
// Rule for status notification (light) of the GaragePort
rule "Garageport moving"
when
Item GaragePortBottomSensor_item changed or
Item GaragePortTopSensor_item changed
then
logInfo("Debug", "garageportbottom sensor is " + GaragePortBottomSensor_item + " garageportTop sensor is " + GaragePortTopSensor_item)
// default to the door is NOT moving
var moving = false
var lightState = OFF
// If either sensor is OPEN then the door IS moving
if(GaragePortBottomSensor_item.state.toString == "OPEN" && GaragePortTopSensor_item.state.toString == "OPEN") {
moving = true
lightState = ON
sendPushoverMessage(pushoverBuilder("Garageporten er i bevægelse!").withSound("none"))
}
// Figure out if the door is fully open or fully closed or on the move
var message = "on the move"
if(GaragePortBottomSensor_item.state.toString == "CLOSED") {
message = "fully closed"
GaragePortBottomLight.sendCommand(ON)
sendPushoverMessage(pushoverBuilder("Garageporten er helt lukket!").withSound("none"))
}
else
{
GaragePortBottomLight.sendCommand(OFF)
}
if(GaragePortTopSensor_item.state.toString == "CLOSED") {
message = "fully open"
GaragePortTopLight.sendCommand(ON)
sendPushoverMessage(pushoverBuilder("Garageporten er helt åben!").withSound("none"))
}
else
{
GaragePortTopLight.sendCommand(OFF)
}
// change the status light and send the log.
GaragePortMovingLight.sendCommand(lightState)
logInfo("garageport.status", "garageport is " + message)
end
As notice, this rule sends a pushover msg each time the garagedoor change position.
Also notice I have proxy items, cause the switches are flickering too much when they activate/deactivate, so I have a second rule, where I proxy the main contact switches.
EDIT - What I´m still missing it to be able to use “open/close garagedoor” command in Google insted of “turn on garagedoor”. I havn´t got to that yet. Mainly because I got so use to just say “turn on garagedoor”
I use it every day from AA in my car, when arriving home.