Closed aquadat0r closed 6 years ago
To understand if this plugins can be good for your case you need to understand if and what information is advertised via MQTT by your garage opener.
@iomax thanks, in summary I have the following topics available on my garagedoor opener and MQTT topics.
publish cmnd/sonoff-gate/POWER ON
to open/close garagedoor (this is momentary for 1 sec, like a push button). The stat/sonoff-gate/POWER = ON
topic is updated to acknowledge the command but reverts back to stat/sonoff-gate/POWER = OFF
after the momentary 1 sec.
As for my reed switch to indicate the state of the garage door, it returns the following:
Garagedoor open - cmnd/garagedoor/POWER2 = ON
Garagedoor closed - cmnd/garagedoor/POWER2 = OFF
Essentially this is needed as the garagedoor switch is only a toggle ('equavalent of pushing a remote control button') which means it is stateless. The reedswitch enables me to know if the garagedoor is open or closed.
This is my current config but does not behave as expected.
{ "accessory": "mqttgaragedoor", "name": "Garage Door", "url": "mqtt://192.168.1.86", "username": "user", "password": "****", "caption": "Garage Door", "doorRunInSeconds": 5, "topics": { "statusSet": "cmnd/sonoff-gate/POWER", "openGet": "cmnd/garagedoor/POWER2", "closedGet": "cmnd/garagedoor/POWER2", "openValue": true, "closedValue": false, "openStatusCmdTopic": "cmnd/garagedoor/POWER2", "closeStatusCmdTopic": "cmnd/garagedoor/POWER2" } }
I'd try
{ "accessory": "mqttgaragedoor", "name": "Garage Door", "url": "mqtt://192.168.1.86", "username": "user", "password": "****", "caption": "Garage Door", "doorRunInSeconds": 5, "topics": { "statusSet": "cmnd/sonoff-gate/POWER", "openGet": "cmnd/garagedoor/POWER2", "openValue": "ON", } }
two more things :
in cases where only one state (reed)switch is used, the use of "openGet" instead of "closedGet" should be chosen based on the physical positioning of the switch on the port
"doorRunInSeconds" : 5 ( = 5 sec. ) sound to me too fast to real match the door running time .. I'd like to thinks to it as 20 or 30 sec. in real life.
Thanks, worked like a charm. Just to confirm, if a second reed switch is used with a different topic, then both openGet and closedGet should be used?
yes, if you have two switches, one that shows the closed state and one that shows the full open state, you can use the two topics appropriately.
Thanks
It really helped not to use both openGet and closedGet, when I got one reed switch only :) It also helped to use closedGet, so the accessory status updates instantly when reed actualy senses "Closed".
Great job! I've tried 4 other packages.. Your works out of the box with Sonoff Basic Tasmota + reed on GPIO14!
Please do publish the package on npmjs.com for easy install/update via HomeBridge UI.
Hi there,
Please can you clarify some of the config parameters. I have a reedswitch connected to my garageopener to detect if it is in an open or closed state. The trigger/switch is very much a push mechanism, push to open, push to close dependent on whether the door is open/closed. Can this be done with this plugin?
Thanks