Jump to content

Energy Monitoring - Tracking Run Time


Teken

Recommended Posts

Posted

OK, so I spent most of the day trying to recover from a complete system melt down. My entire ISY-994 iZ Controller lost all of its programs and settings. After multiple attempts of restoring the unit it finally worked on the 7th try.  :|

 

I had several programs that tracked how long something ran for. If that device ran more then the expected time I was sent an email alert. Later the same program shut down that device to avoid extra costs and unneeded run time.

 

So, since I am starting from scratch can someone help me craft a program that will do the above.

 

- Track how long something is running. In this case its power and not simply a on / off state.

 

 

Posted

- Track how long something is running. In this case its power and not simply a on / off state.

 

Teken-

 

Can you give me some more detail on the above?  What are the conditions to look for when tracking this device?

 

-Xathros

Posted

Teken-

 

Can you give me some more detail on the above?  What are the conditions to look for when tracking this device?

 

-Xathros

 

Hello Xathros,

 

Lets start by tracking the fridge which this can be applied to anything else later on. I would like to know when the fridge starts, how long it ran for, then when it stopped.

 

I know roughly what the running power is, at rest / idle, defrost mode, etc. I can determine how long the fridge ran for using another device so the duration is a known value to me.

 

But, there is no method from the other third party device to control an insteon appliance. Please let me know if there is more information that is required for you to craft a program to monitor the duration / run time of a device.

 

Once again I thank you so very much in advance! 

Posted

Hello Xathros,

 

Lets start by tracking the fridge which this can be applied to anything else later on. I would like to know when the fridge starts, how long it ran for, then when it stopped.

 

I know roughly what the running power is, at rest / idle, defrost mode, etc. I can determine how long the fridge ran for using another device so the duration is a known value to me.

 

But, there is no method from the other third party device to control an insteon appliance. Please let me know if there is more information that is required for you to craft a program to monitor the duration / run time of a device.

 

Once again I thank you so very much in advance! 

What I need to know is how does the ISY know the fridge is running?  What is the input trigger to start/stop tracking the runtime ?

 

-Xathros

Posted (edited)

Do you not remember your old program, or are you purposely not posting it in order to see if someone has a fresh idea with a totally different approach?

Edited by jsu1995
Posted (edited)

What I need to know is how does the ISY know the fridge is running?  What is the input trigger to start/stop tracking the runtime ?

 

-Xathros

 

Since his thread title states "Energy Monitoring," I would assume he is using readings from the GEM to determine power consumption at any point in time.

Edited by jsu1995
Posted

Since his thread title states "Energy Monitoring," I would assume he is using readings from the GEM to determine power consumption at any point in time.

 Or possibly a synchrolinc.  Neither of which I own so either way, I need a bit more to go on to get started with a proper solution to the stated requirement.

 

-Xathros

Posted

 Or possibly a synchrolinc.  Neither of which I own so either way, I need a bit more to go on to get started with a proper solution to the stated requirement.

 

-Xathros

 

True. My GEM assumption was also based on the fact I know he has one and is always trying to find ways to control his ISY devices with it.  :)

 

Anyway, I'm am too interested in a similar program solution and am sad that you can't weigh in since you seem to be pretty knowledgeable about ISY programs.

Posted

What I need to know is how does the ISY know the fridge is running?  What is the input trigger to start/stop tracking the runtime ?

 

-Xathros

 

Apologies, the Green Eye Monitor (GEM) with the Energy Module will let the ISY know when the device is ON, based on a ISY Program user settings.

 

There are four programs that currently inform me when something is on / off. I will provide the screen capture below as I am now trying to expand on the ability to see how long something ran for and action it if it does not meet the set criteria.

post-1970-0-28623200-1406819897_thumb.png

post-1970-0-41129300-1406819903_thumb.png

post-1970-0-92068200-1406819909_thumb.png

post-1970-0-99587600-1406819915_thumb.png

Posted

Do you not remember your old program, or are you purposely not posting it in order to see if someone has a fresh idea with a totally different approach?

 

I am looking for a few new ideas with a different approach in programming. I would like to streamline the programs and if there are methods to do so this would be ideal.

 

I have a very large project in the works that depends on being able to accomplish this goal.

Posted

