Plugwise + Linux

Plugwise Forum about Plugwise devices and the Source software.
Post Reply
daromer
Starting Member
Starting Member
Posts: 42
Joined: Sat Oct 24, 2009 2:41 pm
Location: Sweden

Plugwise + Linux

Post by daromer »

Got some questions about plugwise i havent managed to get answers on (Searchfunction wont let me do the searches i want)

1. Is there released anything newer by anyone so that i can poll the devices in linux? (except pol.py or that program made in gambas)
2. Is it planned that on powerfailure an unit starts up with the same status as before? ie on or off.
3. Is it possible to have source running on a windows machine without it doing anything and then do xml polls from my own server to poll the data?

at the moment i poll my plugs as fast as possible. ie round and round all the time with pol. this due to i want to monitor changes as soon as possible. this works well and i developed some software to manage on/off and all that aswell. But im still in planstage if im gonna use plugwise or develop my own with zigbee and get all the functions that i actually want that dosnt exist in plugwise.
YogiBear75
Starting Member
Starting Member
Posts: 24
Joined: Thu Dec 31, 2009 12:41 am

Re: Plugwise + Linux

Post by YogiBear75 »

Hi there,

I'm also interested in your findings.
I have a Linux server myself. Testing as I type with Gambas, the Domotiga standalone version.
It is working, at least I get my readings from the Circles, but I don't seem to get the Circles to switch :shock:
I know they are looking into making a Universal Domotica devices Perl module:

It's a bit of French, but it's Readable.
Hopefully someone will also get the hang of the 'archive' data of the Circles :)
And it would be nice if the Logitech Harmony Remote will be supported in the feature somehow :D
Mdamen
Forum Moderator
Forum Moderator
Posts: 390
Joined: Sat Nov 22, 2008 6:58 pm
Location: Netherlands
Contact:

Re: Plugwise + Linux

Post by Mdamen »

@daromar:

1. What exact extra functionality are you looking for? I currently stopped development until the new firmware version (2) comes out.. if anyone could supply me with that I am very happy :-)
2. Not that I am aware of, you might want to post this request in a seperate thread so Reinder can pick it up.
3. Yes, that's possible.. plugwise source has an API..
daromer
Starting Member
Starting Member
Posts: 42
Joined: Sat Oct 24, 2009 2:41 pm
Location: Sweden

Re: Plugwise + Linux

Post by daromer »

1. pol.py cant handle if a device is offline or if the device dosnt exist. it stalls. (though i rebuilt my scripts to take care of it since i dont know pyhon at all)
Im missing that i cant check if the device is actually turned of or on but that perhaps dosnt exist in the plugs at all?

2. Think that request is already send.


The reason i ask this is due to im working on my own devices that are the same as plugwise though with alot of extra functions. But at the moment i dont have much sparetime and thinking of buying plugwises devices but they do need to work fully on my linux and atm they are missing some major functions. :x
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: Plugwise + Linux

Post by RDNZL »

@Yogibear75
I use Plugwise plugs on Linux, I can see status, switch and measure energy usage.

Still on the old FW until Maarten looked at the new one ;-)

What exactly happens if you try to switch a plug in Domotiga?
If you enabled Plugwise debug what do you see in the debug log?
Regards, Ron.
Mdamen
Forum Moderator
Forum Moderator
Posts: 390
Joined: Sat Nov 22, 2008 6:58 pm
Location: Netherlands
Contact:

Re: Plugwise + Linux

Post by Mdamen »

@daromer:

Just to let you know:
1. Is on my list for POL 2.0 (see forum post about this)
2. This is still not fixed in new firmware (I just tested this) Can't you keep track of power status in your software?
daromer
Starting Member
Starting Member
Posts: 42
Joined: Sat Oct 24, 2009 2:41 pm
Location: Sweden

Re: Plugwise + Linux

Post by daromer »

Hi, I can keep track of it in my software yes. Though a function to fetch status from them would have been awesome aswell.
YogiBear75
Starting Member
Starting Member
Posts: 24
Joined: Thu Dec 31, 2009 12:41 am

