Plugwise and Linux
Plugwise and Linux
Do you know if the source stick still uses FTDI chip? My linux box does not find anything when I plug in the stick, other serial converters does work. lsusb does not list anything either.
EDIT: it works in my MythTV Frontend so to answer my question, yes it still uses FTDI.
EDIT: it works in my MythTV Frontend so to answer my question, yes it still uses FTDI.
Plugwise and Linux
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by mdamen</i>
<br />The latest work is done in my home automation software, not in the pol binary. If you want those sources let me know..
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
Hello Maarten.
I'm really interested in the source for how to read power used since last reading. I'm planning to build charts using rrdtool (probably cacti) and using current wattage for that is inaccurate when polling the devices in 5 min intervals.
Thanks for your fine work
// Floppe
<br />The latest work is done in my home automation software, not in the pol binary. If you want those sources let me know..
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
Hello Maarten.
I'm really interested in the source for how to read power used since last reading. I'm planning to build charts using rrdtool (probably cacti) and using current wattage for that is inaccurate when polling the devices in 5 min intervals.
Thanks for your fine work
// Floppe
Plugwise and Linux
@Foppe: I'll try to put something online for you this evening...
--
Maarten Damen
www.maartendamen.com
--
Maarten Damen
www.maartendamen.com
Plugwise and Linux
Foppe, can you fill in your e-mail address so I can e-mail you the sources?
--
Maarten Damen
www.maartendamen.com
--
Maarten Damen
www.maartendamen.com
Plugwise and Linux
Maarten, I have now enabled emailing. Really excited about the sources 

Plugwise and Linux
Maarten,
the downloadlinks on your webpage for the python scripts are broken, can you fix them?
the downloadlinks on your webpage for the python scripts are broken, can you fix them?
Plugwise and Linux
Download links fixed! Sorry for the inconvenience... And thanks for reporting.
--
Maarten Damen
www.maartendamen.com
--
Maarten Damen
www.maartendamen.com
Plugwise and Linux
Maarten,
while awaiting the arrival of my Plugwise modules I tried to convert your python script to perl. I almost got it working, except for the calculation of the CRC-16 value.
After commenting out (in your script) the lines initializing the serial port and the lines writing/reading to/from it, I run your script as follows:
This should give me a CRC value of AC92, but when adding a print-statement at the end of the CRC calculating routine, I get this as a CRC value: 38F7
The complete string looks like this: 0017000A1100003111AB0138F7
Can you confirm that AC92 is really the correct CRC value, or is indeed 38F7 the correct value.
As soon as my plugs arrive I will try to sort it out myself, but I wanted my code to be finished before they arrive.
while awaiting the arrival of my Plugwise modules I tried to convert your python script to perl. I almost got it working, except for the calculation of the CRC-16 value.
After commenting out (in your script) the lines initializing the serial port and the lines writing/reading to/from it, I run your script as follows:
Code: Select all
python pol.py -p /dev/ttyUSB0 -o 000A1100003111AB
The complete string looks like this: 0017000A1100003111AB0138F7
Can you confirm that AC92 is really the correct CRC value, or is indeed 38F7 the correct value.
As soon as my plugs arrive I will try to sort it out myself, but I wanted my code to be finished before they arrive.
Plugwise and Linux
38F7 is indeed the correct value. I just checked it. Good luck with the rest of your perl script.
--
Maarten Damen
www.maartendamen.com
--
Maarten Damen
www.maartendamen.com
Plugwise and Linux
CRC calculations are working.
Turned out that the ccittcrc routine from the Perl module Digest::CRC defaults to an init value of 0xffff when doing calculations, instead of 0.
Turned out that the ccittcrc routine from the Perl module Digest::CRC defaults to an init value of 0xffff when doing calculations, instead of 0.
Plugwise and Linux
From the string that Maarten supplied:
0024 000D6F00002366BB00003681 000457C8 01 85 <b><i>0000</i> <i>0473</i> <i>0007</i></b> 48B4253801F74D
I can add the following:
The part of the string in <i><b>bold/italic</b></i> is the hardware revision of the plug. The code above is typical for the Circle+. The normal plugs I have, have HW revision 0000 0440 0107.
The string I get back from my Circle+ looks almost the same as from Maarten's Circle+ :
<b>0024</b> <b>000D6F000037B4A7</b> <b>0000422C</b> <b>00044040</b> <b>01</b> 85 <b><i>0000 0473 0007</i></b> 48B4253801 <b>CAB4</b>
The parts of the string that are in bold or in italic more or less have a known meaning. Still looking for the rest.
0024 000D6F00002366BB00003681 000457C8 01 85 <b><i>0000</i> <i>0473</i> <i>0007</i></b> 48B4253801F74D
I can add the following:
The part of the string in <i><b>bold/italic</b></i> is the hardware revision of the plug. The code above is typical for the Circle+. The normal plugs I have, have HW revision 0000 0440 0107.
The string I get back from my Circle+ looks almost the same as from Maarten's Circle+ :
<b>0024</b> <b>000D6F000037B4A7</b> <b>0000422C</b> <b>00044040</b> <b>01</b> 85 <b><i>0000 0473 0007</i></b> 48B4253801 <b>CAB4</b>
The parts of the string that are in bold or in italic more or less have a known meaning. Still looking for the rest.
Plugwise and Linux
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by mdamen</i>
<br />The latest work is done in my home automation software, not in the pol binary. If you want those sources let me know..
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
I'd also like a copy of that if it's possible.
/LM
<br />The latest work is done in my home automation software, not in the pol binary. If you want those sources let me know..
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
I'd also like a copy of that if it's possible.
/LM
Plugwise and Linux
Hi all,
I'm thinking about developing an application which from time to time scans all the devices (detects them dynamically) on the Plugwise ZigBee network and reports specific info about each one to a file (which would then be read by other applications). One thing that is missing is the command or set of commands to do this device discovery. Anyone? The alternative is to store all the device ids and poll each one and get timeouts for the devices that are out of range or disconnected for some reason.
Thanks in advance
I'm thinking about developing an application which from time to time scans all the devices (detects them dynamically) on the Plugwise ZigBee network and reports specific info about each one to a file (which would then be read by other applications). One thing that is missing is the command or set of commands to do this device discovery. Anyone? The alternative is to store all the device ids and poll each one and get timeouts for the devices that are out of range or disconnected for some reason.
Thanks in advance
Plugwise and Linux
Hi Maarten,
Somebody tuned up the private-msg-minimal-post-thingy up from 30 to 50 ... so have to go public with this one.
I've got myself a plugwise stick and circle+ today. Got it working on windows and was looking for your linux version. However there seems to be a mysql problem on your server.
Somebody tuned up the private-msg-minimal-post-thingy up from 30 to 50 ... so have to go public with this one.
I've got myself a plugwise stick and circle+ today. Got it working on windows and was looking for your linux version. However there seems to be a mysql problem on your server.
Plugwise and Linux
Hi all,
Does anyone know how to get 5min average readings from the plugs? I started to develop my own service which shall log all plugs to a MySQL database which Cacti (or other monitoring application) in turn shall read the data and graph it. However, I did not think this through as the log buffers only shows past hours, not the current hour.
Or maybe it's only possible to get 1hour average readings like the source software does.
Does anyone know how to get 5min average readings from the plugs? I started to develop my own service which shall log all plugs to a MySQL database which Cacti (or other monitoring application) in turn shall read the data and graph it. However, I did not think this through as the log buffers only shows past hours, not the current hour.
Or maybe it's only possible to get 1hour average readings like the source software does.