March 20, 2018 at 12:46 pm #1081
I’m just getting started with MQTT on my Domoticz server and am looking for some help/pointers on getting the notifications working. I have mosquitto working for some Sonoff switches but am not seeing the opengarage devices communicate with my server at all. I’ve added the server IP to the integration page on the opengarage devices but looking at the mosquitto logs I see no contacts from the OG devices logged. What am I missing? Are there instructions for integration with Domoticz available anywhere?
Thanks!April 14, 2018 at 8:34 am #1122
Bump, somebody (Ray?) must know something about MQTT in opengarage. After all, it is an option in the latest firmware. Anyone?April 14, 2018 at 9:30 am #1123
BTW, just to mention what I have done so far. I have a MQTT server (mosquitto) running and I’ve put that server’s IP into the MQTT field in opengarage. Running tcpdump I see no MQTT traffic to/from the opengarage device. I also tried ip:port (1883) and this produced the same result. I’m wondering if the MQTT feature is enabled?April 14, 2018 at 9:03 pm #1124
Is there a way to set username and password and port number for MQTT server?June 2, 2018 at 2:40 pm #1160
The current OpenGarage firmware (1.0.8) has MQTT support. Did you try it out?June 2, 2018 at 6:31 pm #1161
Yes, that is the crux of my question. I did try it out and nothing is happening. Is the extent of the support a field which says “MQTT Server”? Is there any other configuration? As I mentioned, I added my Mosquitto server’s IP to that field and the server logs show no communications from OpenGarage. Is there some kind of documentation for the use of MQTT with OpenGarage?June 9, 2018 at 10:28 am #1169
I realized the documentation doesn’t contain any information about MQTT. We are working to add this information. In the meantime, here is a quick tutorial. First, you should install mqtt, say on your Linux computer, by following:
you only need to read up to Step 2, because that explains the basics of how MQTT works (including pub and sub).
Then, once you have a mqtt server, you should go to OpenGarage Settings -> Integration, and type in the mqtt server IP.
In the OpenGarage firmware, it primarily uses MQTT for sending notifications. For example, when the door opens or closes, the following line:
sends out a MQTT message with the topic “your_opengarage_name/OUT/NOTIFY”, where your_opengarage_name is the name of your OpenGarage (which you can change in Edit Options). For example, if my OpenGarage has a name RaysOG, you should have a MQTT subscriber that subscribes to the topic RaysOG/OUT/NOTIFY.
The firmware also sends the current state of the door to topic “your_opengarage_name/OUT/STATE”. So if you subscribe to that topic, you will get messages about the current state.July 6, 2018 at 6:08 am #1210
I was hoping for exactly this functionality, push based notifications without depending on an external cloud service.
However I installed mosquitto and the mosquitto-clients, and named my device “myog” without quotes.
From the command line I ran:
$ mosquitto_sub -t “myog/OUT/STATE”
In the mosquitto log I see:
1530875249: New connection from 127.0.0.1 on port 1883.
Then I point my OG at it and I see:
1530874937: New connection from 192.168.3.101 on port 1883.
1530874937: New client connected from 192.168.3.101 as myog (c1, k15).
But when I open or close the door I don’t see any messages. I don’t think it’s a firewall since I’m successfully connecting.July 6, 2018 at 6:13 am #1211
Sorry, it works, I cut/paste from one of the web pages and managed to get some unicode character instead of double quotes.July 6, 2018 at 8:30 pm #1214
Can OpenGarage be controlled by MQTT to open/close the door? What string to I publish to, something like <OG name>/OUT/STATE? What do I send as a message? “OPEN”?July 6, 2018 at 8:40 pm #1215
Sorry to answer my own question again. I read the source and open/close is supported.
$ mosquitto_pub -m “Button” -t “myog/IN”
I’m listening with MQTT in another window and sure enough:
18:37:26 Garage door OPEN
Very cool. So now I can control the door via web API or MQTT from anywhere on my network. Now to get something working with HTTPs and IPv6 (I’d rather not use someone else’s cloud).July 15, 2018 at 2:03 am #1221
Yes, as you have figured out, it does support control as well. Sorry that this is not well documented. We will add documentation to the user manual.November 25, 2018 at 1:23 pm #1334
I’m using FW v.1.09 and can’t seem to get mqtt control to work. <OG name>/OUT/STATE with message button does nothing.
also found this on github:
‘OGNAME/IN/STATE’ with a message of ‘close’ or ‘open’, it will trigger the door action. OGNAME is your OpenGarage device’s name (you can change it in Settings).
out/notify does work.
It works after a restart! Thanks
- This reply was modified 2 years, 8 months ago by sirotkaslo.
- You must be logged in to reply to this topic.