PLCBUS polling

Forum about Domotiga Open Source Home Automation for Linux.

Moderator: RDNZL

User avatar
vdoucet
Starting Member
Starting Member
Posts: 20
Joined: Sat Nov 13, 2010 3:01 pm
Location: Pau, France

PLCBUS polling

Post by vdoucet »

Hi,
I'm running Domotiga for a few wekks now and I'm very happy with it ! Great stuff !
I have PLCBUS components and so far I was running without polling. I now want to poll the status every minute for example. So I did set the parameter to 60 in the interface panel.

Here is what I get ...

Code: Select all

2010/12/12 21:37:24 [PLCBUS] > 02 05 FA 10 1C 00 00 03
2010/12/12 21:37:24 [PLCBUS] > 02 05 FA 10 1C 00 00 03
2010/12/12 21:37:24 [PLCBUS] > 02 05 FA 00 1C 00 00 03
2010/12/12 21:37:24 [PLCBUS] > 02 05 FA 00 1C 00 00 03
2010/12/12 21:37:24 [PLCBUS] < 02 06 FA 10 1C 00 00 1C B6 Frame not valid!
2010/12/12 21:37:25 [PLCBUS] < 02 06 FA 10 1C 00 FF 40 93 Frame not valid!
My PLCBUS modules are the following :
- 2x PLC2268HX2 (DIN rail module for 4 loads)
- 2x PLC2267 (Micromodule for 1 load)
Since both are not in the Domotiga list, I configured them as PLCBUS appliance module but I don't see why it would be the root of this "Frame not valid!" issue.

Any idea ?
Ubuntu 10.10 + Domotiga 0.1.194 + Gambas 2.21
Interface PLCBUS II-T PLC1141 G+ (USB) ; 2x PLCBUS2-R PLC2268HX2 ; 2x PLCBUS II-R PLC2267-H ; 1x PLCBUS II-R PLC2267-K
Oregon Scientific (7x THN132ES, 3x THGN132ES, 1x PCR800)
RFXCOM (USB ; firmware 20)
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: PLCBUS polling

Post by RDNZL »

Ok will check this, thanks for your report.
Regards, Ron.
User avatar
vdoucet
Starting Member
Starting Member
Posts: 20
Joined: Sat Nov 13, 2010 3:01 pm
Location: Pau, France

Re: PLCBUS polling

Post by vdoucet »

In fact it does not only happen when polling but as well on every command.
For example when sending an OFF command to B05 device :

Code: Select all

2010/12/16 22:36:46 [PLCBUS] > 02 05 FA 14 23 00 00 03
2010/12/16 22:36:46 [PLCBUS] > 02 05 FA 14 23 00 00 03
2010/12/16 22:36:47 [PLCBUS] < 02 06 FA 14 23 00 00 1C AB Frame not valid!
2010/12/16 22:36:47 [PLCBUS] < 02 06 FA 14 23 00 00 20 A7 Frame not valid!
In my configuration, B01 through B04 are on one module PLC2268HX2 and B05 through B08 are on another identical module.
Then I looked at A01 which in my case is a micromodule PLC2267 with the following result :

Code: Select all

2010/12/16 23:24:16 [PLCBUS] > 02 05 FA 00 23 00 00 03
2010/12/16 23:24:16 [PLCBUS] > 02 05 FA 00 23 00 00 03
2010/12/16 23:24:17 [PLCBUS] < 02 06 FA 00 23 00 00 1C BF Frame not valid!
2010/12/16 23:24:17 [PLCBUS] < 02 06 FA 00 23 00 00 20 BB Frame not valid!
So I think we can exclude that the issue comes from the receivers ...
Ubuntu 10.10 + Domotiga 0.1.194 + Gambas 2.21
Interface PLCBUS II-T PLC1141 G+ (USB) ; 2x PLCBUS2-R PLC2268HX2 ; 2x PLCBUS II-R PLC2267-H ; 1x PLCBUS II-R PLC2267-K
Oregon Scientific (7x THN132ES, 3x THGN132ES, 1x PCR800)
RFXCOM (USB ; firmware 20)
User avatar
vdoucet
Starting Member
Starting Member
Posts: 20
Joined: Sat Nov 13, 2010 3:01 pm
Location: Pau, France

