Device Usage Report IWS Plugin

Posted on
Mon Mar 22, 2010 9:08 am
kpfriedberg offline

Re: Device Usage Report IWS Plugin

jay wrote:
Berkinet modified that logic so maybe he can explain it. I believe after his modification it should NEVER show data from Midnight to 6am but I'm not positive.

Ok, but why would that be? I want that data, especially to estimate costs of outdoor night lights...

jay wrote:
I suspect that it's devices that were on sub 1-minute and the 0 is a rounding error - I took care of those in the visible report buy perhaps berkinet needs to look at that for the export.

So only devices with minutes used should download? just confirming.

Posted on
Mon Mar 22, 2010 9:20 am
jay (support) offline
Site Admin
User avatar
Posts: 8915
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Device Usage Report IWS Plugin

kpfriedberg wrote:
Ok, but why would that be? I want that data, especially to estimate costs of outdoor night lights...


Well, it has to be one way or another: if the first command you see in any give day for a device is "OFF", do you assume that it's been ON since midnight OR that something else was going on (missed command, extra OFF, etc). My first implementation assumed the former, berkinet decided that the latter was more appropriate. In either event, you're likely to get some of the data wrong.

You have to keep in mind - I never billed this as a true energy tracking system. I specifically said on the File Library page and in the ReadMe that the data should be used to grossly identify devices that are most used and potential candidates for CFL or LED bulbs or devices that could use an auto-off function. Basing true energy monitoring on current INSTEON technology isn't foolproof and this tool certainly isn't meant to be used in that way.

kpfriedberg wrote:
So only devices with minutes used should download? just confirming.


Yes - only devices that have been on for a minute or more will show up in the displayed report. No idea about the export since I didn't write that.

Jay (Indigo Support)
Twitter | Facebook

Posted on
Mon Mar 22, 2010 9:42 am
kpfriedberg offline

Re: Device Usage Report IWS Plugin

jay wrote:
Well, it has to be one way or another: if the first command you see in any give day for a device is "OFF", do you assume that it's been ON since midnight OR that something else was going on (missed command, extra OFF, etc). My first implementation assumed the former, berkinet decided that the latter was more appropriate. In either event, you're likely to get some of the data wrong.

You have to keep in mind - I never billed this as a true energy tracking system. I specifically said on the File Library page and in the ReadMe that the data should be used to grossly identify devices that are most used and potential candidates for CFL or LED bulbs or devices that could use an auto-off function. Basing true energy monitoring on current INSTEON technology isn't foolproof and this tool certainly isn't meant to be used in that way.


I would humbly submit that i prefer your method.

I understand it was never intended to be true energy tracking, but it seems to me it could be without too much effort. unfortunately, i have zero coding capabilities :cry:

Posted on
Mon Mar 22, 2010 4:16 pm
berkinet offline
User avatar
Posts: 2409
Joined: Nov 18, 2008
Location: Mougins, France & Berkeley, CA, USA

Re: Device Usage Report IWS Plugin

The problem with on/off state assumption is that unless you go back in history to find the last change for a device, (as Jay noted) you just have to guess. This report is pretty simple, it just issues a SQL query for every record for every device that had usage during a period of 00:00-23:59 for a given date. So, repeating what Jay said, you must start with an assumption that every device is ON or every device is OFF at the start of the data period. I felt that at mid-night it is more likely, on average, that most devices will be OFF, so that was the state I assumed.

However, if you run the AppleScript I submitted to this topic, you can avoid the state assumption issue by recording the actual state of each device just after mid-night. I knocked the script out pretty quickly, so there might be some bugs in the logic, but the concept seems sound. If anyone has some improvements to offer in the script, please post them here.

As to the saved data. I do not have a copy of the code available at the moment. But, all I did was to loop through the array (Ok, dictionary, for you Python lovers) and write out every entry. I seem to recall that for the HTML report the same raw data is sent to the web display script, but it contains logic to trim small amounts. I'll check next time I get a chance, or maybe Jay can confirm. In any case, since the file data will likely be used as input to other processes, I would imagine those processes, just as the web display process, can make their own assumption about what to keep or toss. Also, is someone wants to track usage over a longer period, small amounts of time may become significant, especially for high-wattage devices.

Posted on
Tue Mar 23, 2010 6:13 pm
kpfriedberg offline

Re: Device Usage Report IWS Plugin

berkinet wrote:
However, if you run the AppleScript I submitted to this topic, you can avoid the state assumption issue by recording the actual state of each device just after mid-night. I knocked the script out pretty quickly, so there might be some bugs in the logic, but the concept seems sound. If anyone has some improvements to offer in the script, please post them here.


can you help me with this...given i have night lights that stay on through midnight i am missing some key data.

I'd really like to help adjust the output file, but i have no skillz as they say.

Posted on
Wed Mar 24, 2010 2:07 am
berkinet offline
User avatar
Posts: 2409
Joined: Nov 18, 2008
Location: Mougins, France & Berkeley, CA, USA

Re: Device Usage Report IWS Plugin

kpfriedberg wrote:
...can you help me with this...given i have night lights that stay on through midnight i am missing some key data.
Check-out this posting in this thread. The explanation should be fairly clear. But. please post any questions.

Posted on
Mon Sep 26, 2011 5:44 pm
bbruck offline
Posts: 279
Joined: Oct 05, 2008

Re: Device Usage Report IWS Plugin

Is this report compatible w/ v5? I am getting no entries in the report using v5, while if I look for historical data from a couple months back when I ran v4, the report produces data.

Who is online

Users browsing this forum: No registered users and 0 guests