Re: Plugwise + Linux

Post by YogiBear75 »

@RDNZL

It doesnot seem to do anything:
I have the device settings set to can be switched, but it's not working
In the control device tab, I can see the two Circles, but none of them is able to switch off.
It works with Pol and with Source (Plugwise appl.)


## Plugwise debug in domotiga ####

Code: Select all

2010/01/06 17:04:26 'Switched Kerstboom Off'

2010/01/06 17:04:26 [Plugwise] MAC: 000D6F00004BE5D9
2010/01/06 17:04:26 [Plugwise] String: 0017000D6F00004BE5D900 CRC: 3E6
2010/01/06 17:04:26 [Plugwise] Write: 0017000D6F00004BE5D9003E6

2010/01/06 17:06:23 'Switched Kerstboom On'

2010/01/06 17:06:23 [Plugwise] MAC: 000D6F00004BE5D9
2010/01/06 17:06:23 [Plugwise] String: 0017000D6F00004BE5D901 CRC: 13C7
2010/01/06 17:06:23 [Plugwise] Write: 0017000D6F00004BE5D90113C7

###################################################################3

But getting the powerusage is working, it's even working with rrdtool

2010/01/06 17:06:12 [Plugwise] checking power usage of device 'Kerstboom' with address 000D6F00004BE5D9
2010/01/06 17:06:12 [Plugwise] MAC: 000D6F00004BE5D9
2010/01/06 17:06:12 [Plugwise] String: 0026000D6F00004BE5D9 CRC: AFE4
2010/01/06 17:06:12 [Plugwise] Write: 0026000D6F00004BE5D9AFE4

2010/01/06 17:06:12 [Plugwise] GetCalibration Result: 3F802571B5E5DEDB3D01448600000000B256
??61 : 000D6F00
2010/01/06 17:06:12 [Plugwise] GainA: 1.00114262104
2010/01/06 17:06:12 [Plugwise] GainB: -1.712668904474E-6
2010/01/06 17:06:12 [Plugwise] OffTot: 0.031559489667
2010/01/06 17:06:12 [Plugwise] OffRuis: 5.877471754111E-39
2010/01/06 17:06:12 [Plugwise] Write: 0012000D6F00004BE5D9EC1E

2010/01/06 17:06:12 [Plugwise] GetPowerInfo Result: 001C001C000027566548

2010/01/06 17:06:12 [Plugwise] Pulses: 001C (hex) 28
2010/01/06 17:06:12 [Plugwise] Corrected Pulses: 28.062210146376
2010/01/06 17:06:12 [Plugwise] kWh: 0.059841981393
2010/01/06 17:06:12 [Plugwise] Watt: 59.841981392924
2010/01/06 17:06:12 [Plugwise] checking relay state of device 'Kerstboom' with address 000D6F00004BE5D9
2010/01/06 17:06:12 [Plugwise] MAC: 000D6F00004BE5D9
2010/01/06 17:06:12 [Plugwise] String: 0023000D6F00004BE5D9 CRC: FC8E
2010/01/06 17:06:12 [Plugwise] Write: 0023000D6F00004BE5D9FC8E

2010/01/06 17:06:12 [Plugwise] GetDeviceInfo Result: 000D6F00004BE5D9000059200004475801
2010/01/06 17:06:12 [Plugwise] MAC Received: 000D6F00004BE5D9
2010/01/06 17:06:12 [Plugwise] RelayState: 01 On
2010/01/06 17:06:12 [Plugwise] checking power usage of device 'TV + Audio' with address 000D6F000059AAC3
2010/01/06 17:06:12 [Plugwise] MAC: 000D6F000059AAC3
2010/01/06 17:06:12 [Plugwise] String: 0026000D6F000059AAC3 CRC: EDD9
2010/01/06 17:06:12 [Plugwise] Write: 0026000D6F000059AAC3EDD9

2010/01/06 17:06:13 [Plugwise] GetCalibration Result: 3F7F39EEB59FBB373D11C9EB000000004BC1