Re: PLCBUS polling

Post by vdoucet »

Just to continue investigations on the last bytes ...
Here is what I get when I send an OFF order to my receivers :
B01 > Off

Code: Select all

2010/12/16 22:33:22 [PLCBUS] > 02 05 FA 10 23 00 00 03
2010/12/16 22:33:22 [PLCBUS] > 02 05 FA 10 23 00 00 03
2010/12/16 22:33:23 [PLCBUS] < 02 06 FA 10 23 00 00 1C AF Frame not valid!
2010/12/16 22:33:23 [PLCBUS] < 02 06 FA 10 23 00 00 20 AB Frame not valid!
B02 > Off

Code: Select all

2010/12/16 22:34:45 [PLCBUS] > 02 05 FA 11 23 00 00 03
2010/12/16 22:34:45 [PLCBUS] > 02 05 FA 11 23 00 00 03
2010/12/16 22:34:46 [PLCBUS] < 02 06 FA 11 23 00 00 1C AE Frame not valid!
2010/12/16 22:34:46 [PLCBUS] < 02 06 FA 11 23 00 00 20 AA Frame not valid!
B03 > Off

Code: Select all

2010/12/16 22:35:37 [PLCBUS] > 02 05 FA 12 23 00 00 03
2010/12/16 22:35:37 [PLCBUS] > 02 05 FA 12 23 00 00 03
2010/12/16 22:35:37 [PLCBUS] < 02 06 FA 12 23 00 00 1C AD Frame not valid!
2010/12/16 22:35:37 [PLCBUS] < 02 06 FA 12 23 00 00 20 A9 Frame not valid!
B04 > Off

Code: Select all

2010/12/16 22:36:11 [PLCBUS] > 02 05 FA 13 23 00 00 03
2010/12/16 22:36:11 [PLCBUS] > 02 05 FA 13 23 00 00 03
2010/12/16 22:36:11 [PLCBUS] < 02 06 FA 13 23 00 00 1C AC Frame not valid!
2010/12/16 22:36:11 [PLCBUS] < 02 06 FA 13 23 00 00 20 A8 Frame not valid!
B05 > Off

Code: Select all

2010/12/16 22:36:46 [PLCBUS] > 02 05 FA 14 23 00 00 03
2010/12/16 22:36:46 [PLCBUS] > 02 05 FA 14 23 00 00 03
2010/12/16 22:36:47 [PLCBUS] < 02 06 FA 14 23 00 00 1C AB Frame not valid!
2010/12/16 22:36:47 [PLCBUS] < 02 06 FA 14 23 00 00 20 A7 Frame not valid!
B06 > Off

Code: Select all

2010/12/16 22:37:18 [PLCBUS] > 02 05 FA 15 23 00 00 03
2010/12/16 22:37:18 [PLCBUS] > 02 05 FA 15 23 00 00 03
2010/12/16 22:37:19 [PLCBUS] < 02 06 FA 15 23 00 00 1C AA Frame not valid!
2010/12/16 22:37:19 [PLCBUS] < 02 06 FA 15 23 00 00 20 A6 Frame not valid!
B07 > Off

Code: Select all

2010/12/16 22:38:00 [PLCBUS] > 02 05 FA 16 23 00 00 03
2010/12/16 22:38:00 [PLCBUS] > 02 05 FA 16 23 00 00 03
2010/12/16 22:38:00 [PLCBUS] < 02 06 FA 16 23 00 00 1C A9 Frame not valid!
2010/12/16 22:38:00 [PLCBUS] < 02 06 FA 16 23 00 00 20 A5 Frame not valid!
B08 > Off

Code: Select all

2010/12/16 22:38:29 [PLCBUS] > 02 05 FA 17 23 00 00 03
2010/12/16 22:38:29 [PLCBUS] > 02 05 FA 17 23 00 00 03
2010/12/16 22:38:29 [PLCBUS] < 02 06 FA 17 23 00 00 1C A8 Frame not valid!
2010/12/16 22:38:30 [PLCBUS] < 02 06 FA 17 23 00 00 20 A4 Frame not valid!
A01 > Off

Code: Select all

