Announcement

Collapse
No announcement yet.

Direct Storage from HS Devices to InfluxDB

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

  • ksum
    replied
    Originally posted by ElgeN View Post
    Karl: Thanks for your input. I've never used Node-Red before,is there any guide for this specific usage, that i could try out if the tip from Michael does not work out?
    I'll put something together after I get back from vacation. Will be next week.

    Karl

    Leave a comment:


  • ElgeN
    replied
    Michael, thanks for your prompt feedback.

    It does indeed store VALUE_SET for some of the ID's.
    Not sure if i understood you correctly regarding the $$UNIX, but i've added $$UNIX as the "Tag Field" for each of the Device Reference's in the MQTT association table that i want to force the logging of value.
    I will leave it for a little while, and see if the values are logged even when there are no change in value.

    Karl: Thanks for your input. I've never used Node-Red before,is there any guide for this specific usage, that i could try out if the tip from Michael does not work out?

    Leave a comment:


  • ksum
    replied
    By my experience, which is using Node-RED to save data to influxdb from prior to Michael adding the ability, the data is stored even if it does not change as the timestamp is available and changes. The version of Graphana I use for charting does not retrieve data items outside the queried time range so some of my graphs show an initial "no data." As a result, I save unchanged values on a regular basis by getting the current values from HomeSeer. This basis is a function of what I was graphing.

    Note that a newer version of Graphana may have changed this.

    Leave a comment:


  • Michael McSharry
    replied
    There was the same question at mcsMQTT Data Send to InfluxDB even if Device Data dosent Change... - HomeSeer Message Board . It is easy to have the plugin respond to either a set or a change, but it is not clear if InfluxDB stores data unless the data changes.

    If you want to try it yourself then unzip the attached into \bin\mcsMQTT folder of HS4. Restart the plugin. When Debug is enabled from the top of the MQTT Page, General tab then a file is produced in \data\mcsMQTT\mcsMQTT Debug.txt that will show the HSEvent callbacks. Just need to make certain that there is at least one entry of the VALUE_SET. Most will be VALUE_CHANGE.

    Assuming the VALUE_SET are being received and InfluxDB does not record the data, then a possible workaround is to include a TAG field in the data written to the database and use something like replacement variable of $$UNIX: which is updated every second. This will make the record looks as if it changed.
    Attached Files

    Leave a comment:


  • ElgeN
    replied
    First of all, great way to store HS4 data to InfluxDB, many thanks for your work done!

    I've been noticing an issue with the storage of data, which i was hoping is an easy setting in the setup, or easy thing to fix.
    Attached some pictures for reference, the "kWh 1", "kWh 2" and "kWh 3" is measuring the kWh usage for all 3 phases for a boiler.
    In Homeseer they are all updated "Today 21:29:22", but the InfluxDB records does not log all of them at this time.

    The reason, i believe, is because the value has not changed.
    But this creates a problem when graphing the results, as there may go days or weeks between the increase in value.

    If there any way to force the mcsMQTT to log the value to InfluxDB, even when there has been no change?


    ^ElgeN

    Leave a comment:


  • John245
    replied
    For the persons following this issue it is continued in https://forums.homeseer.com/forum/en...tt#post1527043 as it seems plug-in related.

    ---
    John

    Leave a comment:


  • John245
    replied
    Originally posted by Michael McSharry View Post
    In the attached I added the list of HS devices that are being monitored for InfluxDB into the mcsMQTT Debug log. It should be at the top of the log. Debug enabled from the top of General tab. File is \data\mcsMQTT\mcsMQTT Debug.txt.

    During startup the plugin builds a dictionary of Refs that should be sent to InfluxDB. At this time it also collects the Room/Floor/Name/Ref so it does not need to retrieve it at time of writing to InfluxDB.
    I did send you a PM.

    ---
    John

    Leave a comment:


  • Michael McSharry
    replied
    In the attached I added the list of HS devices that are being monitored for InfluxDB into the mcsMQTT Debug log. It should be at the top of the log. Debug enabled from the top of General tab. File is \data\mcsMQTT\mcsMQTT Debug.txt.

    During startup the plugin builds a dictionary of Refs that should be sent to InfluxDB. At this time it also collects the Room/Floor/Name/Ref so it does not need to retrieve it at time of writing to InfluxDB.
    Attached Files

    Leave a comment:


  • John245
    replied
    Originally posted by Michael McSharry View Post
    The plugin was only honoring global setting for SQLite. I included it for InfluxDB too. I don't understand why you are getting some if you are not using the "I" column checkbox. The update is attached.
    According to the manual " On the History tab there is also a selection for HS Device History that has the option to store all HS Devices (Features) in InfluxDB. In this case there is not need for using the “I”nflux column checkbox."

    I enabled that checkbox and at least a significant number of devices were enabled. But what I understand from the above is that this should not be working at all.

    I installed the new version, that will store no devices in InfluxDB at all. So I rolled back to the previous version.

    ---
    John

    Leave a comment:


  • Michael McSharry
    replied
    The plugin was only honoring global setting for SQLite. I included it for InfluxDB too. I don't understand why you are getting some if you are not using the "I" column checkbox. The update is attached.

    Attached Files

    Leave a comment:


  • John245
    replied
    Logging all devices to InfluxDB. It seems that there are problems for the parent below. As shown in the Influx output not all values are available.

    Click image for larger version

Name:	Capture mart meter HS.PNG
Views:	125
Size:	165.3 KB
ID:	1526783

    Click image for larger version

Name:	Capture -Smart meter DB.PNG
Views:	119
Size:	63.3 KB
ID:	1526782

    Furthermore none of the hourly, daily, weekly, monthly and yearly values are written to InfluxDB. How can I troubleshoot this?


    Click image for larger version

Name:	Capture hourly.PNG
Views:	136
Size:	77.2 KB
ID:	1526781

    ---
    John

    Leave a comment:


  • John245
    replied
    Originally posted by Michael McSharry View Post
    My mistake I was using the name of the child rather than the parent. Update attached for HS4. HS3 plugin does not have the problem.

    You find Association information on the Devices page Status/Graphics tab at the bottom.
    Confirmed that this fixed the issue.

    ---
    John

    Leave a comment:


  • Michael McSharry
    replied
    My mistake I was using the name of the child rather than the parent. Update attached for HS4. HS3 plugin does not have the problem.

    You find Association information on the Devices page Status/Graphics tab at the bottom.
    Attached Files

    Leave a comment:


  • John245
    replied
    Originally posted by Michael McSharry View Post
    What Feature had you marked in the "I" column of the Association tab to be recorded in InfluxDB?

    mcsMQTT looks at the AssociatedDevices property of the selected device. If you select a Device then it will find the first Feature to satisfy $$PARENTxxx: If you select a Feature (the expected selection) then the only AssociatedDevice should be the parent Device. mcsMQTT is not validating that a Feature vs. Parent is being selected for recording.
    As I save the history of all devices into Influx DB I did not mark any feature in the "I" column.

    How can I verify in mcsMQTT if a feature has really the association?

    ---
    John

    Leave a comment:


  • Michael McSharry
    replied
    What Feature had you marked in the "I" column of the Association tab to be recorded in InfluxDB?

    mcsMQTT looks at the AssociatedDevices property of the selected device. If you select a Device then it will find the first Feature to satisfy $$PARENTxxx: If you select a Feature (the expected selection) then the only AssociatedDevice should be the parent Device. mcsMQTT is not validating that a Feature vs. Parent is being selected for recording.

    Leave a comment:

Working...
X