Best setup for a garage door?


#1

Hey @igor,

Can you recommend how best to setup a garage door as a single widget?
These are my 2 items in OpenHAB…

Contact GarageContact "Garage" <garagedoor2> (AllItems, LogRRD4J) {mqtt="<[mosquitto:/ESP_Easy_03/ReedSwitch/Open:state:OPEN:1],<[mosquitto:/ESP_Easy_03/ReedSwitch/Open:state:CLOSED:0]"}
Switch GarageButton "Garage Door" [ "Lighting" ] { http=">[*:POST:http://192.168.1.223/control?cmd=Pulse,5,1,500]" }

The button just sends a 500ms pulse to the relay which closes and then opens a contact which kicks the garage door motor into motion. And then the contact just gives me open/close status.

Can I incorporate these into one widget yet?


#2

Same problem here. Would be great if there will be a widget combining a contact and a switch button.


#3

There is actually a proper item in OpenHAB for that, and a widget in HomeHabit that goes with it. The widget has 3 buttons though: up, down and stop.


#4

@TommySharp/@Boogieman is this something you can do in your setup?


#5

Hi Igor, I’m guessing Flole is talking about the Rollershutter item in openhab…
This won’t work for me as I understand it’s for roller shutters which are aware what percentage of open they are and has separate controls to open or close.

My door motor just has a single circuit which wen closed acitvates the door motor. If the door was closed then it will start opening it… If it was open then it will close it…
It’s not really designed to have the door half open or anything like that.

So in HomeHabit I’d be looking for a widget that mainly shows the status of a contact being open or closed… But when tapped acts as a switch but does not try and show the on/off status of the switch because in reality the switch goes on for a second and then straight off to activate the relay.

Does this make any sense?


#6

I got exactly the same setup like @TommySharp

Only a switch which only react on a ON (with autoupdate=false) to get an impulse for closing OR opening the garagedoor.

Switch Schalter_Garagentor "Schalter Garagentor" (gGarage) {channel="homematic:HmIP-PCBS:e47d1dc1:0004570993E81A:3#STATE",autoupdate="false"}

And e separately contact to get the state (open/close)

Contact Kontakt_Garage "Garagentor [MAP(homematic_de.map):%s]" <garagedoor> (gGarage,gSicherheit,gKontakte) {channel="homematic:HMIP-SWDO:e47d1dc1:0000D7099A1688:1#STATE_CONTACT"}

Therefore the rollershutter widget won’t solve the problem.


#7

But here is an idea to get around

First step -> create a proxy item (with no binding)

Rollershutter garage_proxy

Using the existing items for contact and switch

Switch garage_button {binding}
Contact garage_contact {bindning}

Creating rule to convert the up/stop/down rollershutter commands to the garage_button switch

rule "garage rollershutter proxy to switch"
when Item garage_proxy received command
then    if (receivedCommand == UP) {
        garage_button.sendCommand(ON)
        }
        if (receivedCommand == STOP) {
        garage_button.sendCommand(ON)
        }
        if (receivedCommand == DOWN) {
        garage_button.sendCommand(ON)
        }
end

Creating rule to update proxy item state from contact state

rule "garage contact to rollershutter proxy"
when Item garage_contact changed
then    if (garage_contact.state == OPEN) {garage_proxy.postUpdate(0)}
        if (garage_contact.state == CLOSED) {garage_proxy.postUpdate(100)}
end

And now create a 1x1 rollershutter widget in HomeHabit using the garage_proxy.

Tried it -> works like a charm :slight_smile:


#8

I have the exact same setup and as I am using MQTT I am able to map OPEN and CLOSE directly to 0 and 100, this works absolutely great (which is why I suggested this).


#9

Mapping the state open/close ist not the problem. But how do you open or close the garage door.
The problem is the use of two different Openhab items in one widget.
And about this problem i think my solution ist the only one.
If you have only one “rollershutter” Item there is no problem, but If you have two items like me, contact to get the state and an extra switch for opening, there is no other solution.


#10

So does this mean we can get something to work or is it still not possible to do it all in one widget?


#11

If you use my option with the proxy item it will work.