Device behind the circle On or Off

Plugwise Forum about Plugwise devices and the Source software.
Bwired
Administrator
Administrator
Posts: 4704
Joined: Sat Mar 25, 2006 1:07 am
Location: Netherlands
Contact:

Device behind the circle On or Off

Post by Bwired »

For every device behind my plugwise circles you know how much power it is consuming when it's off. for example I have a Washing machine which is consuming 2.5 Watts when it's Off. So it is very easy to tell if a device behind a circle is really On, Off or in standby.

This way you can log in a database for example how long and how many times the TV was On. Simply check the current power usage, if it is larger then the Off power usage the device behind the circle is On.

I log these changes in a database and this way I know for all my devices how many times and how long each time they are used.
It's also nice to see How many times the fridge is going on and off.
When you have this data it's also very easy to make some charts.

Check this page (way down the page) to see the logging real time
http://www.bwired.nl/plugwise.asp

<i>below you can see some logging and how long a device was On or Off</i>
Image
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Device behind the circle On or Off

Post by Digit »

Nice! First step towards creating a standby-killer?
Mdamen
Forum Moderator
Forum Moderator
Posts: 390
Joined: Sat Nov 22, 2008 6:58 pm
Location: Netherlands
Contact:

Device behind the circle On or Off

Post by Mdamen »

Cool Pieter, I will implement this in my houseagent software. My plugwise code already passed the 1000 code lines [:)]
What is your checking time of the power usage? (60 seconds is the default in the source)


--
Maarten Damen

www.maartendamen.com
User avatar
Rene
Global Moderator
Global Moderator
Posts: 1689
Joined: Wed Oct 08, 2008 3:54 pm
Location: Netherlands

Device behind the circle On or Off

Post by Rene »

When monitoring the Circles via the Source software, using an XML file, you should check more often than 60 seconds. The Source software checks each Circle each 60 seconds, but not all Circles are checked at the same time. This means that the status of all Circles, as obtained by the XML file, is updated more frequently than once each 60 seconds. I update the status each 10 seconds in my Homeseer plugin.

Rene.
User avatar
Rene
Global Moderator
Global Moderator
Posts: 1689
Joined: Wed Oct 08, 2008 3:54 pm
Location: Netherlands

Device behind the circle On or Off

Post by Rene »

By the way, where do you get these 60 seconds from? I did some tests by powering off an appliance connected to a Circle and it took exactly 2 minutes before the XML file reflected the 0 Watt usage.

Rene.
Mdamen
Forum Moderator
Forum Moderator
Posts: 390
Joined: Sat Nov 22, 2008 6:58 pm
Location: Netherlands
Contact:

Device behind the circle On or Off

Post by Mdamen »

Ah ok, I'm not familar with the builtin webserver. Thanks for the info.

Hmm.. I got it using a serial sniffer. I have 60 seconds in my code, it might be 120 seconds though.. maybe i've changed it later on.

To stress test my houseagent code I did a device information request every second (2 test devices).. this was working fine.

--
Maarten Damen

www.maartendamen.com
Bwired
Administrator
Administrator
Posts: 4704
Joined: Sat Mar 25, 2006 1:07 am
Location: Netherlands
Contact:

Device behind the circle On or Off

Post by Bwired »

Right, you need to check it more often. 60 seconds is just a setting and is a parameter in my software.
There is also a strange update behavior, if you run the XML then the source is updated with the new readings, but they are not in the XML response.
You see the readings then in the next XML run. So if you run the XML twice then you have the correct reading directly.
So I think this is a bug in the Plugwise source webserver. Can you confirm this?
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Device behind the circle On or Off

Post by Digit »

This is what can be found in the webserver pdf:

"The Appliance object is the representation of the Appliance entity in the application. All returned information is last known, not necessarily current. This prevents page delays as a result of slow communication or offline modules. Immediately after the last known info
is returned, a request to the application is queued to refresh the info, so that the next time the information is requested, an updated version is returned."

Using the module object will give realtime info but is a blocking call.
Bwired
Administrator
Administrator
Posts: 4704
Joined: Sat Mar 25, 2006 1:07 am
Location: Netherlands
Contact:

Device behind the circle On or Off

Post by Bwired »

Thanks for pointing out :-)
This tells me also that the total power usage is also being calculated in the source software and not in the circle.
Who is polling the module object?
Mdamen
Forum Moderator
Forum Moderator
Posts: 390
Joined: Sat Nov 22, 2008 6:58 pm
Location: Netherlands
Contact:

Device behind the circle On or Off

Post by Mdamen »

Well yes and no the total power usage is calculated in the source.
The circle has a power buffer, with all the power data since the last reset. Each log entry in this power buffer has 4 hours of data.
This buffer information can be found in the access database (table Module_Data_Buffer)
This is also how it can log information while the PC with the source on it is not on.
Then for charting etc. all buffer are added to eachother and put in the table: Appliance_log.
The counters 1 to 24 in this log are the hours with kwh's. The colums counter_peak and counter_offpeak hold the total usage for that day.

I already succeeded reading these power buffers.. just needs some more optimisation, then I will post the details.

--
Maarten Damen

www.maartendamen.com
Bwired
Administrator
Administrator
Posts: 4704
Joined: Sat Mar 25, 2006 1:07 am
Location: Netherlands
Contact:

Device behind the circle On or Off

Post by Bwired »

Great!
A lot of tables in my MDB are empty, Module_Data_Buffer nothing in it!
Mdamen
Forum Moderator
Forum Moderator
Posts: 390
Joined: Sat Nov 22, 2008 6:58 pm
Location: Netherlands
Contact:

Device behind the circle On or Off

Post by Mdamen »

That's weird, and your stats display just fine?

--
Maarten Damen

www.maartendamen.com
Bwired
Administrator
Administrator
Posts: 4704
Joined: Sat Mar 25, 2006 1:07 am
Location: Netherlands
Contact:

Device behind the circle On or Off

Post by Bwired »

yes! data for more then 6 months!
Mdamen
Forum Moderator
Forum Moderator
Posts: 390
Joined: Sat Nov 22, 2008 6:58 pm
Location: Netherlands
Contact:

Device behind the circle On or Off

Post by Mdamen »

Wait.. it's late [:)]
Did you look in the application data or plugwise folder under program files ? [:)]

The default database is in program files which is empty the other one has contents... if you did you look in the right DB can you send me your MDB because it's a nice case then.




--
Maarten Damen

www.maartendamen.com
Bwired
Administrator
Administrator
Posts: 4704
Joined: Sat Mar 25, 2006 1:07 am
Location: Netherlands
Contact:

Device behind the circle On or Off

Post by Bwired »

I was searching already and found the Plugwise.MDB on
C:\Documents and Settings\Administrator\Application Data\Plugwise\Source\DB
15.000 records in there, Yeb it's late [:)]
Post Reply

Return to “Plugwise Forum”