2010/01/06 17:06:13 [Plugwise] GainA: 0.996977686882
2010/01/06 17:06:13 [Plugwise] GainB: -1.190090983982E-6
2010/01/06 17:06:13 [Plugwise] OffTot: 0.035592954606
2010/01/06 17:06:13 [Plugwise] OffRuis: 5.877471754111E-39
2010/01/06 17:06:13 [Plugwise] Write: 0012000D6F000059AAC3AE23

2010/01/06 17:06:13 [Plugwise] GetPowerInfo Result: 000A000900000DBC61F1

2010/01/06 17:06:13 [Plugwise] Pulses: 0009 (hex) 9
2010/01/06 17:06:13 [Plugwise] Corrected Pulses: 9.008295739174
2010/01/06 17:06:13 [Plugwise] kWh: 0.019209971816
2010/01/06 17:06:13 [Plugwise] Watt: 19.209971815967
2010/01/06 17:06:13 [Plugwise] checking relay state of device 'TV + Audio' with address 000D6F000059AAC3
2010/01/06 17:06:13 [Plugwise] MAC: 000D6F000059AAC3
2010/01/06 17:06:13 [Plugwise] String: 0023000D6F000059AAC3 CRC: BEB3
2010/01/06 17:06:13 [Plugwise] Write: 0023000D6F000059AAC3BEB3

2010/01/06 17:06:13 [Plugwise] GetDeviceInfo Result: 000D6F000059AAC300005920000448C001
2010/01/06 17:06:13 [Plugwise] MAC Received: 000D6F000059AAC3
2010/01/06 17:06:13 [Plugwise] RelayState: 01 On
2010/01/06 17:06:23 [Plugwise] MAC: 000D6F00004BE5D9
2010/01/06 17:06:23 [Plugwise] String: 0017000D6F00004BE5D901 CRC: 13C7
2010/01/06 17:06:23 [Plugwise] Write: 0017000D6F00004BE5D90113C7

2010/01/06 17:06:47 [RRDTool] rrdtool update /usr/src/svn/domotiga/rrd/kerstboom.rrd N:59.842:0.06 2>&1 >/dev/null
2010/01/06 17:06:47 [RRDTool] rrdtool update /usr/src/svn/domotiga/rrd/tv+audio.rrd N:19.21:0.019 2>&1 >/dev/null
2010/01/06 17:07:12 [Plugwise] checking power usage of device 'Kerstboom' with address 000D6F00004BE5D9
2010/01/06 17:07:12 [Plugwise] MAC: 000D6F00004BE5D9
2010/01/06 17:07:12 [Plugwise] String: 0026000D6F00004BE5D9 CRC: AFE4
2010/01/06 17:07:12 [Plugwise] Write: 0026000D6F00004BE5D9AFE4

2010/01/06 17:07:12 [Plugwise] GetCalibration Result: 3F802571B5E5DEDB3D01448600000000B256

2010/01/06 17:07:12 [Plugwise] GainA: 1.00114262104
2010/01/06 17:07:12 [Plugwise] GainB: -1.712668904474E-6
2010/01/06 17:07:12 [Plugwise] OffTot: 0.031559489667
2010/01/06 17:07:12 [Plugwise] OffRuis: 5.877471754111E-39
2010/01/06 17:07:12 [Plugwise] Write: 0012000D6F00004BE5D9EC1E

2010/01/06 17:07:12 [Plugwise] GetPowerInfo Result: 001C001B00002DD9C5B4

2010/01/06 17:07:12 [Plugwise] Pulses: 001B (hex) 27
2010/01/06 17:07:12 [Plugwise] Corrected Pulses: 27.061161722125
2010/01/06 17:07:12 [Plugwise] kWh: 0.057707269948
2010/01/06 17:07:12 [Plugwise] Watt: 57.707269947712
2010/01/06 17:07:12 [Plugwise] checking relay state of device 'Kerstboom' with address 000D6F00004BE5D9
2010/01/06 17:07:12 [Plugwise] MAC: 000D6F00004BE5D9
2010/01/06 17:07:12 [Plugwise] String: 0023000D6F00004BE5D9 CRC: FC8E
2010/01/06 17:07:12 [Plugwise] Write: 0023000D6F00004BE5D9FC8E

