Plugwise and Linux

Plugwise Forum about Plugwise devices and the Source software.
xAPPO
Starting Member
Starting Member
Posts: 38
Joined: Wed Jul 22, 2009 11:43 am
Location: United Kingdom
Contact:

Plugwise and Linux

Post by xAPPO »

Does anyone know if it's possible to associate two stick devices onto one Plugwise ZigBee network ?

...or perhaps a Windows software application that will create a virtual serial port that could be used to receive/inject data into the existing USB/serial stream from an external application (managing potential collisions)

K
sirhc
Starting Member
Starting Member
Posts: 3
Joined: Sat Aug 08, 2009 12:18 am
Location: Netherlands

Plugwise and Linux

Post by sirhc »

Beste allen,

Kan iemand mij het phyton script van Maarten mailen? De server van Maarten lijkt eruit te liggen. Alvast hartelijk bedankt.
User avatar
Snelvuur
Forum Moderator
Forum Moderator
Posts: 3156
Joined: Fri Apr 06, 2007 11:01 pm
Location: Netherlands
Contact:

Plugwise and Linux

Post by Snelvuur »

You could also check the domotiga.nl code, if you need examples. Please also be aware to keep text in english.

// Erik (binkey.nl)
paradoxi
Starting Member
Starting Member
Posts: 2
Joined: Sat Aug 08, 2009 11:54 am
Location: France

Plugwise and Linux

Post by paradoxi »

Hello,

received my starters kit, it contains a classic usb Stick.
I would like to use in linux, but i can't understand how to use a USB Stick with classic usb -> serial convertor (http://www.usbserial.com/765288.html).

Please can you give me more information ?

Tks
Pieterpaul
Member
Member
Posts: 145
Joined: Sat Jul 05, 2008 7:00 pm
Location: Netherlands

Plugwise and Linux

Post by Pieterpaul »

Why would you want to convert it to serial? Doesn't your PC have USB ports? Linux comes with support for USB and if I'm not mistaken, both Maarten's demo code and Domotiga support Plugwise on USB.

/PP
j.hoekstra
Member
Member
Posts: 255
Joined: Thu Jun 25, 2009 2:09 pm
Location: Enschede, The Netherlands

Plugwise and Linux

Post by j.hoekstra »

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by paradoxi</i>
<br />Hello,

received my starters kit, it contains a classic usb Stick.
I would like to use in linux, but i can't understand how to use a USB Stick with classic usb -> serial convertor (http://www.usbserial.com/765288.html).

Please can you give me more information ?

Tks
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
I didn't need anything special, plugged in the stick, it was recognized by a recent kernel as a FTDI-device with /dev/ttyUSB0 and that was needed to configure domotiga to find the devices. I build the network before that via the source-software though.
sirhc
Starting Member
Starting Member
Posts: 3
Joined: Sat Aug 08, 2009 12:18 am
Location: Netherlands

Plugwise and Linux

Post by sirhc »

Hello,

@snelvuur, indeed very stupid writing the question in dutch. My question was if it's possible somebody emails me the phyton script Maarten wrote. His website seems to be down at the moment.

Regards,
t006
Starting Member
Starting Member
Posts: 26
Joined: Wed Oct 08, 2008 8:09 pm
Location: Netherlands

Plugwise and Linux

Post by t006 »

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by sirhc</i>
<br />Hello,

@snelvuur, indeed very stupid writing the question in dutch. My question was if it's possible somebody emails me the phyton script Maarten wrote. His website seems to be down at the moment.

Regards,
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

You can find a copy on:
http://files.penguin-powered.org/plugwi ... pol0.2.tgz
http://files.penguin-powered.org/plugwi ... ources.tgz
sirhc
Starting Member
Starting Member
Posts: 3
Joined: Sat Aug 08, 2009 12:18 am
Location: Netherlands

Plugwise and Linux

Post by sirhc »

Thanks for the info guys
daromer
Starting Member
Starting Member
Posts: 42
Joined: Sat Oct 24, 2009 2:41 pm
Location: Sweden

Plugwise and Linux

Post by daromer »

Hi

Im running 64bit. How do i compile that POL to fit my needs?

I must say its an interesting thread. Im also trying to look into Domotiga. Installing a new wirtual machine to test it out. I had hoped there was a master process you could run in the background but dosnt look like that. But hey. I havent had time to chekc it out yet.
j.hoekstra
Member
Member
Posts: 255
Joined: Thu Jun 25, 2009 2:09 pm
Location: Enschede, The Netherlands

Plugwise and Linux

Post by j.hoekstra »

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by daromer</i>
<br />Hi

Im running 64bit. How do i compile that POL to fit my needs?

I must say its an interesting thread. Im also trying to look into Domotiga. Installing a new wirtual machine to test it out. I had hoped there was a master process you could run in the background but dosnt look like that. But hey. I havent had time to chekc it out yet.


<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
For domotiga I never needed to install any driver, the stick was recognized by linux and only neede to point domotiga in the right direction.
daromer
Starting Member
Starting Member
Posts: 42
Joined: Sat Oct 24, 2009 2:41 pm
Location: Sweden

Plugwise and Linux

Post by daromer »

j.hoekstra: Driver? I only want to know how i recompile that POL to work on 64bit since tha bin you can download was built for 32 bits.
j.hoekstra
Member
Member
Posts: 255
Joined: Thu Jun 25, 2009 2:09 pm
Location: Enschede, The Netherlands

Plugwise and Linux

Post by j.hoekstra »

I plugged the stick in, it was recognized by an in-kernel ftdi(?) driver and in Domotiga I could just select the USB-device and control my plugs.
Mind you, this is using domotiga(www.domotiga.nl)
daromer
Starting Member
Starting Member
Posts: 42
Joined: Sat Oct 24, 2009 2:41 pm
Location: Sweden

Plugwise and Linux

Post by daromer »

Traceback (most recent call last):
File "pol.py", line 150, in <module>
main()
File "pol.py", line 134, in main
print plugwise.GetPowerInfo()
File "pol.py", line 48, in GetPowerInfo
self.GetCalibrationInfo()
File "pol.py", line 29, in GetCalibrationInfo
self.gain_a = self.hexToFloat(result[0:8])
File "pol.py", line 69, in hexToFloat
return struct.unpack('f', bits)[0]
File "/usr/lib64/python2.5/struct.py", line 87, in unpack
return o.unpack(s)
struct.error: unpack requires a string argument of length 4


Running the pol.py on a 64bit machine and trying to sort out the watts. the on and off works. Gonna look into it but if anyone have an idea please let me know.
daromer
Starting Member
Starting Member
Posts: 42
Joined: Sat Oct 24, 2009 2:41 pm
Location: Sweden

Plugwise and Linux

Post by daromer »

Changed some in the source.

66 intval = int(hexstr, 16)
67 bits = struct.pack('I', intval) <- Changed to I instead of L
68 return struct.unpack('f', bits)[0]

Looks like the output is kinda ok. but i dont know and to damn tired to look more into it atm.
Post Reply

Return to “Plugwise Forum”