Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Design thoughts about plugins
#1
Question 
As you might know I want to make the mqtt plugin more reliable on whether or not the mqtt broker is available. The problem (if one may speak of a problem Smile  ) is that when the broker is not available the plugin never ever attempt to connect to it on a later moment.

I would like to change this and make it more robust. There are however different approaches possible to do this. The job as such is easy, just try to connect once every x seconds until the broker is reachable.  My design thoughts are on which this should be done in a separate thread or, and this is unfortunately to my knowledge not (yet) possible, via a kind of trigger/heartbeat call from the framework to the plugin so that inside the plugin this could be handled.

Question; Is there a way to periodically get a trigger/heartbeat from the SIP framework (e.g. from the timer_loop) to wake-up the plugin to do "some work"?  With "some work" I not only mean to start the mqtt connection but also other things like reading lots of sensors om which the plugin can decide to alter the irrigation schema.

Please let me know if there are any thought on this.

Thanks,
--Gerard
Reply


Messages In This Thread
Design thoughts about plugins - by astrogerard - 2018 Jan 07, 06:46 PM
RE: Design thoughts about plugins - by dan - 2018 Jan 07, 09:08 PM
RE: Design thoughts about plugins - by astrogerard - 2018 Jan 08, 12:35 PM
RE: Design thoughts about plugins - by dan - 2018 Jan 08, 05:17 PM
RE: Design thoughts about plugins - by astrogerard - 2018 Jan 08, 07:21 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)