2010/01/06 17:07:12 [Plugwise] GetDeviceInfo Result: 000D6F00004BE5D9000059200004475801
2010/01/06 17:07:12 [Plugwise] MAC Received: 000D6F00004BE5D9
2010/01/06 17:07:12 [Plugwise] RelayState: 01 On
2010/01/06 17:07:12 [Plugwise] checking power usage of device 'TV + Audio' with address 000D6F000059AAC3
2010/01/06 17:07:12 [Plugwise] MAC: 000D6F000059AAC3
2010/01/06 17:07:12 [Plugwise] String: 0026000D6F000059AAC3 CRC: EDD9
2010/01/06 17:07:12 [Plugwise] Write: 0026000D6F000059AAC3EDD9

2010/01/06 17:07:13 [Plugwise] GetCalibration Result: 3F7F39EEB59FBB373D11C9EB000000004BC1

2010/01/06 17:07:13 [Plugwise] GainA: 0.996977686882
2010/01/06 17:07:13 [Plugwise] GainB: -1.190090983982E-6
2010/01/06 17:07:13 [Plugwise] OffTot: 0.035592954606
2010/01/06 17:07:13 [Plugwise] OffRuis: 5.877471754111E-39
2010/01/06 17:07:13 [Plugwise] Write: 0012000D6F000059AAC3AE23

2010/01/06 17:07:13 [Plugwise] GetPowerInfo Result: 0009000900000FED8CB7

2010/01/06 17:07:13 [Plugwise] Pulses: 0009 (hex) 9
2010/01/06 17:07:13 [Plugwise] Corrected Pulses: 9.008295739174
2010/01/06 17:07:13 [Plugwise] kWh: 0.019209971816
2010/01/06 17:07:13 [Plugwise] Watt: 19.209971815967
2010/01/06 17:07:13 [Plugwise] checking relay state of device 'TV + Audio' with address 000D6F000059AAC3
2010/01/06 17:07:13 [Plugwise] MAC: 000D6F000059AAC3
2010/01/06 17:07:13 [Plugwise] String: 0023000D6F000059AAC3 CRC: BEB3
2010/01/06 17:07:13 [Plugwise] Write: 0023000D6F000059AAC3BEB3

2010/01/06 17:07:13 [Plugwise] GetDeviceInfo Result: 000D6F000059AAC300005920000448C001
2010/01/06 17:07:13 [Plugwise] MAC Received: 000D6F000059AAC3
2010/01/06 17:07:13 [Plugwise] RelayState: 01 On
2010/01/06 17:07:47 [RRDTool] rrdtool update /usr/src/svn/domotiga/rrd/kerstboom.rrd N:57.707:0.058 2>&1 >/dev/null
2010/01/06 17:07:48 [RRDTool] rrdtool update /usr/src/svn/domotiga/rrd/tv+audio.rrd N:19.21:0.019 2>&1 >/dev/null
wusel
Starting Member
Starting Member
Posts: 19
Joined: Sat Jan 16, 2010 6:48 pm
Contact:

Re: Plugwise + Linux

Post by wusel »

JFTR:
daromer wrote:1. Is there released anything newer by anyone so that i can poll the devices in linux? (except pol.py or that program made in gambas)
I've finally written a module for http://ww.fhem.de/ and have it running now. It queries my Circles (currently) every 30 seconds and notifies the FHEM infrastructure if there are changes (i. e. you could trigger something based on current load). While being at it, I noticed that what Maarten describend in domoticaforum.eu/viewtopic.php?f=39& ... p;start=30 as "yet unknown" (3rd value in "powerinfo" besides pulse8sec & puls1sec) looks remarkebly like some kind of "total pulses" counter to me after hex2int():

Code: Select all

