iomax / homebridge-mqttgaragedoor Goto Github PK
View Code? Open in Web Editor NEWHomebridge accessory plugin that create an HomeKit Garage Door Opener mapped on MQTT topics
License: Apache License 2.0
Homebridge accessory plugin that create an HomeKit Garage Door Opener mapped on MQTT topics
License: Apache License 2.0
Hello,
If the garage is closed and I open it, and I stop it in the middle, then nothing works anymore. How exactly does the plugin work? What values must the various topics have?
Thanks
Ive tried to get my garagedoor to the homebridge but i cant get it running. The device is visible in homekit but i dont get the status of the device.
I have a tasmota sonoff th16, 1 relay POWER1 and 1 reed-switch POWER8 (closed switch) configured (and i want to add POWER7-> opened switch).
At the moment the config looks like this:
{
"accessory": "mqttgaragedoor",
"name": "Doppelgarage",
"url": "192.168.0.XXX:1883",
"username": "",
"password": "",
"caption": "Doppelgarage",
"lwt": "",
"lwtPayload": "lwt Payload",
"topics": {
"statusSet": "cmnd/garagentor_schliesser/POWER1",
"openGet": "cmnd/garagentor_schliesser/POWER8",
"openValue": "ON",
"closedGet": "cmnd/garagentor_schliesser/POWER7",
"closedValue": "ON"
},
"doorRunInSeconds": "40",
"pauseInSeconds": "600"
},
Is there any hint how i could solve that problem?
I dont see any topic-requests when i subscribe to everything in mosquitto.
Is it possible that you post a sample-config?
I'm getting these warnings with the latest HomeBridge version. thanks.
[3/27/2021, 3:47:15 PM] [homebridge-mqttgaragedoor] This plugin generated a warning from the characteristic 'Target Door State': characteristic value expected valid finite number and received "undefined" (undefined). See https://git.io/JtMGR for more info.
[3/27/2021, 3:47:15 PM] [homebridge-mqttgaragedoor] This plugin generated a warning from the characteristic 'Obstruction Detected': characteristic value expected boolean and received undefined. See https://git.io/JtMGR for more info.
Great plugin, well done. Would it be possible to add this to npmjs.com for an easy install into homebridge?
Hey folks i am trying to get this Plugin to work on Homebridge but the Plugin doesn‘t publish mqtt commands to the Broker.
Hope somebody could help me.
Here is my config:
{
"accessory" : "mqttgaragedoor",
"caption" : "Garage",
"topics" : {
"closedGet" : "shellies/shelly1-xxxxx/input/0",
"statusSet" : "shellies/shelly1-xxxxx/relay/0/command",
"closedValue" : "1"
},
"url" : "http://IP:Port",
"doorRunInSeconds" : "22",
"name" : "Garage"
}
I guess, everyone around here use a relay with PulseTime (which works like a push button) directly connected to the garage/gate unit button input.
During “doorRunInSeconds“ (during “Opening” or “Closing”), when I trigger my relay the door actually Stops; only after another click it goes opposite direction (like “Closing”).
When door is fully “Opened” (after “doorRunInSeconds”) “Closing” may be initiated by one click.
I’d like to ask to implement such “two-step logic” mode.
I’m using Sonoff Basic with one reed on GPIO14 to determine “Closed” and have no GPIO to add another one. This way “opening/closing” status in my case would be displayed relevantly.
P.S. It might be ok for a “Stopped” state to change to “Open” after timeout.
P.P.S. The perfect logic would have a timer, which will increase up to ”doorRunInSeconds”, hold on stop and decrease to zero on closing. This way you can predict fully opened state if the door was stopped and triggered around.
Hi,
I would like to use your plugin but I need some help and guidance.
The board I'm using is a custom made board based on Arduino. Right now the board subscribes and listens for commands on the following three topics:
a) Output 1 --> OPEN command --> cmnd/Output1/POWER (ON or OFF)
b) Output 2 --> CLOSE command --> cmnd/Output2/POWER (ON or OFF)
c) Output 3 --> STOP command --> cmnd/Output3/POWER (ON or OFF)
When ON command is received, the relevant output stays ON for 1,5sec and returns back to OFF publishing the status to the mqtt broker.
There is no contact/reed to my setup.
My problem is, I really don't know how to setup the config so that it works with your plugin.
"pauseInSeconds" : "30"
How work this options? I defined the value for 30 seconds but the garage doot did not close.
After using this awesome plugin for several days I have figured out that it will not show a offline device as "Not responding" in home app. If the device is offline I can still toggle it to open or close.
It should be possible to implement. Here one solution for another plugin, that worked great. Might be helpful: MacWyznawca/homebridge-mqtt-switch-tasmota#29
I’ve now got mqttgaragedoor working beautifully with my garage door and Reed switch. I can now replicate the same setup for my electric gate. The only issue I see is purely cosmetic - the icon in the Apple Home app will be a garage door instead of a gate.
Is there any way of changing this icon?
Hi,
Not sure why but I get Stooped as status when opening the door and a orange question mark, seems obstruction is detected but not sure why, did not do any obstruction detection.
Cheers,
Hemant
I have an ESP 8266 that works just fine in mqtt when using as a regular switch. I pass "1" to the setStatus topic activate a relay for a garage door. However, in your plugin, what value is being passed to the setStatus by default and how to I override it to send message "1"?
Nothing I try works
This looks to be the exact plugin I was looking for, but I'm having problems to set it up correctly.
I have a ESP with tasmota firmware. I have connected two reed/magentic switches and one relay.
My config:
"topics": {
"statusSet": "cmnd/sonoff_test/POWER3",
"openGet": "stat/sonoff_test/POWER1",
"openValue": "ON",
"closedGet": "stat/sonoff_test/POWER2",
"closedValue": "ON",
"openStatusCmdTopic": "stat/sonoff_test/POWER1",
"openStatusCmd": "ON",
"closeStatusCmdTopic": "stat/sonoff_test/POWER2",
"closeStatusCmd": "ON"
}
}
]
Open reed switch is the POWER1, closed reed switch is POWER2 and relay is on POWER3.
My logic here was:
I press the icon in home app, POWER3 toggels the relay, the gate started moving and POWER2 turns from ON to OFF. Gate reaches the most open state and POWER1 turns from OFF to ON. Now after 30 seconds my gate automatically starts closing again, POWER1 turns from ON to OFF. Gate reaches closed position POWER2 turns from OFF to ON.
What works
Pressing the icon toggles the relay 👍
Most of the times the POWER 1 turns the state to OPEN
Most of the times the POWER 2 turns the state to CLOSED
The problem
State CLOSING and state OPENING are behaving erratically. Once the OPENING shows, but after that CLOSING doesn't happen and it goes straight from OPEN to CLOSED. Same thing the other way around.
Sometimes if you press the icon and it goes right into OPENING but the gate takes 1-2 seconds until the reed switch is opened. Then the state turns back into CLOSED. How can it turn back into CLOSED when the POWER2 turns from ON to OFF. ON means it is closed, but it sends the command OFF?
And lot's of other similar behaviour what is hard to repeat or understand the logic.
Is my setup wrong?
Maybe a bit of a noob question, but does the "openGet" topic inform homekit of the open/closed status of the garage door? I have a reed switch attached to GPIO14, what should the mqtt command look like?
Hello, maybe i'm a total newbie on homebridge but... I'm not able to install this plugin on my homebridge setup. I've done this steps:
and I get:
2019-05-28T10_57_28_506Z-debug.log
Please help me! thanks
Your plugin works great with 2 Shelly-1 acting as fully-closed and fully-open sensors, and one of them triggering the open/close pulse.
Now my only problem is Garage Door never appears as Unavailable, even when both Shellies go offline. I understand that's what "lwt" is there for, but any advice on how to use it with these devices? This is all the info on Shelly's API page:
Shelly1 MQTT
Shelly1 uses the following topics:
* shellies/shelly1-<deviceid>/relay/0 to report status: on or off
* shellies/shelly1-<deviceid>/relay/0/command accepts on, off or toggle and applies accordingly
* shellies/shelly1-<deviceid>/input/0 reports the state of the SW terminal
* shellies/shelly1-<deviceid>/longpush/0 reports longpush state as 0 or 1
And here's my config:
{
"accessory": "mqttgaragedoor",
"name": "MQTT",
"topics": {
"statusSet": "shellies/shelly1-garage/relay/0/command",
"closedGet": "shellies/shelly1-garage/input/0",
"closedValue": "1",
"openGet": "shellies/shelly2-garage/input/0",
"openValue": "1"
},
"doorRunInSeconds": "10"
},
Thanks!
There is broken json in the configuration code sample of README.md:
The following lines are missing commas at the end to be valid json:
"password": "PASSWORD OF THE BROKER",
"statusSet": "MQTT TOPIC TO SET THE DOOR OPENER",
"openValue": "OPTIONAL VALUE THAT MEANS OPEN (DEFAULT true)",
"closedValue": "OPTIONAL VALUE THAT MEANS CLOSED (DEFAULT true)",
This line has the closing bracket in the wrong spot: (it should be:)
"doorRunInSeconds": "OPEN/CLOSE RUN TIME IN SECONDS (DEFAULT 20)",
While not a major concern, it will probably trip up newbies.
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
I'm getting the following error message when Homebridge runs:
/usr/lib/node_modules/homebridge-mqttgaragedoor/node_modules/mqtt/lib/validations.js:42
for (var i = 0; i < topics.length; i++) {
TypeError: Cannot read property 'length' of undefined
This is my config file:
"accessories": [{
"accessory": "Mqttgarage",
"name": "Garage Door",
"url": "http://1.1..1:1883",
"caption": "Garage Door",
"lwt": "",
"lwtPayload": "lwt Payload",
"topics": {
"statusSet": "garadget/Queenscliff/command",
"openGet": "garadget/Queenscliff/status",
"openValue": "open",
"closedValue": "closed",
"openStatusCmdTopic": "garadget/Queenscliff/command",
"openStatusCmd": "get-status",
"closeStatusCmdTopic": "garadget/Queenscliff/command",
"closeStatusCmd": "get-status"
},
"doorRunInSeconds": "10",
"pauseInSeconds" : ""
}]
I've managed to try some other MQTT Homebridge plugins, so I'm pretty sure I have the syntax right. I'm using a garadget (https://community.garadget.com/t/mqtt-support/3226/5).
Any idea what I'm doing wrong?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.