Announcement

Collapse
No announcement yet.

Is there a way of writing an average device value to another device?

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

    Is there a way of writing an average device value to another device?

    Hi!

    I got a device that read realtime power consumption in my home.

    I am looking for a way to calculate the last hour power (kW) consumption and write the result to a virtual device every 10seconds or so.

    Resulting in valus like: 2.5kWh, 1.03kWh, 0.85kWh etc.

    Is there a way to do this?


    Best regards

    Join

    #2
    Create a virtual device for average power (kW)
    When your original device is "set" (every 10 sec)
    just have ET update your virtual device with ((new value+virtual device value) /2)


    You could create a third VD to calculate/write the hourly energy consumption (kWh) if needed.

    ​​​
    Check ET help for "set device to expression"

    Comment


      #3
      Originally posted by 123qweasd View Post
      Create a virtual device for average power (kW)
      When your original device is "set" (every 10 sec)
      just have ET update your virtual device with ((new value+virtual device value) /2)


      You could create a third VD to calculate/write the hourly energy consumption (kWh) if needed.

      ​​​
      Check ET help for "set device to expression"
      Here is an example.

      This is a graph collected with the Device History plugin:

      It shows the current Last hour power consumption, and the result is 2,7kWh.

      I am looking to see if it's possible to do with EasyTrigger.

      Mabye with 60 virtual devices, adding together /60=average-ish?

      Attached Files

      Comment


        #4
        You're trying to reinvent the wheel. Simply pull the Average value for the last hour from Device history and put that value in a virtual device that you can use in Events, HSTouch, etc.

        I don't use Device History (I use Jon00's Charting) but I'm sure there's a way to pull the Average value calculated in the chart you're showing.

        Comment

        Working...
        X