Announcement

Collapse
No announcement yet.

mcsMQTT Data Send to InfluxDB even if Device Data dosent Change...

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

    mcsMQTT Data Send to InfluxDB even if Device Data dosent Change...

    I am having an issue trying to get working between mcsMQTT and InfluxDB.

    I want to send a Virtual HS Device's value to my InfluxDB on a regular basis (Because it dosent change very often, but still want it logged/set to InfluxDB).

    I have the Device in question already being sent to InfluxDB Recording. I also looked in the settings of mcsMQTT and changed all options related to Time/Change but nothing seems to send the Device's value to InfluxDB "Unless" it's value changes.

    Options I have changed/Set:

    Publish Periodic Status (Mins): from 0 --> 1

    #2
    I believe InfluxDB doesn't store duplicate values in a time series, even if received.
    When needed I use an Easytrigger routine and increment the value by a very small factor (ex: +/- 0.000001)
    InfluxDB captures it as a change but it doesn't really affect my tables/graphs.

    But maybe I'm wrong so following thread .

    Comment


      #3
      As now implemented mcsMQTT only sends VALUE_CHANGE events to external databases. I do not recall what InfluxDB does with data that does not change. This could be the reason the VALUE_SET events are excluded. In the attached I allowed VALUE_SET to also be sent to InfluxDB. If this also does not record repeated values in InfluxDB then @123aqweasd is correct. Unzip the attached into the /bin/mcsMQTT folder.
      Attached Files

      Comment


        #4
        Is there anything else I need to set in the settings or something? I just stopped the MQTT Plugin, unziped in mcsMQTT folder, and restated MQTT Plugin.

        Comment


          #5
          That is all you need to do, assuming your starting point is the plugin version available from the updater. If you are running Linux then there is some clean up you also need to do as described in post Visitor Messages at https://forums.homeseer.com/forum/li...-from-5-24-0-8. If you are running Windows these updates should not be needed.

          The setting that you should already have setup is on the General tab "Publish HS Device Changes" where the radio is not set to disable. When enabled the mcsMQTT will register for the HS VALUE_CHANGE and VALUE_SET callbacks from which data to InfluxDB is initiated.

          Comment


            #6
            I dont think it is working right. I enabled "Publish HS Device Changes" to "All Device Changes" and set "Publish Periodic Status (Mins)" to "1" and waited a couple minutes and refreshed my InfluxDB bucket. A Device that has not changed since Yesterday (and isnt even in the InfluxDB yet) was not sent to InfluxDB after the time period above.

            HS4 is running on Windows and I am currently running the latest mcsMQTT version of: 5.24.3.5

            Comment


              #7
              The data going to InfluxDB is based upon an event callback from HS. Publishing periodic MQTT data does not go through HS so no event callback will be generated to trigger a InfluxDB write. For your test you can use a HS virtual device and run a periodic event with one-line script such as &hs.SetDeviceValueByRef(1234,hs.DeviceValue(1234)+1) to increment the value. Change it to not increment and see what InfluxDB does with non-incrementing stores.

              Comment

              Working...
              X