Announcement

Collapse
No announcement yet.

Direct Storage from HS Devices to InfluxDB

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

    Originally posted by Michael McSharry View Post
    I can think of three approaches. One is to include the Ref as part of the device id from the radio selector that has four options. This will make the device field unique. It also means less robustness in the data since it is now tied to a specific HS Ref number for which you have no control.

    The second is to include a tag field using replacement variable $$TAG: where the Tag text is a text box entry of the Edit tab for each device feature. This complicates the query and if you are using the internal charts in mcsMQTT it will not consider the $$TAG: value as part of its query to get the data for the internally generated charts.

    The third is to add another replacement variable that would be $$PARENTNAME: and/or $$PARENTREF: that could be used like the existing $$NAME: and $$REF: . Let me know if you would like me to add these replacement variables. Same downside as approach #2 with the advantage of not needing to enter data for a Tag field to assure uniqueness.
    I prefer option 3. $$PARENTNAME as this is the most easy to use and robust one.

    Besides option 1 is less robust it is also not easy to use.

    Option 2 could be a mid-term solution.

    Another workaround could be the creation of additional (sub)location in HomeSeer.

    ---
    John

    Comment


      The two replacement variables were added to 5.23.2.0. Unzip into the \bin\mcsMQTT folder. HS version info will not change, but version info in the header of the MQTT Page, General tab will reflect the installed dll.
      Attached Files

      Comment


        Originally posted by Michael McSharry View Post
        The two replacement variables were added to 5.23.2.0. Unzip into the \bin\mcsMQTT folder. HS version info will not change, but version info in the header of the MQTT Page, General tab will reflect the installed dll.
        Based on my filtering I expect as parent "Thermostat bathroom"
        Click image for larger version  Name:	Bathroom.PNG Views:	0 Size:	31.8 KB ID:	1525700 However the Influx data showed multiple parents. However al these parents are features in HomeSeer.

        Click image for larger version  Name:	Influx parent.PNG Views:	0 Size:	76.5 KB ID:	1525699
        In the Extra Identification Field I configured the following: Room=$$ROOM:,System=$$FLOOR:,Parent=$$PARENTNAME:

        ---
        John
        Attached Files

        Comment


          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.

          Comment


            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

            Comment


              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

              Comment


                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

                Comment


                  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:	207
Size:	165.3 KB
ID:	1526783

                  Click image for larger version

Name:	Capture -Smart meter DB.PNG
Views:	203
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:	230
Size:	77.2 KB
ID:	1526781

                  ---
                  John

                  Comment


                    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

                    Comment


                      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

                      Comment


                        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

                        Comment


                          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

                          Comment


                            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

                            Comment


                              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

                              Comment


                                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

                                Comment

                                Working...
                                X