have domotiga connect to plugwise stick (OS X + VM fusion)

Forum about Domotiga Open Source Home Automation for Linux.

Moderator: RDNZL

Post Reply
Lexje
Starting Member
Starting Member
Posts: 21
Joined: Wed Mar 25, 2009 6:13 pm
Location: Belgium

have domotiga connect to plugwise stick (OS X + VM fusion)

Post by Lexje »

Hi everyone,

I have downloaded the Domotiga DVD and installed it in a virtual machine. Using OS X Lion and VMware fusion.
This is a demo installation installed from the DVD, so no users added. It seems there is only one user: Domotiga.
I get this:

Code: Select all

domotiga@domotiga:~$ ls -al /dev/serial/by-id
total 0
drwxr-xr-x 2 root root 60 2012-12-23 23:09 .
drwxr-xr-x 4 root root 80 2012-12-23 23:09 ..
lrwxrwxrwx 1 root root 13 2012-12-23 23:09 usb-FTDI_FT232R_USB_UART_A8009iSP-if00-port0 -> ../../ttyUSB0
So the stick is properly connected.

In Domotiga Standalone I have entered /dev/ttyUSB0 as the serial port, left everything else untouched.
However, the log shows:

Code: Select all

2012/12/23 23:22:29 Plugwise Error: Cannot open serial port (#5)
2012/12/23 23:22:29 ERROR: Plugwise interface FAILED to connect to Port /dev/ttyUSB0
I also have a Win7 virtual machine on which the stock Plugwise software is running. On this machine, the stick is properly picked up.

What am I doing wrong?
Thanks for your suggestions!

Erwin
daferra
Starting Member
Starting Member
Posts: 42
Joined: Wed Jul 15, 2009 10:42 am
Location: Netherlands

Re: have domotiga connect to plugwise stick (OS X + VM fusion)

Post by daferra »

probably has something to do with user rights, the people on this forum helped me out when I started. ;-)

1 - as root, chmod 666 /dev/ttyUSB0
2 - As you've noticed, the /dev/ttyUSB0 device has the group of dialout. All you need to do is add the second user to the dialout group:
ls -l /dev/tty*
sudo adduser <second_user> dialout
sudo chown -R <second_user> /dev/ttyUSB0
Lexje
Starting Member
Starting Member
Posts: 21
Joined: Wed Mar 25, 2009 6:13 pm
Location: Belgium

Re: have domotiga connect to plugwise stick (OS X + VM fusion)

Post by Lexje »

Daferra, thx for your answer.