2010.01.23 15:35:24 1: Pw_Circle Circle_1: GetStatus restarted timer, sending measure 4be246
2010.01.23 15:35:24 1: Circle_1: difference: 256 (30 sec), 8 sec pulses, 1 sec, totals: 8, 8, 18374
2010.01.23 15:35:34 1: Pw_Circle Circle_Sheeva: GetStatus restarted timer, sending measure 59af7f
2010.01.23 15:35:34 1: Circle_Sheeva: difference: 193 (30 sec), 8 sec pulses, 1 sec, totals: 6, 6, 13583
2010.01.23 15:35:54 1: Pw_Circle Circle_1: GetStatus restarted timer, sending measure 4be246
2010.01.23 15:35:54 1: Circle_1: difference: 256 (30 sec), 8 sec pulses, 1 sec, totals: 9, 8, 18630
[...]
2010.01.23 15:50:27 1: Pw_Circle Circle_1: GetStatus restarted timer, sending measure 4be246
2010.01.23 15:50:27 1: Circle_1: difference: 259 (30 sec), 8 sec pulses, 1 sec, totals: 8, 8, 26121
2010.01.23 15:50:27 1: Circle_1: calibration info too old (30 seconds).
2010.01.23 15:50:35 1: Pw_Circle Circle_Sheeva: GetStatus restarted timer, sending measure 59af7f
2010.01.23 15:50:35 1: Circle_Sheeva: difference: 193 (30 sec), 8 sec pulses, 1 sec, totals: 7, 6, 19375
2010.01.23 15:50:57 1: Pw_Circle Circle_1: GetStatus restarted timer, sending measure 4be246
2010.01.23 15:50:57 1: Circle_1: difference: 259 (30 sec), 8 sec pulses, 1 sec, totals: 8, 8, 26380
Circle_1: between 8 & 9 pulses, 30 (seconds) * 8.5 ((8+9)/2) is 255.
Circle_Sheeva: 6 to 7 pulses/second ofer 8 seconds, 30*6.5 is 195.

But I don't have enough Circles nor load to say that for sure.

Question to Maarten/anyone else who has deeper knowledge on the function of Plugwise:

Is it really neccessary to query first for "calibrate" and then for "powerinfo"? Every time "powerinfo" is wanted? Or is "calibrate" needed only once, say, a day? In pol.py, which seems to be what all other stuff is modelled after (xPL-plugwise, DomotiGa; more?), to get power information you must get calibration info first, sure. But for a daemon/stand alone programm like The Source, this seems to be rather impractical; if calibration info would be volatile, I would have expected the Plugwise firmware to return this alongside with the consuption data, as data transfer as well as processing takes time and so two queries can never be in-sync ... Comments?

Regards,
-kai
--
Kai 'wusel' Siering, Blog: http://blogdoch.net/
Mdamen
Forum Moderator
Forum Moderator
Posts: 390
Joined: Sat Nov 22, 2008 6:58 pm
Location: Netherlands
Contact:

Re: Plugwise + Linux

Post by Mdamen »

Thanks for the hint.. I'll look into that!

About the calibration value.. you only need to get it from the circle once.
But as pol.py is merely a proof of concept, there is no daemonized mode in it that keeps track off stuff.
So, yes you can get the values and calculate with it later.
wusel
Starting Member
Starting Member
Posts: 19
Joined: Sat Jan 16, 2010 6:48 pm
Contact:

Re: Plugwise + Linux

Post by wusel »

