Comments (39)
Added Online/Offline detection :
- offline will follow mqtt "last will and testament" topic and showed as "Not Responding"
- any activity on <open/closed>Get topic will clear the "Not Responding" state.
from homebridge-mqttgaragedoor.
"<open/close>StatusCmdTopic" to "force" a feeback by the remote device about the open/closed state.
It will be usefull to keep plugin updated about the door state.
from homebridge-mqttgaragedoor.
I dind't find the "code" to put the accessory in the "Not Responding" state.
Let me to study what about at the link.
from homebridge-mqttgaragedoor.
I'm using 'mqtt-switch-tasmota' too for basic switches/lighting.
The feature request is all about:
"activityTopic": "tele/sonoff/LWT",
"activityParameter": "Online", <- this one depends on locale
Line 141: https://github.com/MacWyznawca/homebridge-mqtt-switch-tasmota/blob/master/index.js
When mqtt-response != "Online", device is then marked for HomeKit as offline.
This behavior dramatically reduces HomeKit querying, when using several devices.
Otherwise all devices, attached to same Homebridge, may become stuck in Home.app at "Updating" state for 15-30 sec.
from homebridge-mqttgaragedoor.
I'm working around it. Not strictly related to the tamota features but inline with the mqtt lwt feature.
from homebridge-mqttgaragedoor.
@Kepete Did you finally make a garage door opener based on the device from the tasmota firmware and sensors or other solutions? I am looking for a working solution all the time and I can not find anything. Will you help me?
example: wemos d1 mini + relay + reed sensor / pir sensor
from homebridge-mqttgaragedoor.
@iomax I will check the Online/Offline detection in the weekend :)
@mientki Yes I have a working solution running, very happy with it! Thought it was a little tricky.
I have a NodeMCU v2 flashed with Tasmota, one relay, two reed sensors, temp sensor.
The configuration looks like this:
Switch1
and switch2
are the reed sensors for door fully open
or door fully closed
. They need to have relay1 and relay2 also specified, otherwise the Tasmota will not give you a separate MQTT topic. Only the relay3
is an actual relay and is used to open the garage door. Temperature sensor is optional.
Plugin configuration looks like this:
{
"accessory": "mqttgaragedoor",
"name": "Garage door",
"url": "mqtt://x.x.x.x",
"username": "usr",
"password": "pswd",
"caption": "Garage door",
"topics": {
"statusSet": "cmnd/sonoff_garage/POWER3",
"openGet": "stat/sonoff_garage/POWER2",
"openValue": "ON",
"closedGet": "stat/sonoff_garage/POWER1",
"closedValue": "ON"
},
"doorRunInSeconds": "20"
}
As pointed out here before. You still need the doorRunInSeconds
but it updates the state to fully closed or fully open as soon as a switch1 or switch2 hit's ON value.
Make sure when setting up that the values for your reed switches are correct. If not inverse them with Tasmota interface by toggeling ON/OFF.
Should be exactly the same on WeMos. Let me know if you need more help or got it working!
from homebridge-mqttgaragedoor.
Thank you for a quick and comprehensive answer. If you have any questions, they will write to you. Is there another channel of communication with you? Only GitHub?
from homebridge-mqttgaragedoor.
@Kepete just a quick check at tasmota wiki but maybe I'd update config in somethings like :
{
"accessory": "mqttgaragedoor",
"name": "Garage door",
"url": "mqtt://x.x.x.x",
"username": "usr",
"password": "pswd",
"caption": "Garage door",
"lwt": "/lwt",
"lwtPayload": "offline",
"topics": {
"statusSet": "cmnd/sonoff_garage/POWER3",
"openGet": "stat/sonoff_garage/POWER2",
"openValue": "ON",
"closedGet": "stat/sonoff_garage/POWER1",
"closedValue": "ON",
"openStatusCmdTopic": "cmnd/sonoff_garage/POWER2",
"closeStatusCmdTopic": "cmnd/sonoff_garage/POWER1"
},
"doorRunInSeconds": "20"
}
from homebridge-mqttgaragedoor.
@iomax Thanks for pointing out, but actually I don't understand- what for are these needed?
"openStatusCmdTopic": "cmnd/sonoff_garage/POWER2",
"closeStatusCmdTopic": "cmnd/sonoff_garage/POWER1"
from homebridge-mqttgaragedoor.
@Kepete Does your gateway relay work in pulse mode (pulsetime in tasmota) for example 1 second?
from homebridge-mqttgaragedoor.
@mientki Oh yes, forgot about that -> Pulsetime3 10
from homebridge-mqttgaragedoor.
I managed to set the accessory. I can finally tell Siri to open the garage door. :-) Everything works well on the desk. Today I mount everything in the garage. Thank you @Kepete for help. You helped me a lot.
I have a question: What are these settings for? How should they be arranged?
"lwt": "OPTIONAL: DOOR OPENER MQTT LAST WILL AND TESTAMENT TOPIC",
"lwtPayload": "lwt Payload"
How do you have it set?
from homebridge-mqttgaragedoor.
"lwt", "lwtPayload" as well, will allow the "not responding" state in the Home(kit) apps in case the "door operator" ( Wemos/Tasmota switch in your case, from my understanding) goes off line.
"lwt": "/lwt",
"lwtPayload": "offline"
should do the work, but I'm unable to check with a Tasmota enviroment so maybe we have to wait one more feedback by @Kepete
from homebridge-mqttgaragedoor.
will it be correct?
{
"accessory": "mqttgaragedoor",
"name": "Garage door",
"url": "mqtt://192.168.99.170",
"username": "***",
"password": "***",
"caption": "Garage door",
"topics": {
"statusSet": "cmnd/garage/POWER3",
"openGet": "stat/garage/POWER2",
"openValue": "ON",
"closedGet": "stat/garage/POWER1",
"closedValue": "ON",
"openStatusCmdTopic": "cmnd/garage/POWER2",
"closeStatusCmdTopic": "cmnd/garage/POWER1",
"lwt": "tele/garage/LWT",
"lwtPayload": "offline"
},
"doorRunInSeconds": "20"
}
from homebridge-mqttgaragedoor.
@mientki Happy you got it working, but the real person to thank here is @iomax who implements all these features and fixes to the plugin! 🥇
With the LWT option I recommend to wait a little until we have figured it out. Right now you config is incorrect. Look at the examples posted before.
About the LWT option. I just tested it.
There is a problem at startup of Homebridge. After you start Homebridge the state of the accessory in the home app is "No Response".
To get it working I need to restart the Tasmota device which in return then sends the lwt message Online
and only then the accessory in the app is showed as online.
from homebridge-mqttgaragedoor.
It sound good but please take care that you must put lwt & lwtPayload at the "main level" ( not in "topic": { ... } )
{
"accessory": "mqttgaragedoor",
"name": "Garage door",
"url": "mqtt://192.168.99.170",
"username": "***",
"password": "***",
"caption": "Garage door",
"lwt": "tele/garage/LWT",
"lwtPayload": "offline",
"topics": {
"statusSet": "cmnd/garage/POWER3",
"openGet": "stat/garage/POWER2",
"openValue": "ON",
"closedGet": "stat/garage/POWER1",
"closedValue": "ON",
"openStatusCmdTopic": "cmnd/garage/POWER2",
"closeStatusCmdTopic": "cmnd/garage/POWER1"
},
"doorRunInSeconds": "20"
}
Please keep me updated about the "lwt". With Home app in foreground, you can try it switching off the Wemos and waiting the "not responding" state till the mqtt timeout ( usually somethings like 60 or 120sec. )
from homebridge-mqttgaragedoor.
About the LWT option. I just tested it.
There is a problem at startup of Homebridge. After you start Homebridge the state of the accessory in the home app is "No Response".
Do get it working I need to restart the Tasmota device which in return then sends the lwt messageOnline
and only then the accessory in the app is showed as online.
Have you set the "<open/close>StatusCmdTopic" ?
It should force a feedback by the device and avoid the need of the restart.
from homebridge-mqttgaragedoor.
Didn't had these set. Now works perfectly! Thank you a lot for this awesome plugin.
It is now in everyday use and since it has been very reliable.
My final working configuration:
{
"accessory": "mqttgaragedoor",
"name": "Garage",
"url": "mqtt://x.x.x.x",
"username": "usr",
"password": "pswd",
"caption": "Garage",
"lwt": "tele/sonoff_test/LWT",
"lwtPayload": "Offline",
"topics": {
"statusSet": "cmnd/sonoff_test/POWER3",
"openGet": "stat/sonoff_test/POWER2",
"openValue": "ON",
"closedGet": "stat/sonoff_test/POWER1",
"closedValue": "ON",
"openStatusCmdTopic": "cmnd/sonoff_test/POWER2",
"closeStatusCmdTopic": "cmnd/sonoff_test/POWER1"
},
"doorRunInSeconds": "20"
},
from homebridge-mqttgaragedoor.
I'm glad it's working for you and thanks for your feedback :-)
Out of curiosity, instead of "lwt": "tele/sonoff_test/LWT",
have you tried even "lwt" : "/lwt"
without success ?
from homebridge-mqttgaragedoor.
Just "lwt" : "/lwt"
didn't work for me
from homebridge-mqttgaragedoor.
OK, thanks.
from homebridge-mqttgaragedoor.
One more question: What reed sensors do you use? One of my sensors is not working. Could the length of the wire be about 3 m?
Have you thought about using Sonoff RF Bridge + sensors with two codes?
from homebridge-mqttgaragedoor.
@mientki I had short wires, so I don't know. Easiest would be to check with shorter wire and see if it works.
from homebridge-mqttgaragedoor.
I came up with an idea. I would like to use this solution to open the barrier in the parking lot.
The barrier is located 50 m away. No sensors can be connected. The barrier is opened from a remote control or a button at home. It covers itself for 30 seconds and automatically closes without additional activities. I thought to create a rule in tasmota to switch power1 and power2 states to the opposite for a specified time.
Principle of operation:
opening time = 4 sec
open for = 22 sec
closing time = 4 sec
total time = 30 sec
power1 = ON barrier closed
power2 = ON barrier opened
power3 - relay activated for 1 second (pulsetime3 10)
- I press power3
- the rule switches the state:
- power1 from ON to OFF for 30 seconds
- power2 from OFF to ON for 30 seconds
How to create such a rule in tasmota?
from homebridge-mqttgaragedoor.
I can't help on tasmota side anyway, without the option to get the "realtime" feedback by the barrier, I'd try :
"doorRunInSeconds": 4,
"pauseInSeconds" : 22,
"topics": {
"statusSet": "cmnd/garage/POWER3"
}
from homebridge-mqttgaragedoor.
Not working :(
{
"accessory": "mqttgaragedoor",
"name": "Szlaban",
"url": "mqtt://192.168.99.170",
"username": "",
"password": "",
"caption": "Szlaban",
"lwt": "tele/szlaban/LWT",
"lwtPayload": "offline",
"topics": {
"statusSet": "cmnd/szlaban/POWER3"
},
"doorRunInSeconds": "4",
"pauseInSeconds": "22"
}
from homebridge-mqttgaragedoor.
What happen ?
In home(kit) app it should show "opening" state as soon as you push the "Szlaban" icon and switch to "open" state just after 4 sec., 22sec. later it should automatically show the "closing" state till the "closed" 4sec later.
from homebridge-mqttgaragedoor.
from homebridge-mqttgaragedoor.
What do means "Accessory no response." ?
It's working on daily base in my setup where I've a second gate without any sensor.
I'd try removing the "lwt" param.
from homebridge-mqttgaragedoor.
In the HOME app - see the previous screenshot. When I press, nothing happens.
I do not have the lwt parameter. Show me your configuration.
from homebridge-mqttgaragedoor.
Please try removing :
"lwt": "tele/szlaban/LWT",
"lwtPayload": "offline",
from homebridge-mqttgaragedoor.
Without result.
{
"accessory": "mqttgaragedoor",
"name": "Szlaban",
"url": "mqtt://192.168.99.170",
"username": "",
"password": "",
"caption": "Szlaban",
"topics": {
"statusSet": "cmnd/szlaban/POWER3"
},
"doorRunInSeconds": "4",
"pauseInSeconds": "22"
}
from homebridge-mqttgaragedoor.
OK, some more investigation needed.
Let me to check and I'll back as soon as possible.
from homebridge-mqttgaragedoor.
OK, thank you very much.
from homebridge-mqttgaragedoor.
Typo found in the code.
Please re-download it and try again.
from homebridge-mqttgaragedoor.
Didn't had these set. Now works perfectly! Thank you a lot for this awesome plugin.
It is now in everyday use and since it has been very reliable.My final working configuration:
{ "accessory": "mqttgaragedoor", "name": "Garage", "url": "mqtt://x.x.x.x", "username": "usr", "password": "pswd", "caption": "Garage", "lwt": "tele/sonoff_test/LWT", "lwtPayload": "Offline", "topics": { "statusSet": "cmnd/sonoff_test/POWER3", "openGet": "stat/sonoff_test/POWER2", "openValue": "ON", "closedGet": "stat/sonoff_test/POWER1", "closedValue": "ON", "openStatusCmdTopic": "cmnd/sonoff_test/POWER2", "closeStatusCmdTopic": "cmnd/sonoff_test/POWER1" }, "doorRunInSeconds": "20" },
Hi can i use this config with sonoff basic flashed with tasmota ?
from homebridge-mqttgaragedoor.
It should work with sonoff basic but some hw hack will be need to get the additional IO pin as available on at the board.
from homebridge-mqttgaragedoor.
It should work with sonoff basic but some hw hack will be need to get the additional IO pin as available on at the board.
Ok thanks, can I use it without open and close sensors ? Fake the response with tasmota rules ?
from homebridge-mqttgaragedoor.
Related Issues (20)
- Update Problem HOT 4
- How to pass message to topic HOT 2
- Reed sensor on GPIO14? HOT 6
- As gate opener? HOT 4
- Clarification HOT 7
- Adding package to npmjs repository HOT 2
- Feature request: Stopped state
- Problems / Setup help with Tasmota HOT 9
- pauseInSeconds HOT 1
- cant get status in homebridge HOT 10
- Getting a length error on topic HOT 7
- Help needed on plugin config when no contact/reed sensor HOT 2
- Accessorie not loadable HOT 3
- Can't install.. HOT 2
- Spelling mistake in README.md
- Can‘t get MQTT to work on Homebridge HOT 8
- Status shows as Stopped HOT 9
- Unavailable ("lwt") and Shelly HOT 9
- Warning messages HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebridge-mqttgaragedoor.