Page 1 of 7

Device Usage Report IWS Plugin

PostPosted: Wed Mar 03, 2010 3:14 pm
by jay (support)
I've just uploaded a new Indigo Web Server plugin called the Device Usage Report that provides a rudimentary device usage report. It should give you a good idea of how many minutes a day the devices in your house are ON. You could use this data, in conjunction with something like a Kill A Watt (for plugin devices anyway) to figure out how much power is being used. But mainly, it gives you a clue about what devices in your house you may want to target for bulb replacement, auto-off triggers, etc.

Note, this plugin relies on a couple of things:

• SQLite must be configured properly and SQL logging enabled. Since it uses the logging data provided by SQL logging, it will only report data since you enables SQL logging - so a blank report most likely means that you didn't have SQL logging enabled for that day.

• For the most accurate reporting, devices should really be 2-way so if they are manually operated Indigo will see the change. All INSTEON devices of interest are 2-way, but only some X10 devices are.

Also note: only devices that were actually used during the day show up.

Enjoy!

Re: Device Usage Report IWS Plugin

PostPosted: Wed Mar 03, 2010 3:31 pm
by artpics
To install this plugin drag the "variable" folder to the following location:

i see no "variable" folder in the package :?:

Re: Device Usage Report IWS Plugin

PostPosted: Wed Mar 03, 2010 3:34 pm
by jay (support)
artpics wrote:
To install this plugin drag the "variable" folder to the following location:

i see no "variable" folder in the package :?:


Doh - cut/paste error - should say "usageReporter" folder...

Re: Device Usage Report IWS Plugin

PostPosted: Wed Mar 03, 2010 3:40 pm
by jay (support)
One other thing that I should mention about it: since it uses the logging data provided by SQL logging, it will only report data SINCE you enable SQL logging - so a blank report most likely means that you didn't have SQL logging enabled for that day.

Re: Device Usage Report IWS Plugin

PostPosted: Wed Mar 03, 2010 3:44 pm
by artpics
Great all working now thanks for the continued development :D
also i quit indigo and relaunched but it did not show up so i went to stop server and restart server and it works. :)

any chance we can have the link on the main webserver page

Displays recent Event Log files.
iTunes Remote Control
Mini View by seaofclouds

Usage Report

like the other plugins

Image

Re: Device Usage Report IWS Plugin

PostPosted: Wed Mar 03, 2010 4:45 pm
by jay (support)
artpics wrote:
any chance we can have the link on the main webserver page


Done - sorry, I had a few things wrong - I was using a really old template to build from. Fixed now, just download it again and replace the usageReporter folder.

Re: Device Usage Report IWS Plugin

PostPosted: Wed Mar 03, 2010 4:47 pm
by jay (support)
By the way, only devices that were actually operated during that day will show up in the report. Some may show 0 minutes used - that's because they were on less than one minute. I may fix that sometime later (or someone else can!)

Re: Device Usage Report IWS Plugin

PostPosted: Wed Mar 03, 2010 4:59 pm
by berkinet
Jay: Thanks for a cool plugin.

in the ReadMe, Jay wrote:
There are several things that should be done to the plugin if anyone wants to take a shot at adding them:

• A graphical popup calendar date picker would be much nicer than typing in a date
• Date ranges rather than just a single day
• Export the data into CSV or something
• Ability to exclude some devices from reports
• Add in Thermostats (not very helpful until we can really measure when the unit is running), Sprinklers, and IO devices

How about extending that list to include...
• Provide a means to store the wattage of each device, and electricity price per watt, so the report can display real world electrical usage and cost.

Re: Device Usage Report IWS Plugin

PostPosted: Wed Mar 03, 2010 5:11 pm
by jay (support)
Excellent idea Richard. You might even do some math based on brightness (yeah, I know it's not linear, but still) to get a closer approximation.

Why don't you get started on that?? :D

Seriously, though, I added the Enhancements section hoping that someone would continue working on it - it's not terribly difficult and may be a good way to ease into Python programming (which will be SUPER useful for writing Indigo Plugins in 5.0). For instance, adding some kind of prefs to store stuff wouldn't be too hard. Just be sure to store them somewhere outside the plugin so that they don't get overwritten when the plugin is revised. The Preferences directory is the obvious choice... ;)

Re: Device Usage Report IWS Plugin

PostPosted: Wed Mar 03, 2010 5:17 pm
by berkinet
jay wrote:
...For instance, adding some kind of prefs to store stuff wouldn't be too hard. Just be sure to store them somewhere outside the plugin so that they don't get overwritten when the plugin is revised. The Preferences directory is the obvious choice... ;)

Or, while you are working on 5.0, add a comments section for devices. It could be plain text with any desired formatting left up to the user. For example
Comments:watts=100,brand=ge

That way the meta data would be stored with everything else known about the device.

Re: Device Usage Report IWS Plugin

PostPosted: Wed Mar 03, 2010 5:26 pm
by jay (support)
That's pretty much what the current "Description" field is - it can be used for anything you like.

Now, adding arbitrary properties is an interesting idea. I believe one of our competitors does that already.

Re: Device Usage Report IWS Plugin

PostPosted: Wed Mar 03, 2010 5:29 pm
by berkinet
Yeah, I know that, but I like to use that for operational comments, like "linked 3-way," "East side of room," "Virtual X10 A1," etc. Adding additional, possibly cryptically formatted to that field might overload it's current usability.

Re: Device Usage Report IWS Plugin

PostPosted: Wed Mar 03, 2010 5:34 pm
by jay (support)
The same would happen to a new "Comments" field - someone would use it for one purpose, someone else for something else, etc. If we were to add any kind of feature like that, it would be arbitrary properties. I added it to the list because I really like the idea, but who knows if it will make 5.0.

Re: Device Usage Report IWS Plugin

PostPosted: Wed Mar 03, 2010 5:38 pm
by matt (support)
I was hoping to add device level meta data into 5.0. As Jay said, no promises but if the first beta of 5.0 (still a long ways out) doesn't have it then bug me again. I think it needs it. ;-)

Re: Device Usage Report IWS Plugin

PostPosted: Wed Mar 03, 2010 7:04 pm
by artpics
Jay on the download page with instructions you say.

Usage
To use this plugin from a browser, try the url:

http://yourhost:yourport/usageReport

it should be

http://yourhost:yourport/usageReporter