Announcement

Collapse
No announcement yet.

Sampling and recording frequency

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

    Sampling and recording frequency

    Hello

    I have a basic question:

    I recently increased the sampling frequency of my energy consumption and the production of photovoltaic panels to a sampling every 2 seconds.

    These two variables are being monitored, however with this frequency, just for these two variables, in 24 hours I have 2 x 43200 samples.

    When I try to make a 2 or 3 day chart the plugin responds very slowly or freezes.

    My question is: how can I keep the sampling frequency I need (every 2 seconds) but write to the database at a different frequency (much lower)

    Thanks!

    HS3 Pro/Windows10 - Plugin 3.1.3.0

    #2
    Today the writing of device history is tied to the update from homeseer to the plugin telling me the value has changed. If you want to do this, you could do something like:
    1. Create virtual devices for "Energy Consumption Snapshot" and "Energy Production Snapshot".
    2. Set up a recurring event on the frequency you want to record (once a minute? every 5 minutes?) to run an immediate script command to set the value of the virtual "snapshot" device to the value of the actual device.
    3. Configure Device History monitoring on only the "Snapshot" devices.
    I've thought about implementing some smoothing options to only graph changes if the value changes by more than a configurable amount or %, but that will require some work.

    Comment


      #3
      Originally posted by shill View Post
      Today the writing of device history is tied to the update from homeseer to the plugin telling me the value has changed. If you want to do this, you could do something like:
      1. Create virtual devices for "Energy Consumption Snapshot" and "Energy Production Snapshot".
      2. Set up a recurring event on the frequency you want to record (once a minute? every 5 minutes?) to run an immediate script command to set the value of the virtual "snapshot" device to the value of the actual device.
      3. Configure Device History monitoring on only the "Snapshot" devices.
      I've thought about implementing some smoothing options to only graph changes if the value changes by more than a configurable amount or %, but that will require some work.
      Thanks for the answer.
      Yes, the solution you propose will solve the situation.
      My question was to ensure that the plugin didn't have that option natively.
      For situations like mine, it would be interesting to be able to define the frequency of recording the variable in the database.
      What you refer is also interesting: register only if the variation is between a pre-defined threshold, but I think that one situation does not exclude the other; both are interesting

      Thanks

      Comment


        #4
        Originally posted by ANTOLIVEIRA View Post

        Thanks for the answer.
        Yes, the solution you propose will solve the situation.
        My question was to ensure that the plugin didn't have that option natively.
        For situations like mine, it would be interesting to be able to define the frequency of recording the variable in the database.
        What you refer is also interesting: register only if the variation is between a pre-defined threshold, but I think that one situation does not exclude the other; both are interesting

        Thanks

        Because the plugin assumes the value stayed constant between recorded readings, I don't see any reason to simply reduce the frequency - if there's no significant change, there's no need in my opinion to write it down at all. The entire paradigm of value change triggers from HS to plugins is without regard to a time element; I just react when I'm told a change happened.

        Comment


          #5
          Originally posted by shill View Post


          Because the plugin assumes the value stayed constant between recorded readings, I don't see any reason to simply reduce the frequency - if there's no significant change, there's no need in my opinion to write it down at all. The entire paradigm of value change triggers from HS to plugins is without regard to a time element; I just react when I'm told a change happened.
          Hi Shill,

          I think I didn't make myself understood.

          The problem I posed, as you suggest, has an alternative solution, which consists (in an alternative way) precisely in reducing the frequency of the records, otherwise I can't get the graphics to be drawn.(...) and I'm accumulating a huge amount of information in the database, without any interest (to record) but necessary to manage in real time the energy consumption in my house

          I would like to make it clear that I have no problem with the plugin.

          I've been a satisfied user for a few years now with no problems.

          This issue has been solved in the way you suggested


          Thanks for this great plugin

          António

          Comment


            #6
            Originally posted by ANTOLIVEIRA View Post

            Hi Shill,

            I think I didn't make myself understood.

            The problem I posed, as you suggest, has an alternative solution, which consists (in an alternative way) precisely in reducing the frequency of the records, otherwise I can't get the graphics to be drawn.(...) and I'm accumulating a huge amount of information in the database, without any interest (to record) but necessary to manage in real time the energy consumption in my house

            I would like to make it clear that I have no problem with the plugin.

            I've been a satisfied user for a few years now with no problems.

            This issue has been solved in the way you suggested


            Thanks for this great plugin

            António
            Actually I think it was me who didn't explain well - I didn't think you were criticizing, I was just explaining how the process works and why "frequency" isn't a factor in recording. I react to every change and have to decide whether it's a monitored device or not and then record it if so. I also get the old value in the event, so I can make a decision about whether it's a significant change or not, but time isn't a factor; looking up when it changed last is work I can't afford to do in the heat of the moment trying to process all these incoming changes. Just trying to see if that would also satisfy your needs!

            Comment


              #7
              Just for an awareness, the concept of % change based only on HSEvent data will end up not recording data that is slowly increasing or decreasing. What I do is use the delta % between the last recorded value and the current value.

              Comment


                #8
                Originally posted by Michael McSharry View Post
                Just for an awareness, the concept of % change based only on HSEvent data will end up not recording data that is slowly increasing or decreasing. What I do is use the delta % between the last recorded value and the current value.
                Good point, and actually what I was intending just poorly explained! I track "last recorded value" in memory for other reasons already.

                Comment


                  #9
                  Originally posted by shill View Post

                  Actually I think it was me who didn't explain well - I didn't think you were criticizing, I was just explaining how the process works and why "frequency" isn't a factor in recording. I react to every change and have to decide whether it's a monitored device or not and then record it if so. I also get the old value in the event, so I can make a decision about whether it's a significant change or not, but time isn't a factor; looking up when it changed last is work I can't afford to do in the heat of the moment trying to process all these incoming changes. Just trying to see if that would also satisfy your needs!
                  I understood the concept behind how the plugin works.
                  As you already understood the question arose because when I am measuring electrical power (500W to 7KW) every two seconds it 's natural that the values can change slightly, even if the consumption remains stable (600W or 601W it's the same), but in this case the plugin records, which being correct, to me creates a problem. But now it's solved.
                  Thanks for your time

                  Comment

                  Working...
                  X