Mdamen wrote:Thanks for the hint.. I'll look into that!
I'm quite confident that that's a (wrapping at some point/value) "totals" counter:
2010.01.24 00:23:43 1: Circle_Sheeva: difference: 193 (30 sec), 8 sec pulses, 1 sec, totals: 6, 6, 8993
2010.01.24 00:23:58 1: Circle_1: difference: 180 (30 sec), 8 sec pulses, 1 sec, totals: 5, 6, 8428
2010.01.24 00:24:13 1: Circle_Sheeva: difference: 193 (30 sec), 8 sec pulses, 1 sec, totals: 6, 6, 9186
2010.01.24 00:24:29 1: Circle_1: difference: 193 (31 sec), 8 sec pulses, 1 sec, totals: 6, 6, 8608
2010.01.24 00:24:43 1: Circle_Sheeva: difference: 202 (30 sec), 8 sec pulses, 1 sec, totals: 7, 6, 9379
2010.01.24 00:25:13 1: Circle_Sheeva: difference: 248 (30 sec), 8 sec pulses, 1 sec, totals: 8, 7, 9581
2010.01.24 00:25:43 1: Circle_Sheeva: difference: 247 (30 sec), 8 sec pulses, 1 sec, totals: 8, 8, 9829
2010.01.24 00:26:13 1: Circle_Sheeva: difference: 248 (30 sec), 8 sec pulses, 1 sec, totals: 8, 8, 10076
2010.01.24 00:26:43 1: Circle_Sheeva: difference: 249 (30 sec), 8 sec pulses, 1 sec, totals: 8, 8, 10324
2010.01.24 00:27:14 1: Circle_Sheeva: difference: 255 (31 sec), 8 sec pulses, 1 sec, totals: 9, 8, 10573
2010.01.24 00:27:46 1: Circle_Sheeva: difference: 248 (32 sec), 8 sec pulses, 1 sec, totals: 8, 8, 10828
2010.01.24 00:28:14 1: Circle_Sheeva: difference: 248 (28 sec), 8 sec pulses, 1 sec, totals: 9, 8, 11076
2010.01.24 00:28:44 1: Circle_Sheeva: difference: 248 (30 sec), 8 sec pulses, 1 sec, totals: 8, 8, 11324
2010.01.24 00:29:14 1: Circle_Sheeva: difference: 247 (30 sec), 8 sec pulses, 1 sec, totals: 8, 8, 11572
2010.01.24 00:29:44 1: Circle_Sheeva: difference: 248 (30 sec), 8 sec pulses, 1 sec, totals: 8, 8, 11819
2010.01.24 00:30:14 1: Circle_Sheeva: difference: 248 (30 sec), 8 sec pulses, 1 sec, totals: 8, 8, 12067
2010.01.24 00:30:44 1: Circle_Sheeva: difference: 248 (30 sec), 8 sec pulses, 1 sec, totals: 8, 8, 12315
2010.01.24 00:31:14 1: Circle_Sheeva: difference: 248 (30 sec), 8 sec pulses, 1 sec, totals: 8, 8, 12563
Ah, nice, my Circle+ stopped responding, again. Yesterday I reset it twice; now I'm going to snoop
on USB on what The Source is sending, as The Source was still able to communicate with the Circle+,
get usage info and stuff, it just didn't respond to queries vom Linux (pol.py or my FHEM module) anymore. Crap.
About the calibration value.. you only need to get it from the circle once.
Yeah, seems pretty fixed from the data I got. Stepped down from sending calibration, powerinfo to calibration only every 300 seconds; will reduce that to once a day per Circle now.

Maarten, did you in the meantime found out other commands? E. g. how Source is finding all participating Circles would be rather interessing -- would be cool to have FHEM autodiscover the Circles as well and populate the database for the user.

Looking for more information, I found Plogg, which, according to http://www.plogg.co.uk/buy.html, should use the same Zigbee hardware as Plugwise. And their »ploggZgb USB dongle« seems to be remarkebly cheap; question is -- I'm totally new to this Zigbee stuff -- if one would be able, using that Zigbee adapter, to talk directly with the Circles? (Ok, decoding of the Plugwise over-the-air protocol would be necessary ;))
--
Kai 'wusel' Siering, Blog: http://blogdoch.net/
wusel
Starting Member
Starting Member
Posts: 19
Joined: Sat Jan 16, 2010 6:48 pm
Contact:

Re: Plugwise + Linux

Post by wusel »

wusel wrote:
Mdamen wrote:Thanks for the hint.. I'll look into that!
I'm quite confident that that's a (wrapping at some point/value) "totals" counter:
[...]
Seems to wrap somewhere at 37750 -- what kind of limit is that?

Code: Select all

