OpenGarage Forums OpenGarage Firmware MQTT unwantingly opens garage door on wifi reconnect!!

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by  candhill 2 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1283

    candhill
    Participant

    tl;dr DON’T USE MQTT!

    Huge issue here on the 1.0.8 firmware.

    Everything’s been working great for about six months now. Decided to play around with MQTT. Setup a brand new mosquitto server and added the IP into the OG. Started getting OG messages no problem. Decided to send a “Button” message and the garage door opened as expected. Moved on to a different project, luckily on the same day, and it required me to reboot the wifi router. I get the blynk message saying my OG is offline and when wifi comes back up my garage door opened!! I closed the garage door and rebooted the wifi again, same thing. The garage door opens when it shouldn’t!! I removed the MQTT IP from the OG and rebooted wifi again, door doesn’t open.

    This is a huge issue!

    Here’s what I’m guessing, when wifi comes back up the OG reconnects then resubscribes to the MQTT server getting the last /IN message sent, which would have been “Button”, which opens the door.

    I just noticed a 1.0.9 version out there so I’ll check to see if this has been fixed but, for now, this is an fyi for anyone thinking about using MQTT.

    #1319

    emann
    Participant

    Whatever you are using to send the button command is sending the message with the retain flag set. This causes the mqtt server to save the last known good message and send it to any client that connects and subscribes to the button topic. The receiving client (opengarage) has no control over this.

    Whatever mqtt client you are using to send the button command should have the ability to publish the message with the retain flag set or cleared.

    See for more info on mqtt protocol:

    https://www.hivemq.com/blog/mqtt-essentials-part-4-mqtt-pub

    #1320

    candhill
    Participant

    Hmm, I see what you’re saying but, when it comes down to it opengarage needs to do something to make sure it only opens when the user wants it to. There shouldn’t need to be special settings or special flags or anything else special on the broker or client to make sure this issue doesn’t happen. Having the garage door open without the user wanting it to is the absolute worst thing that could possibly happen when using a garage door opener product.

    I don’t know how the opengarage client works or what options are available when connecting to the broker but, I would assume there’s some way to say connect disregarding all messages, then start processing new messages. Or at least something along those lines.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

OpenGarage Forums OpenGarage Firmware MQTT unwantingly opens garage door on wifi reconnect!!