Giter Club home page Giter Club logo

Comments (2)

bblacey avatar bblacey commented on August 26, 2024

Ok, I have looked into this issue and see more underlying problems. We have two options, 1) on variable change, connect, send, disconnect/tear-down or 2) maintain persistent connection as the code attempts today.

Option 1 is super simple but will only support sending from the vera-mqtt plugin
Option 2 is a bit more complicated but doable. Need to call handler() more frequently, on the order of 1/second and change the client KEEP_ALIVE time from 3600 to 60 seconds so the handler will send an mqtt PINGREQ to the broker every 60 seconds otherwise the broker will disconnect the client.

To preserve what's already here and leave the door open for someone in the future to add a subscription with a callback to process incoming MQTT messages on specific topics, I am going to implement Option 2. If this were clean slate, I would probably just implement #1.

from vera-mqtt.

jonferreira avatar jonferreira commented on August 26, 2024

Great work @bblacey congrats!

from vera-mqtt.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.