Tagged: 

This topic contains 28 replies, has 6 voices, and was last updated by  Gompka 2 years, 2 months ago.

Viewing 15 posts - 1 through 15 (of 29 total)
  • Author
    Posts
  • #105

    Anonymous

    I figured that having MQTT support might be of use to a few people, including myself. The addition of MQTT was pretty trivial (using PubSubClient http://pubsubclient.knolleary.net/)…thus far. Is this something you want to incorporate into the released version? If so please let me know I’m happy to share what I have.

    #154

    Ray
    Keymaster

    I am not very familiar with MQTT (followed a few tutorials and so on). Please share what you have, and we are definitely interested in incorporating MQTT into future firmwares. I am sure many users would appreciate it too.

    #278

    tomgle
    Participant

    I have been playing with MQTT and some MQTT topics for open Garage as well. I’m also tossing the blynk stuff and cloud integration overboard and hopefully will use Nodered in it’s place. I have the open Garage hardware and am anxious to program it with straight Arduino code without nodemcu or esptool. Can I do that without bricking the thing? I’m hoping I can eventually program it like an Adafruit Huzzah i.e. hookup the programmer and upload it straight from the IDE.

    #282

    Ray
    Keymaster

    You should be free to explore without worrying about bricking the thing — ESP8266 comes with a built-in bootloader that’s very robust. I’ve never seen a case where the bootloader is corrupted. Because OpenGarage firmware supports over the air (OTA) update, there is actually no need to update firmware through the USB cable — of course you still need the USB cable to provide power — but the firmware can be uploaded through the webpage. Also, OpenGarage firmware is written in Arduino with ESP8266 core, it does not use Lua / nodemcu at all.

    • This reply was modified 2 years, 9 months ago by  Ray.
    #284

    chickenmad
    Participant

    Would love any code you have as a starting point and would share back what I make. I have an audio notification that announces the garage door as opened and MQTT would align with the ESP8266/nrlf24l01 sensor network in the greater house.

    Also – as the device is overhead i use the distance as a triple state – distance to garage door = open, distance to car roof = closed and dads car is home, distance to floor is closed and dads car is gone. Had to move the sensor to be directly over the flat part of my Suburban as over my wifes MDX the reflection would cause the readings to be all over the place.
    Garageio appears to be similar to this product but using a laser mounted to the bottom of the garage door opener. I am ordering a PIR sensor and using it with an 8266 to see if I can sense when a car is approaching the garage and alert that someone has arrived (we have no windows to see our driveway)

    • This reply was modified 2 years, 9 months ago by  chickenmad.
    #290

    Gompka
    Participant

    Also interested in the mqtt code, would like to run my own mqtt server instead of relying on blynk.

    #300

    DynamoBen
    Participant

    I have had working MQTT code for a few months now. What is missing at this point is the UI config options. If someone wants to work on that part I can post my code someplace. Just let me know.

    NOTE: I’m sending unencrypted messages to the server, I’ve not tried to do anything with TLS.

    • This reply was modified 2 years, 9 months ago by  DynamoBen.
    #318

    Gompka
    Participant

    Ben if you could send me your code or upload it here i would appreciate it. My email is [email protected]

    #322

    DynamoBen
    Participant

    Will do, however I tried merging the latest changes to the project with my code and now it’s broken so I need to fix that first.

    • This reply was modified 2 years, 8 months ago by  DynamoBen.
    #324

    DynamoBen
    Participant

    OK things are now functional; the rearchitecting of Blynk threw things off a bit.

    This is the latest version from Github with MQTT added. The only files that change are main.cpp and you need a modified Arduino parent file (it needs the PubSubClient include).

    The MQTT server IP is at the top of main.cpp along with the topic, you will want to update those (if you are doing access control username/password are there too). If “Button” is sent on the topic then the door will be activated; this is hardcoded right now so if you need to change it it’s in “void mqtt_callback.”

    It’s worth noting that I’ve hard coded the MQTT port number to 1883 (the default), if you are using a different port you will need to change that too.

    Enjoy and let me know if you have any questions.

    • This reply was modified 2 years, 8 months ago by  DynamoBen.
    • This reply was modified 2 years, 8 months ago by  DynamoBen.
    Attachments:
    You must be logged in to view attached files.
    #327

    chickenmad
    Participant

    Awesome thanks!!!

    #329

    Gompka
    Participant

    Ben thank you for the code, it will same me a lot of time and swearing lol. I will load it up when i get home and let you know how it goes.

    #332

    DynamoBen
    Participant

    I’ve added distance, the only file that changed was main.cpp. Enjoy!

    Attachments:
    You must be logged in to view attached files.
    #349

    Gompka
    Participant

    Hey Ben, thank you for the files, i compiled and uploaded and seems like everything opengarage relate is working but i’m not getting anything on my mqtt broker. The topic is just “GarageDoor” right? I changed the mqtt server and added my username and password, am I missing anything else?

    #350

    DynamoBen
    Participant

    Yes just “GarageDoor” no slashes. Also its worth noting that I’ve not tested user/pass since I’m not doing access control on my server at the moment.

Viewing 15 posts - 1 through 15 (of 29 total)

You must be logged in to reply to this topic.