Forum Replies Created

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • in reply to: MQTT and OG #470

    DynamoBen
    Participant

    Curious I’ve not see that before. There is a non-blocking reconnect every 5 seconds but that shouldn’t hold anything else up. If I get some time I will try to reproduce this on my hardware (I’m not using Blynk though). Beyond that you could try changing the following to increase the retry interval:

    From:
    if (now – mqttLastReconnectAttempt > 5000)

    To:
    if (now – mqttLastReconnectAttempt > 30000)

    in reply to: MQTT and OG #419

    DynamoBen
    Participant

    Glad to hear it’s working well for you. Thanks for the update!

    in reply to: MQTT and OG #393

    DynamoBen
    Participant

    OG is setup to take readings every 4 seconds via the webpage, however it looks like mqtt is reporting readings every 1 second. Do you know how to get mqtt to publish every 4 seconds and so i can test if this fixes the issue?

    I put the MQTT publish commands in the same function as the OG readings (void check_status()), so if you are set to 4 seconds it sends every 4 seconds. Not sure why you are seeing 1 second updates.

    Sounds to me like there are bigger issues going on that are outside the MQTT code changes, I’m wondering if the issues have to do with your Mosquitto server config or maybe another device is publishing to that same topic? Not sure.

    in reply to: MQTT and OG #390

    DynamoBen
    Participant

    I’m not sure what the root cause might be; I’m using the same variable (“distance”) that is being written to the log, webpage, and to Blynk.

    On mine I’m seeing the number move a little (from 145-147) but not wide changes like you are seeing on your bench.

    in reply to: MQTT and OG #374

    DynamoBen
    Participant
    in reply to: Upcoming 2.0 release of OpenGarage app #368

    DynamoBen
    Participant

    He means phone app which can be found on Google Play or Apple App Store.

    If you have having issues with Blynk I would suggest starting a new thread so others can help troubleshoot.

    in reply to: MQTT and OG #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.

    in reply to: MQTT and OG #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.
    in reply to: MQTT and OG #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 8 years ago by DynamoBen.
    • This reply was modified 8 years ago by DynamoBen.
    Attachments:
    You must be logged in to view attached files.
    in reply to: MQTT and OG #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 8 years ago by DynamoBen.
    in reply to: Upcoming 2.0 release of OpenGarage app #311

    DynamoBen
    Participant

    Ah OK that helps, thanks!

    in reply to: Upcoming 2.0 release of OpenGarage app #302

    DynamoBen
    Participant

    So if two users have the app and control the same door how does the geofencing work? First person to leave the fence closes the door or both users must leave?

    in reply to: MQTT and OG #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 8 years ago by DynamoBen.
Viewing 13 posts - 1 through 13 (of 13 total)