No announcement yet.

Adding up time a device has been in various states

  • Filter
  • Time
  • Show
Clear All
new posts

    Adding up time a device has been in various states

    I have a virtual switch which can have 5 different states. On at least 2 of them, I would like to create a virtual device to display the total time it has been in that state.
    On my virtual switch I have the following states
    AC low
    AC high
    AC heat low
    AC heat high

    I would like to know and display in a different virtual device the time the AC has been on low, and the AC has been on high. I don't mind if that's displayed in 2 different devices, the important bit is how to collect the data. At a later stage I would like to graph that into usage per month, but that's a future project.
    Can this be done with events or do I better ask that in the script section ?

    Have a look at this - it sounds like it should do what you want, I used to use it myself. With HS3 however it does support timers but you would need to do a bit of experimentation there to see whether or not it would work because at some point you would need to decide when to reset the data.

    If you had a value that was representative of the total time (say total number of seconds elapsed) then you could begin to look at charting it.


      My t-stat does not send out a z-wave message when stage 2 turns on. Therefore, I am using an AEON power monitor to monitor the power used by my HVAC system. When the wattage goes above 1200W, I know the 2nd stage is operating. I have an event that starts a timer when the wattage goes above 1200. I stop the timer when the HVAC turns off. On a daily, weekly, and monthly basis, I log the timer total. I reset it monthly.

      Steve Q

      Sent from my iPad using Tapatalk
      HomeSeer Version: HS3 Pro Edition, Operating System: Microsoft Windows 10 - Home, Number of Devices: 373, Number of Events: 666, Enabled Plug-Ins BLRF, BLUSBUIRT, HSTouch Server, mcsXap, NetCAM, X10, Z-Wave,Alexa,HomeKit


        I didn't have time last night to install the plugin, but looking at the post its probably doing what I want.
        I was also thinking about energy metering and creating a event. How did you do your event with the timer, would you mind sharing ?