2010.01.24 19:59:17 3: Circle_Sheeva: difference: 316 (30 sec), 8 sec pulses, 1 sec, totals: 11, 10, 37386
2010.01.24 19:59:51 3: Circle_Sheeva: difference: 315 (34 sec), 8 sec pulses, 1 sec, totals: 11, 10, 37701
2010.01.24 20:00:17 3: Circle_Sheeva: difference: -37438 (26 sec), 8 sec pulses, 1 sec, totals: 11, 10, 263
2010.01.24 20:00:47 3: Circle_Sheeva: difference: 316 (30 sec), 8 sec pulses, 1 sec, totals: 11, 10, 579
2010.01.24 20:01:17 3: Circle_Sheeva: difference: 315 (30 sec), 8 sec pulses, 1 sec, totals: 10, 10, 894
EDIT, 2010-01-26: No, it wraps around at the full hour as it seems:

Code: Select all

2010.01.26 14:56:15 3: Circle_Sheeva: difference: 1877 (300 sec), 8 sec pulses, 1 sec, totals: 0, 0, 99861
2010.01.26 14:56:15 3: Circle_Sheeva: difference: 0 (-4 sec), 8 sec pulses, 1 sec, totals: 0, 0, 99861
2010.01.26 15:01:12 3: Circle_Sheeva: difference: -99404 (296 sec), 8 sec pulses, 1 sec, totals: 0, 0, 457
[...]
2010.01.26 15:56:12 3: Circle_Sheeva: difference: 18 (299 sec), 8 sec pulses, 1 sec, totals: 0, 0, 2999
2010.01.26 16:01:12 3: Circle_Sheeva: difference: -2994 (299 sec), 8 sec pulses, 1 sec, totals: 0, 0, 5
[...]
2010.01.26 17:57:17 3: Circle_Sheeva: difference: 20 (300 sec), 8 sec pulses, 1 sec, totals: 0, 0, 225
2010.01.26 18:02:17 3: Circle_Sheeva: difference: -216 (300 sec), 8 sec pulses, 1 sec, totals: 0, 0, 9
[...]
2010.01.26 19:52:17 3: Circle_1: difference: 751 (300 sec), 8 sec pulses, 1 sec, totals: 3, 2, 7895
2010.01.26 19:57:17 3: Circle_1: difference: 749 (300 sec), 8 sec pulses, 1 sec, totals: 2, 2, 8644
2010.01.26 20:02:17 3: Circle_1: difference: -8295 (300 sec), 8 sec pulses, 1 sec, totals: 3, 2, 349
2010.01.26 20:07:17 3: Circle_1: difference: 753 (300 sec), 8 sec pulses, 1 sec, totals: 2, 2, 1102
Thus, to get power readings more accurate than the 8- or 1-sec-averages, take two powerinfos and divide the difference in pulses by the time between the measurements, calibrating the pulses as usual. If you happen to hit an hour boundary, you need to fetch the last hour's powerbuf to get the total for that (now past) hour and recalculate with that (based on your last timestamp relative to that hour of course, and don't forget to add the pulses since the full hour ;)) for accurate values.

Anyone in the knows what

Code: Select all

 05 05 03 03 30 30 33 45 30 30 30 44 36 46 30 30   ....003E000D6F00
 30 30 35 39 41 46 37 46 31 39 46 36 0D 0A         0059AF7F19F6..  
is supposed to do (59AF7F is my normal Circle)? Gets answered by

Code: Select all

 30 30 30 30 35 39 41 46 37 46 0D 0A 05 05 03 03   000059AF7F......
 30 30 33 46 30 30 30 44 36 46 30 30 30 30 35 39   003F000D6F000059
 41 46 37 46 30 46 30 35 30 31 30 31 30 31 37 41   AF7F0F050101017A
 34 37 0D 0A                                       47..            
Other commands send/answered seem to be: 000A/0011 (info request about the Stick?), 0040/0024 (0024 is already known as status answer?). I'm rather fond of the Plugwise system as of now (but of course I do mention in recommendations Plugwise' data-mining "business model"); it's a shame one needs to do hexdumps to use it on Linux :(
--
Kai 'wusel' Siering, Blog: http://blogdoch.net/
Post Reply

Return to “Plugwise Forum”