OK.  I'm going to ponder this over my lunch and will get back to you shortly.  In the meantime, can you define a few more parameters of the intended use:

 

Shutdown after X minutes/hrs of continuous operation and stay off until ?

 

Shutdown after X min/hrs of accumulated operation and stay off...

 

Are we reporting accumulated runtime?

 

There are a number of ways I can proceed but need to fully understand the intended goal.

 

-Xathros

Posted

OK.  I'm going to ponder this over my lunch and will get back to you shortly.  In the meantime, can you define a few more parameters of the intended use:

 

Shutdown after X minutes/hrs of continuous operation and stay off until ?

 

Shutdown after X min/hrs of accumulated operation and stay off...

 

Are we reporting accumulated runtime?

 

There are a number of ways I can proceed but need to fully understand the intended goal.

 

-Xathros

 

In my use case both of your suggestions would be required for various devices. Some just based on X minutes / hours of continuous use. Some of the devices would simply be left in a off state after meeting that duration.

 

Shutdown after X min/hrs of accumulated operation and stay off... <- That would be the final goal. But for now this specific program would just notify me its still running.

 

Are we reporting accumulated run time? <-- Yes, I would like to be able to see and track the run time. Then, tie it with another program that will react to a set / defined threshold based on the need of the user / appliance.

Posted (edited)

I wanted to provide a clearer picture of what I am trying to do and hope this information proves helpful to the next person. In the example we shall keep with the fridge.

 

There are two charts listed below: The one graph shows you when the defrost mode kicked in and how much power it draws when on. A person and easily see by moving the mouse to see how long it runs for etc. In the same chart you can see that the fridge comes on approx every 40 minutes, and runs for about 30 minutes.

 

The other chart you can clearly see the fridge was running for many hours and later on the defrost mode kicked in. Because the fridge at that point was probably nice and iced up etc. :x

 

ROOT CAUSE: Too much frozen food stuff inside the freezer and the door crept open. Thus causing longer run time, potential food loss.

 

So, the programs I would like to see and deploy is to first let me know how long something is running for. This will be applied to all devices in the home for reference, historic playback, and then ultimately, applied to a Insteon device to control its state.

 

Now, the other program of (run time / duration) would need to be tied to my other program which I have already provided above. Which informed the ISY when something is actually ON vs OFF.

post-1970-0-21292800-1406824792_thumb.png

post-1970-0-70728400-1406824797_thumb.png

Edited by Teken
Posted (edited)

Here is Program #1

 

This uses 2 state mvars: s.FridgeRuntimeCycleMins and s.FridgeRuntimeDailyMins

 

Program: FridgeRuntimeMonitor

If
   Status 'GEM Fridge Channel' >50W
   and Status 'GEM Fridge Channel' <800W

Then
        Wait  1 minute 
        Repeat Every  1 minute 
           $s.FridgeRuntimeCycleMins += 1
           $s.FridgeRuntimeCycleMins Init To $s.FridgeRuntimeCycleMins
           $s.FridgeRuntimeDailyMins += 1
           $s.FridgeRuntimeDailyMins Init To $s.FridgeRuntimeDailyMins
 
Else
        $s.FridgeRuntimeCycleMins  = 0
        $s.FridgeRuntimeCycleMins Init To $s.FridgeRuntimeCycleMins

Second Program Notifies if a cycle exceeds a threshold (45mins in this example).

 

This uses another state mvar: s.FridgeNotifySuspend

 

Program: FridgeCycleNotify

If
        $s.FridgeRuntimeCycleMins >= 45
    And $s.FridgeNotifySuspend is 0
 
Then
        Send Notification to 'YourCell' content 'FridgeCycleTimeExceeded'
        $s.FridgeNotifySuspend  = 1
 
Else
   - No Actions - (To add one, press 'Action')

Third program throttles notifications to no more than once every 30 mins in this example.

 

Program: FridgeNotifySuspend

If
        $s.FridgeNotifySuspend is 1
 
Then
        Wait  30 minutes 
        $s.FridgeNotifySuspend  = 0
 
Else
   - No Actions - (To add one, press 'Action')

Fourth Program counts defrost cycles daily.

This uses an integer mvar: i.FridgeDefrostCount

 

Program: FridgeDefrostCounter

