Announcement

Collapse
No announcement yet.

Simple API not updating HS

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Greig suggested that I only push data to HS when the values I'm collecting change. That is instead of sending the temperature on every loop, I check to see if the value has changed. If so, I send the data. This keeps the Arduino from flooding HS and would, I suspect, be more effective than polling.

    Barry

    Comment


    • #17
      Originally posted by lhfarm View Post
      Greig suggested that I only push data to HS when the values I'm collecting change. That is instead of sending the temperature on every loop, I check to see if the value has changed. If so, I send the data. This keeps the Arduino from flooding HS and would, I suspect, be more effective than polling.

      Barry
      Barry

      That is DEFINATELY how I would do it... I came unstuck years ago doing the same thing ie: updating HS on every loop until I found out what I was doing was flooding the plugin.

      Pete
      HS 2.2.0.11

      Comment


      • #18
        As an alternative, are there any scripts that show how to poll every 15 seconds from HS followed by receiving the data from the Arduino?

        Comment


        • #19
          Originally posted by Bugman1400 View Post
          As an alternative, are there any scripts that show how to poll every 15 seconds from HS followed by receiving the data from the Arduino?
          Not with the Arduino plugin that I am aware of.

          The only other way is to setup a Mosquitto mqtt Broker, write up some mqtt code for the Arduino and have mcsmqtt request a status from the arduino. This to me seems overly complicated....

          By far the best way would be is study arduino code (lots of examples) and only let it drop into the update HS loop when a value changes....

          Good luck..Pete
          HS 2.2.0.11

          Comment

          Working...
          X