I'm not quite there yet.
This is how my rights look like (I htink that's ok):

Code: Select all

domotiga@domotiga:~$ ls -al /dev/ttyUSB*
crw-rw-rw- 1 domotiga dialout 188, 0 Dec 24 11:20 /dev/ttyUSB0
domotiga@domotiga:~$
However I keep getting this error:

Code: Select all

Plugwise support enabled
Plugwise Error: Cannot open serial port (#5)
ERROR: Plugwise interface FAILED to connect to PPort /dev/ttyUSB0
A couple of questions:
I'm attempting to use Domotiga for the first time. Main goal is a first experience to see how 'easy' it is to get stuff working.
There is Domotiga server and Domotiga standalone on the desktop. I would expect if DomotigaServer is started that I should be able to connect via http://localhost:whatport(?) to the server and get the same interface as I get using Domotiga Standalone.
Is this correct? What port is it running on? I found port 8001 in a conf file, but all I get is: DomotiGaServer v.0.1.176
Perhaps there is no webserver installed in the demo DVD?

As far as Plugwise is concerned:
What should I configure for a minimum working Domotiga / Plugwise system?
I have tried to enter a couple of Circles, by just adding e.g. 3FD82F as the Mac Addr. in the device.
(Interface is set to Plugwise Stick)
Do I need to set up Circle+ first? (How do I recognise Circle+, I know there's a difference, but don't remember how to recognize it all.)
What is calibration for and how do I go about it?

Hope to get this up and running!
Thanks for your help, much appreciated.
Merry Christmass!

Erwin
daferra
Starting Member
Starting Member
Posts: 42
Joined: Wed Jul 15, 2009 10:42 am
Location: Netherlands

Re: have domotiga connect to plugwise stick (OS X + VM fusion)

Post by daferra »

let's figur out the user right first. In this topic domoticaforum.eu/viewtopic.php?f=38& ... 516#p56175 they helped me with the following:

try to put your username into the group dialout

Code: Select all

useradd -G dialout <user>
If you succeed and you are going to add more USB devices it is a good think to change your setup as written over here:
domotiga.nl/projects/domotiga/wiki/Inst ... l_Optional see section Lock serial device names
Lexje
Starting Member
Starting Member
Posts: 21
Joined: Wed Mar 25, 2009 6:13 pm
Location: Belgium

Re: have domotiga connect to plugwise stick (OS X + VM fusion)

Post by Lexje »

Hi Daferra,

Thx for sticking with me ;-)
I think the groupmembership and rights are fine.
For the moment I choose to modify as little as possible to the DVD-demo install.
This means I have not added any user(s). There is but one user (apart from system users): domotiga.

Have a look:

Code: Select all

Last login: Mon Dec 24 12:20:25 2012 from 192.168.1.145
domotiga@domotiga:~$ whoami
domotiga
domotiga@domotiga:~$ ls -la /dev/ttyUSB*
crw-rw---- 1 root dialout 188, 0 2012-12-25 16:46 /dev/ttyUSB0
domotiga@domotiga:~$ 
I have added ssh-server so that I can login remotely, that is easier to copy/paste results as I can not copy/paste directly from within the VM (no vmware-tools installed)

I realize that a http server should be installed, but I prefer to first try to fix the connection of the plugwise stick.

Next when I start DomotiGaServer.gambas from the cli, this gives us:

Code: Select all

2012/12/25 17:06:16 Plugwise support enabled.
2012/12/25 17:06:16 Plugwise Error: Cannot open serial port (#5)
2012/12/25 17:06:16 ERROR: Plugwise interface FAILED to connect to Port /dev/ttyUSB0
What will be the next step?

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

Re: have domotiga connect to plugwise stick (OS X + VM fusion)

Post by j.hoekstra »

Is your user part of the group dialout?
You can check using:

Code: Select all

groups domotiga
and add using

Code: Select all

sudo useradd -G dialout domotiga
Then your user is allowed to talk to the stick, if you're going to add more of these serial devices in a permanent setup I would like to refer you to:
http://domotiga.nl/projects/domotiga/wi ... vice-names
Lexje
Starting Member
Starting Member
Posts: 21
Joined: Wed Mar 25, 2009 6:13 pm
Location: Belgium

Re: have domotiga connect to plugwise stick (OS X + VM fusion)

Post by Lexje »

Ok, News!
Plugwise interface connected to port /ddev/ttyUSB0

I get some error readings. Found this is probably due to Domotiga author's devices still being present in the database.
Left them there but disabled.
I added 000D6F0000* in front of a couple of my own plugwise MAC addresses, but they don't seem to connect.
Guess I have to connect the Circl+ first.
If only I knew which one is my Circle+ ...

Erwin
Lexje
Starting Member
Starting Member
Posts: 21
Joined: Wed Mar 25, 2009 6:13 pm
Location: Belgium

Re: have domotiga connect to plugwise stick (OS X + VM fusion)

Post by Lexje »

Okay, found an old log file indicating which is my Circel+.
Added this as a Domotiga device too.

Here's what Domotiga shows on the console:

Code: Select all

2012/12/25 18:45:06 Plugwise support enabled.
2012/12/25 18:45:06 Plugwise interface connected to Port /dev/ttyUSB0
2012/12/25 18:45:06 [Plugwise] checking power usage of device 'Circle1 - Apple Corner' with address 000D600003FD82F
2012/12/25 18:45:06 [Plugwise] MAC: 000D600003FD82F
2012/12/25 18:45:06 [Plugwise] String: 0026000D600003FD82F CRC: 642D
2012/12/25 18:45:06 [Plugwise] Write: 0026000D600003FD82F642D

2012/12/25 18:45:06 [Plugwise] GetPowerInfo() didn't get expected answer for address '000D600003FD82F' result was ''
2012/12/25 18:45:06 [Plugwise] checking relay state of device 'Circle1 - Apple Corner' with address 000D600003FD82F
2012/12/25 18:45:06 [Plugwise] MAC: 000D600003FD82F
2012/12/25 18:45:06 [Plugwise] String: 0023000D600003FD82F CRC: 4CDB
2012/12/25 18:45:06 [Plugwise] Write: 0023000D600003FD82F4CDB

2012/12/25 18:45:06 [Plugwise] GetDeviceInfo() didn't get expected answer.
2012/12/25 18:45:06 [Plugwise] checking power usage of device 'Circle2 - BGCTV_new' with address 000D600003FF411
2012/12/25 18:45:06 [Plugwise] MAC: 000D600003FF411
2012/12/25 18:45:06 [Plugwise] String: 0026000D600003FF411 CRC: A707
2012/12/25 18:45:06 [Plugwise] Write: 0026000D600003FF411A707

2012/12/25 18:45:06 [Plugwise] GetPowerInfo() didn't get expected answer for address '000D600003FF411' result was ''
2012/12/25 18:45:06 [Plugwise] checking relay state of device 'Circle2 - BGCTV_new' with address 000D600003FF411
2012/12/25 18:45:06 [Plugwise] MAC: 000D600003FF411
2012/12/25 18:45:06 [Plugwise] String: 0023000D600003FF411 CRC: 8FF1
2012/12/25 18:45:06 [Plugwise] Write: 0023000D600003FF4118FF1

2012/12/25 18:45:07 [Plugwise] GetDeviceInfo() didn't get expected answer.
2012/12/25 18:45:07 [Plugwise] checking power usage of device 'Circle3 - Liebherr koel-vries' with address 000F600001C7F38
2012/12/25 18:45:07 [Plugwise] MAC: 000F600001C7F38
2012/12/25 18:45:07 [Plugwise] String: 0026000F600001C7F38 CRC: 7C18
2012/12/25 18:45:07 [Plugwise] Write: 0026000F600001C7F387C18

2012/12/25 18:45:07 [Plugwise] GetPowerInfo() didn't get expected answer for address '000F600001C7F38' result was ''
2012/12/25 18:45:07 [Plugwise] checking relay state of device 'Circle3 - Liebherr koel-vries' with address 000F600001C7F38
2012/12/25 18:45:07 [Plugwise] MAC: 000F600001C7F38
2012/12/25 18:45:07 [Plugwise] String: 0023000F600001C7F38 CRC: 54EE
2012/12/25 18:45:07 [Plugwise] Write: 0023000F600001C7F3854EE

2012/12/25 18:45:07 [Plugwise] GetDeviceInfo() didn't get expected answer.
2012/12/25 18:45:07 [Plugwise] checking power usage of device 'H2O-bed' with address 000D6000043BDAC
2012/12/25 18:45:07 [Plugwise] MAC: 000D6000043BDAC
2012/12/25 18:45:07 [Plugwise] String: 0026000D6000043BDAC CRC: 15E2
2012/12/25 18:45:07 [Plugwise] Write: 0026000D6000043BDAC15E2

2012/12/25 18:45:07 [Plugwise] GetPowerInfo() didn't get expected answer for address '000D6000043BDAC' result was ''
2012/12/25 18:45:07 [Plugwise] checking relay state of device 'H2O-bed' with address 000D6000043BDAC
2012/12/25 18:45:07 [Plugwise] MAC: 000D6000043BDAC
2012/12/25 18:45:07 [Plugwise] String: 0023000D6000043BDAC CRC: 3D14
2012/12/25 18:45:07 [Plugwise] Write: 0023000D6000043BDAC3D14
As I see all these GetPowerInfo() ... => result was ¨
So it seems still something is wrong.

Can it be the MAC address of the Plugwise devices?
Lexje
Starting Member
Starting Member
Posts: 21
Joined: Wed Mar 25, 2009 6:13 pm
Location: Belgium

Re: have domotiga connect to plugwise stick (OS X + VM fusion)

Post by Lexje »

Status update:

Domotiga sees my Plugwise stick allright.
I've entered the Circle+ and a couple of others as new devices.

Still there is no output from my Circles...

I started DomotiGa standalone from the terminal.
Then i get:

Code: Select all

ERROR: you must define at least one Data Source.
To me it seems my Plugwise stick should be a Data Source.

QUESTION:
My firmware dates from 2010-11-01. Could this be an issue?
Can I issue some command (PHP related?) to try and poll my Circle or try to have it switch?


Thanks for any suggestion!

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

Re: have domotiga connect to plugwise stick (OS X + VM fusion)

Post by j.hoekstra »

Just to be sure, you have assembled the network using the source software that plugwise releases for windows? Domotiga can not build the network.
Lexje
Starting Member
Starting Member
Posts: 21
Joined: Wed Mar 25, 2009 6:13 pm
Location: Belgium

Re: have domotiga connect to plugwise stick (OS X + VM fusion)

Post by Lexje »

Yes, the network has been assembled and worked fine using win7.
In fact, this win7 machine is a virtual machine (vmware), so all I have to do is unplug the Plugwise stick, and connect it to the DomotiGa virtual machine.

I've made some progress though.
I found here on the forum the long list of Ron's updates, and realized there are incompatibilities between Plugwise firmwares that have should be solved in later releases.

So I've just installed a new VM, lucid lynx based, and did a fresh install of gambas and domotiga. Both without any problem.
So Domotiga is up and running on this new VM. (1.0.002)

Next I connected my Plugwise stick. It is visibly connected. I noticed I can choose the firmware now, so I chose 2010.
But still the circles won't connect...
I'm under the impression something is wrong with the MAC addresses?

Erwin
Attachments
screenshot of logfile
screenshot of logfile
Screen Shot 2012-12-27 at 02.20.45.png (169.52 KiB) Viewed 13759 times
j.hoekstra
Member
Member
Posts: 255
Joined: Thu Jun 25, 2009 2:09 pm
Location: Enschede, The Netherlands

Re: have domotiga connect to plugwise stick (OS X + VM fusion)

Post by j.hoekstra »

I got a suspicion you filled in the MAC-address wrong:
When opening a device-property on one of the plug it gives you an example of the number:
000D6F000021811A
you have it as:
D600003FE547

Since I set it up a long time ago, I don't know if the first 10 numbers are supposed to be:
000D6F0000 and the last in your case 3FE547, but it wouldn't hurt to try.
The first 10 seem to be fixed and the last is the MAC-number from the plug.

Hope it helps, good luck
Lexje
Starting Member
Starting Member
Posts: 21
Joined: Wed Mar 25, 2009 6:13 pm
Location: Belgium

Re: have domotiga connect to plugwise stick (OS X + VM fusion)

Post by Lexje »

Thanks for your observation!
However, the MAC address is my greatest suspicion for now.
I actually copied the leading 10 figures from the example.
But as this won't work, and as I notice these weird figures as my first 3 address name characters, I've been trying to add them, with leading 000* and without...
Nothing seems to work?

UPDATE:
Here's what I did in the mean time:
Kept searching until I found a way to install vmware-tools. That's done now and should be fine.
Followed daferra's advice and set up udev to use /dev/ttyUSBplugwise, so that should be fine too.
I was having doubts about the correct /dev/ttyUSB rights, but on the wiki it says:

Code: Select all

Now unplug the adapter and put it back in.
Check the creation of the extra symlinked device name.

$ ls -l /dev/ttyUSB*
crw------- 1 root root    188, 0 2011-11-29 10:18 /dev/ttyUSB0
crw------- 1 root root    188, 1 2011-11-29 10:33 /dev/ttyUSB1
crw------- 1 root root    188, 2 2011-11-29 10:16 /dev/ttyUSB2
crw------- 1 root root    188, 3 2011-11-29 10:13 /dev/ttyUSB3
crw------- 1 root root    188, 4 2011-11-29 10:23 /dev/ttyUSB4
crw------- 1 root root    188, 5 2011-11-29 10:23 /dev/ttyUSB5
crw-rw---- 1 root dialout 188, 1 2011-11-29 10:33 /dev/ttyUSBdigitemp
crw-rw---- 1 root dialout 188, 5 2011-11-29 10:30 /dev/ttyUSBled
crw-rw---- 1 root dialout 188, 0 2011-11-29 10:18 /dev/ttyUSBonkyo
crw-rw---- 1 root dialout 188, 2 2011-11-29 10:31 /dev/ttyUSBplugwise
crw-rw---- 1 root dialout 188, 4 2011-11-29 10:23 /dev/ttyUSBspare
crw-rw---- 1 root dialout 188, 3 2011-11-29 10:31 /dev/ttyUSBzwave
This is what mine shows:

Code: Select all

erwin@vm-lucid-lynx:~$ ls -al /dev/ttyUSBplugwise
crw-rw---- 1 root dialout 188, 0 2012-12-27 12:51 /dev/ttyUSBplugwise
So apart from the 0 after 188, which I don't know what it means, it all looks the same, and should be fine too.

DomotiGa is starting up fine, after I adjusted the serial port name, it reports

But when watch the debug-2012-2.log, it reports:

Code: Select all

erwin@vm-lucid-lynx:~$ tail -f /home/erwin/domotiga/logs/debug-2012-12.log 
2012/12/27 12:55:25 [Plugwise] Write: 0023000D600003FE547BC2E

2012/12/27 12:55:25 [Plugwise] Write: 0023000D600003FE547BC2E

2012/12/27 12:55:26 [Plugwise] Write: 0023000D600003FE547BC2E

2012/12/27 12:55:26 [Plugwise] Write: 0023000D600003FE547BC2E

2012/12/27 12:55:26 [Plugwise] GetDeviceInfo() didn't get expected answer.
2012/12/27 12:55:26 [Plugwise] Is module plugged in and address correct?
So this points me in the only thing left and indicated by the log:
...[Plugwise] is module address correct?

I repeat:
If I switch the Plugwise USB stick to my win7 VM, plugwise is working 100%

Does anybody know of a (free) serial port sniffer I can use to check communication under windows 7?

I can't think of anything else..
j.hoekstra
Member
Member
Posts: 255
Joined: Thu Jun 25, 2009 2:09 pm
Location: Enschede, The Netherlands

Re: have domotiga connect to plugwise stick (OS X + VM fusion)

Post by j.hoekstra »

Can you change the device-adress to:
000D6F00003FE547 ?

Afaict you didn't fill in the number correctly and you missed the F after D6.
Lexje
Starting Member
Starting Member
Posts: 21
Joined: Wed Mar 25, 2009 6:13 pm
Location: Belgium

Re: have domotiga connect to plugwise stick (OS X + VM fusion)

Post by Lexje »

Thanks for pointing out! You're absolutely right.
Did the test, messages change a bit, but still no connection.
I'll post a snippet tomorrow.

I've done some more testing, and I'm on to something that's got to do with the firmware version.
What I've tried is too complicated to write down in 2 words. Need to do some more testing, but will report back shortly.
I might perhaps try to set firmware to 2009 for that matter...
Post Reply

Return to “DomotiGa Forum”