If
   Status 'Gem Fridge Channel' > 800W

 
Then
    $i.FridgeDefrostCount += 1
    $i.FridgeDefrostCount Init To $i.FridgeDefrostCount

Else
   - No Actions - (To add one, press 'Action')

Fifth program is Daily report and will expand to report lots of other daily data as you expand your system.  For now, it only contains the above fridge example code.

 

Program: DailyReport

If
        Time is 11:59:50PM
 
Then
        Send Notification to 'YourCell' content 'DailyReport'
        Wait  20 seconds
        $i.FridgeDefrostCount  = 0
        $i.FridgeDefrostCount Init To 0
        $s.FridgeRuntimeDailyMins  = 0
        $s.FridgeRuntimeDailyMins Init To 0
 
Else
   - No Actions - (To add one, press 'Action')


Example Alert:

2014/07/31  2:11:58 PM: The normal fridge cycle time threshold has been exceeded. 

Current cycle has been running for: 45 minutes.

Example Daily Report:

Daily Report: 2014/07/31
Fridge ran for a total of: 396 minutes.
Fridge ran 1 defrost cycle(s) today.

Please note in the above examples, the syntax of the "Status GEM..." entries is not accurate.   These programs should serve as a solid basis on which to build your other monitor and manager programs from.  You can very easily act on the values of the state variables used in these examples for other uses.

 

Hope this is what you were looking for.

 

-Xathros

Edited by Xathros
Posted

Here is what my daily report looks like.  It might give you a few ideas.

 

post-1150-0-41883900-1406832685_thumb.jpg

 

-Xathros

 

Posted

That's awesome!  Nice work, Xathros.

 

 

. . . Although, I think you meant 300W (not 800W) for the defrost limits.

Posted

That's awesome!  Nice work, Xathros.

 

 

. . . Although, I think you meant 300W (not 800W) for the defrost limits.

Thank you. 

 

The 800W was a pure guess, I did not review the charts for the actuals.

 

-Xathros

Posted

Xathros,

 

Could you post up what the actual custom notification syntax looks like for me to confirm.

Posted (edited)

Xathros,

 

Could you post up what the actual custom notification syntax looks like for me to confirm.

Sure.  Here you go:

post-1150-0-69849900-1406838676_thumb.jpg

 

post-1150-0-16375900-1406838687_thumb.jpg

 

-Xathros

Edited by Xathros
Posted

Xathros,

 

When the fridge is actually running in normal mode. Should I not be able to see the variable increment keeping track of the time?

Posted

Hi Teken-

 

Yes, you should.  In my testing I was able to watch both the cycle and daily mvars increment once per minute.  Of course, I don't have a GEM and was using a state variable as my trigger instead.  Does the ISY see changes in the GEM values in real time and trigger status events when the values change?

 

-Xathros

Posted

Hi Teken-

 

Yes, you should.  In my testing I was able to watch both the cycle and daily mvars increment once per minute.  Of course, I don't have a GEM and was using a state variable as my trigger instead.  Does the ISY see changes in the GEM values in real time and trigger status events when the values change?

 

-Xathros

 

Hello Xathros,

 

Yes the ISY does in fact see real time state of change in power values. I meant to ask you reference (mvars) is this unique and different than how I have been creating normal state / integer variables?

 

If not great! If so, could you provide me a screen shot of what it looks in the ISY to ensure I am following your program logic correctly.

Posted

Hello Xathros,

 

It appears this is still my problem with the ISY-994iZ freezing up and not showing me the current state of programs / variables. Upon closing out the UI and reentering the UI interface I do in fact see the counter incrementing in the variable sections.

 

This ongoing freezing, is really making it hard to determine what I am doing and if the settings I have selected are correct! :x  I once again thank you so very much for taking the time to craft, share, and bestow your programming skills.

 

Thank You Sir

 

 

VIRTUAL BEER - MASSIVE VIRTUAL BEER - ONE HUGE KEG OF BEER FOR XATHROS

 

 

Posted

Custom notifications. Same as the example I provided just in HTML rather than text and a lot of HTML tags between the variables. The image is hosted on my website and referenced by it's URL.

 

-Xathros

Guest
This topic is now closed to further replies.

×
×
  • Create New...