2010/12/16 23:24:16 [PLCBUS] > 02 05 FA 00 23 00 00 03
2010/12/16 23:24:16 [PLCBUS] > 02 05 FA 00 23 00 00 03
2010/12/16 23:24:17 [PLCBUS] < 02 06 FA 00 23 00 00 1C BF Frame not valid!
2010/12/16 23:24:17 [PLCBUS] < 02 06 FA 00 23 00 00 20 BB Frame not valid!
There is somehow a "pattern" on the last byte ... which changes with the unit code ...
Ubuntu 10.10 + Domotiga 0.1.194 + Gambas 2.21
Interface PLCBUS II-T PLC1141 G+ (USB) ; 2x PLCBUS2-R PLC2268HX2 ; 2x PLCBUS II-R PLC2267-H ; 1x PLCBUS II-R PLC2267-K
Oregon Scientific (7x THN132ES, 3x THGN132ES, 1x PCR800)
RFXCOM (USB ; firmware 20)
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Re: PLCBUS polling

Post by Digit »

Hi, it's me again :)
The outgoing frames are valid (of course).
Those incoming frames are definitely invalid, no doubt about it.
Did you try other PLCBUS software? (there is, like http://www.x10-hk.com ->PLCBUS -> Remote Controller and http://www.hometomation.com/homeplanner/)
I think the results will be the same (also bad).
User avatar
vdoucet
Starting Member
Starting Member
Posts: 20
Joined: Sat Nov 13, 2010 3:01 pm
Location: Pau, France

Re: PLCBUS polling

Post by vdoucet »

Ok, then ... here we go, using Automation@Home PLCBUS universal controler (Beta version 0.0.29)
User code (Hex) = FA

Send order "on" to B4 =>> the appliance is effectively going on and in the bottom right part of the soft window it says "House B Unit 4 : ON" / "ACK received"

Code: Select all

17/12/2010 09:28:38  02 06 FA 13 22 64 00 1C 49 
17/12/2010 09:28:38  02 06 FA 13 22 64 00 20 45 
Send order "off" to B4 =>> the appliance is effectively going off "House B Unit 4 : OFF" / "ACK received"

Code: Select all

17/12/2010 09:29:15  02 06 FA 13 23 00 00 1C AC 
17/12/2010 09:29:15  02 06 FA 13 23 00 00 20 A8 
Status request to B4 "House B Unit 4 : Status Request" / "Receive another controler signal"

Code: Select all

17/12/2010 09:29:58  02 06 FA 13 2F 00 00 1C A0 
17/12/2010 09:29:58  02 06 FA 13 2F 00 00 20 9C 
17/12/2010 09:29:58  02 06 FA 13 0E 00 00 0C D1 
Get signal level (to B4) =>> signal level 30 "House B Unit 4 : Enquiry signal level" / "Receive another controler signal"

Code: Select all

17/12/2010 09:31:16  02 06 FA 13 38 00 00 1C 97 
17/12/2010 09:31:16  02 06 FA 13 38 00 00 20 93 
17/12/2010 09:31:16  02 06 FA 13 1A 1E 00 0C A7 
Get noise level (to B4) =>> noise level 0 "House B Unit 4 : Enquiry noise level" / "Receive another controler signal"

Code: Select all

17/12/2010 09:31:45  02 06 FA 13 39 00 00 1C 96 
17/12/2010 09:31:45  02 06 FA 13 39 00 00 20 92 
17/12/2010 09:31:46  02 06 FA 13 1B 00 00 0C C4 
According to the doc I have on PLCBUS, I seem to have a byte in excess at the end, don't I ? Or it should be 03 to mark the end of transmission, no ?
Ubuntu 10.10 + Domotiga 0.1.194 + Gambas 2.21
Interface PLCBUS II-T PLC1141 G+ (USB) ; 2x PLCBUS2-R PLC2268HX2 ; 2x PLCBUS II-R PLC2267-H ; 1x PLCBUS II-R PLC2267-K
Oregon Scientific (7x THN132ES, 3x THGN132ES, 1x PCR800)
RFXCOM (USB ; firmware 20)
User avatar
vdoucet
Starting Member
Starting Member
Posts: 20
Joined: Sat Nov 13, 2010 3:01 pm
Location: Pau, France

Re: PLCBUS polling

Post by vdoucet »

As a complement to my previous post, here are the references indicated on my interface (just in case they would have upgraded the firmware for whatever reason ...) :
PLCBUS II -T 1141G+
P1141HN261B001
Ubuntu 10.10 + Domotiga 0.1.194 + Gambas 2.21
Interface PLCBUS II-T PLC1141 G+ (USB) ; 2x PLCBUS2-R PLC2268HX2 ; 2x PLCBUS II-R PLC2267-H ; 1x PLCBUS II-R PLC2267-K
Oregon Scientific (7x THN132ES, 3x THGN132ES, 1x PCR800)
RFXCOM (USB ; firmware 20)
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Re: PLCBUS polling

Post by Digit »

I seem to have a byte in excess at the end, don't I ? Or it should be 03 to mark the end of transmission, no ?
Right, you have an extra byte and missing the stop byte (03). Your hardware is using different protocol I guess; I read about "different firmware versions" once, this looks like it... I don't know the details nor have I ever seen PLCBUS docs that describe the frames your hardware is working with. I want to know more about this... :o
User avatar
vdoucet
Starting Member
Starting Member
Posts: 20
Joined: Sat Nov 13, 2010 3:01 pm
Location: Pau, France

Re: PLCBUS polling

Post by vdoucet »

Thanks digit. So really this topic is not a Domotiga issue, rather a PLCBUS issue.
What's the next step ? Do you know how to contact someone in PLCBUS to get answers ?
Ubuntu 10.10 + Domotiga 0.1.194 + Gambas 2.21
Interface PLCBUS II-T PLC1141 G+ (USB) ; 2x PLCBUS2-R PLC2268HX2 ; 2x PLCBUS II-R PLC2267-H ; 1x PLCBUS II-R PLC2267-K
Oregon Scientific (7x THN132ES, 3x THGN132ES, 1x PCR800)
RFXCOM (USB ; firmware 20)
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: PLCBUS polling

Post by RDNZL »

Just (to be sure) did a test with my DomotiGa test setup, looks ok:

Code: Select all

2010/12/17 20:43:57 [PLCBUS] Found PLCBUS device(s) with home address(es): A 
2010/12/17 20:44:07 [PLCBUS] > 02 05 FA 00 1C 00 00 03
2010/12/17 20:44:07 [PLCBUS] > 02 05 FA 00 1C 00 00 03
2010/12/17 20:44:17 [PLCBUS] > 02 05 FA 00 1C 00 00 03
2010/12/17 20:44:17 [PLCBUS] > 02 05 FA 00 1C 00 00 03
2010/12/17 20:44:18 [PLCBUS] < 02 06 FA 00 1C 80 00 1E 03 
2010/12/17 20:44:18 [PLCBUS] < 02 06 FA 00 1C 00 05 40 03 Addr: A01 Cmd: GET_ALL_ID_PULSE Data1: 00 Data2: 05 GET ALL ID PULSE UNITS: 00000000 00000101
2010/12/17 20:44:18 [PLCBUS] > 02 05 FA 00 1D 00 00 03
2010/12/17 20:44:18 [PLCBUS] > 02 05 FA 00 1D 00 00 03

2010/12/17 20:44:19 [PLCBUS] < 02 06 FA 00 1D 00 00 1E 03 
2010/12/17 20:44:19 [PLCBUS] < 02 06 FA 00 1D 00 00 40 03 Addr: A01 Cmd: GET_ONLY_ON_ID_PULSE Data1: 00 Data2: 00 GET ONLY ON ID PULSE UNITS ON: 00000000 00000000
2010/12/17 20:44:28 [PLCBUS] > 02 05 FA 00 1C 00 00 03
2010/12/17 20:44:28 [PLCBUS] > 02 05 FA 00 1C 00 00 03
2010/12/17 20:44:28 [PLCBUS] < 02 06 FA 00 1C 80 00 1E 03 
2010/12/17 20:44:28 [PLCBUS] < 02 06 FA 00 1C 00 05 40 03 Addr: A01 Cmd: GET_ALL_ID_PULSE Data1: 00 Data2: 05 GET ALL ID PULSE UNITS: 00000000 00000101
2010/12/17 20:44:28 [PLCBUS] > 02 05 FA 00 1D 00 00 03
2010/12/17 20:44:28 [PLCBUS] > 02 05 FA 00 1D 00 00 03

2010/12/17 20:44:29 [PLCBUS] < 02 06 FA 00 1D 00 00 1E 03 
2010/12/17 20:44:29 [PLCBUS] < 02 06 FA 00 1D 00 00 40 03 Addr: A01 Cmd: GET_ONLY_ON_ID_PULSE Data1: 00 Data2: 00 GET ONLY ON ID PULSE UNITS ON: 00000000 00000000
Regards, Ron.
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Re: PLCBUS polling

Post by Digit »

@vdoucet:

As you can see, with the PLCBUS hardware "we know" there's no problem as Ron showed you.
But that doesn't help you, so I looked a bit further.
Your hardware is definitely working with a different type of PLCBUS protocol than we know around here.
This protocol frame is not ending with ETX (03) but with a checksum, an example:

Code: Select all

02 06 FA 10 23 00 00 1C AF
The Checksum was easy to find: sum all the bytes: 02+06+FA+10+23+00+00+1C+AF = 0200
So the last byte in the frame makes the sum of all the bytes a multiple of 100.
My guess for checksum verification is that when the last byte = 00, the checksum is OK.
I checked a few, but not all. It's easy to do, so you can check some more (all) if you like and verify my findings.

I think it's not that hard to implement both versions, even with automatic detection of which one is being used.

And I'll check my mail archive if I can find more details about what I wrote before.
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Re: PLCBUS polling

Post by Digit »

The PLCBUS-1141+ (mind the + !!) interface has a different firmware that works with a checksum as mentioned above.
So I think we know what the problem is now; your interface is not supported, but that can be fixed :wink:
User avatar
vdoucet
Starting Member
Starting Member
Posts: 20
Joined: Sat Nov 13, 2010 3:01 pm
Location: Pau, France

Re: PLCBUS polling

Post by vdoucet »

Thank you Digit !

indeed I noticed a kind of pattern but I did not go till the checksum.

I did a check on all my records and as you indicate they all sum to 512 (Hex200). That's good News as you say ... it "only" has to be resolved by programming ;-)

On point though ... I would have thought the "05" message (Tx) was generated by the 1141 controller while the "06" message (Rx) was generated by the "end point". I mean the controler sends an order and receives information. That would mean to me the extra byte is generated either by the four loads switch (PLCBUS2-R 2268HX2) either by the one load switch (PLCBUSII-R 2267-H).
Ubuntu 10.10 + Domotiga 0.1.194 + Gambas 2.21
Interface PLCBUS II-T PLC1141 G+ (USB) ; 2x PLCBUS2-R PLC2268HX2 ; 2x PLCBUS II-R PLC2267-H ; 1x PLCBUS II-R PLC2267-K
Oregon Scientific (7x THN132ES, 3x THGN132ES, 1x PCR800)
RFXCOM (USB ; firmware 20)
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Re: PLCBUS polling

Post by Digit »

Tx frames are generated by the Domotica software (Domotiga, Homeseer, whatever).
The module responds with pulses on the power line; the interface translates these to a series of bytes (Rx frame); and if someone thinks it's necessary to add an additional checksum to that frame from the firmware, he can :)
User avatar
vdoucet
Starting Member
Starting Member
Posts: 20
Joined: Sat Nov 13, 2010 3:01 pm
Location: Pau, France

Re: PLCBUS polling

Post by vdoucet »

Ok, I understand ! Thanks for the explanations.
Ubuntu 10.10 + Domotiga 0.1.194 + Gambas 2.21
Interface PLCBUS II-T PLC1141 G+ (USB) ; 2x PLCBUS2-R PLC2268HX2 ; 2x PLCBUS II-R PLC2267-H ; 1x PLCBUS II-R PLC2267-K
Oregon Scientific (7x THN132ES, 3x THGN132ES, 1x PCR800)
RFXCOM (USB ; firmware 20)
Post Reply

Return to “DomotiGa Forum”