PLCBUS LINUX Computer interface

Forum about PLCBUS devices & software.

Moderator: Digit

PLCBUS LINUX Computer interface

Postby Jfn » Sun May 25, 2008 12:18 pm

For those experimenting with PLCBUS under Linux: I wrote a small but simple perl script that translates PLCBUS frames in a somewhat more readable form:
Code: Select all
debian:/tmp# ./plcbus_test.pl
USER code       : 255
HOME_UNIT code  : A3
3-Phase coupler : INACTIVE
ACK_PULSE       : ENABLED
Command         : Same home + unit: UNIT OFF
debian:/tmp#
It runs in an endless loop, decoding all packets it receives.

<b>Download Attachment:</b> [url="http://www.domoticaforum.eu/uploaded/Jfn/2008525131623_plcbus_test.pl.txt"][img]images/icon_paperclip.gif[/img] plcbus_test.pl.txt[/url]<br />3.71KB

Als het niet gerepareerd kan worden dan is het niet kapot!
Jfn
Member
Member
 
Posts: 332
Joined: February 2008
Location: Netherlands

PLCBUS LINUX Computer interface

Postby Snelvuur » Sun May 25, 2008 1:31 pm

nice work.. looks simple enough .. i thought it would be complexer then a ctx35..

// Erik (binkey.nl)
User avatar
Snelvuur
Forum Moderator
Forum Moderator
 
Posts: 3155
Joined: April 2007
Location: Netherlands

PLCBUS LINUX Computer interface

Postby Jfn » Sun May 25, 2008 2:43 pm

I based my script on the protocol specs (Available for download from the manufacturer's website).

It is very basic, but provides an easy insight on what data is received. When using the DIM or BRIGHT function for example, additional data is provided in bytes 4 and 5 of the payload. It tells you about dimlevel and rate etc.

Byte 6 of the payload is the RX_TX_SWITCH byte. It can be used as some sort of handshake method. Among other things, it tells you about whether a given command was received ok by a device.



Als het niet gerepareerd kan worden dan is het niet kapot!
Jfn
Member
Member
 
Posts: 332
Joined: February 2008
Location: Netherlands


Return to PLCBUS Forum

Who is online

Users browsing this forum: No registered users and 1 guest