C-Bus - Lan Bridge

97 views
Skip to first unread message

Les Bridges

unread,
Jan 26, 2014, 10:59:00 PM1/26/14
to
Hi everyone,

I have a C-Bus2 5500PC and a L5512RVF and the following commands

Relay 1

\x0538007900\x0d
\x0538000100\x0d

Relay 2

01
01

etc etc

when i get to relay 5 group 12 is activated and I do not seen to be able to control Relay 5-11 these are brand new units.

Any help would be appreciated.

Thank you in advance

Les

Phil Harris

unread,
Jan 27, 2014, 4:19:32 AM1/27/14
to comman...@googlegroups.com
Hopefully not an insulting question but have you actually programmed up the relay module itself and checked that the relays are all triggered by C-Bus groups under C-Bus?

The relays aren't triggered by relay numbers - they're triggered by groups and so you need to use the C-Bus toolkit software to assign groups (tags) to the various channels on the relay module before they can be controlled ... if you're using brand new modules then they don't come with any programming at all in them and can't be triggered by group commands.

Cheers

Phil 

Les Bridges

unread,
Jan 27, 2014, 4:58:01 AM1/27/14
to comman...@googlegroups.com
Nothing is insulting when your a novice like me,

I did try and logon to the CBus device using CBus Toolkit however it found the unit but was not able to get the project name. So I gave up.

Do I have to set this up more even though it does seem to work? If so is there a special way to log onto this?

I did however since posting this manually sync each relay button with my iPad / Command Fusion / LAN Bridge and it works great.

No I need to find a way to get feed back to tell the buttons which state to be in, I understand this is done through joins,

Thanks Again

Les

dogs_au

unread,
Jan 27, 2014, 5:08:01 AM1/27/14
to comman...@googlegroups.com
Hi Les,

You need to grab cbus diagnostics from the cis site and make some setting changes with it, if you do a search on the groups here you will see the settings you need to make. Also there is a cbus JavaScript module here which works great. If you need help getting it going drop me an email and I'll point you in right direction.

Les Bridges

unread,
Jan 27, 2014, 6:21:19 AM1/27/14
to comman...@googlegroups.com
Thanks Phil

I have loaded up the CBus Diagnostic Utility and it sees the unit fine, the only item I can see to change with the posts is the Hardware Network Burden, I cannot see any other mention of changes?

Is there other ones I should make, I already have the C-Bus Tool Box loaded in GUI Designer.

Phil Harris

unread,
Jan 27, 2014, 7:10:24 AM1/27/14
to comman...@googlegroups.com
Hi,

The CBus Diagnostic utility isn't the same as C-Bus Toolkit and the diagnostic utility doesn't allow you to set up modules ... How much C-Bus have you done previously? (Just so I can get an idea what you know...)

In my previous life (eight years ago) I was top level C-Bus support for Schneider Electric (Clipsal's parent company) in the UK so hopefully should know enough to be able to get you moving here :-D - what time zone are you in? Perhaps I can help you with the basic C-Bus stuff remotely and then get you nicely on your way?

Cheers

Phil


Les Bridges

unread,
Jan 27, 2014, 7:18:12 AM1/27/14
to comman...@googlegroups.com
Phil I'm In Perth I have Team Viewer loaded and ready at any time, I have had zero C-Bus experience.

I have a good mate who has his Electrical Contractor Licence who will do the AC side I'm really good with the low voltage stuff.

I have created a panel with 12 buttons on it that turn the relays on and off ok with simulated feed back.

Im getting Checksum Errors and the message

> Invalid parameters for CF.watch: external system named '' does not exist.
> CBus Checksum Error: Expected '00', received 'õõ
> CBus Checksum Error: Expected '0', received 'õõ

I have no checksums in the commands.

Im not sure if the commands are in the correct spot.

This is a typical Command Group 00

\xF2\x02\xF3TCFXSPW\xF4\x0538007900\x0d\xF5\xF5

Thanks Again
Screenshot 2014-01-27 20.15.29.png

Phil Harris

unread,
Jan 27, 2014, 8:11:56 AM1/27/14
to comman...@googlegroups.com
Hi Les,

More than happy to log into you remotely this evening (UK Time)) and sort out the C-Bus side of things - the C-Bus comms from Command Fusion is something that I haven't yet played with yet and so lets take it one bite at a time and try to get the C-Bus side working correctly first?

It's 13:10 here at the moment - will you be around anytime in around 5 - 11 hours time? (My evening UK time.)

Phil

Les Work

unread,
Jan 28, 2014, 7:09:35 AM1/28/14
to comman...@googlegroups.com

JUST IN CASE


 

Les Bridges

Technical Dept

 

l...@nwelectronics.com.au

www.nwelectronics.com.au


 

North West Electronics
Unit 3 2 Haines Street

Broome, Western Australia 6725

Tel:     0891925003

Fax:    0891926003

ABN : 710 626 609 82

  

P lease consider the environment before printing this email. 

IMPORTANT NOTICE

This email, including any attachments is a confidential communication between the sender and the intended recipient. They may contain legally privileged information or copyright. You should not read, copy, use or disclose the content without authorisation. If you are not the intended recipient or you have received this email in error please contact us at once by return email and then delete both messages. We do not accept liability in connection with computer virus, data corruption, delay, interruption, unauthorised access or unauthorised amendment. This notice should not be removed.



Les Bridges

unread,
Jan 31, 2014, 9:37:08 AM1/31/14
to comman...@googlegroups.com
Hi Phil I hope mum had a good send off,

After the changes to Cbus tool kit, everything stopped working and the last three days I have been banging my head against a brick wall.

I might have to resort to the best EBay bid!

Florent Pillet

unread,
Jan 31, 2014, 10:11:48 AM1/31/14
to comman...@googlegroups.com
Les,

It seems that you are mixing several notation formats, and that the data you are sending to the device is not in the expected format.

I briefly looked at the Clipsal docs (and yes they are a bit confusing). To summarize, anything that goes on the serial wire has to be framed by the letter \ (front) and by a carriage return (back). In between, all data is in hex-ascii form (bytes are each written as two ascii letters). And before the <cr>, the last two characters should be the hex checksum of the rest of the packet.

SO... if I roll back to your example, which is:

0538007900

According to the Clipsal docs this says:

$05: Point to multipoint
$38 $00: Target the Lighting Application
$79 $00: Command for application

Now you need to add the CHECKSUM, which is the sum of the bytes $05 $38 $00 $79 $00

I'll spare you the pain of calculating - the checksum is $B6, the 2's complement is $4A

So the data you need to send is:

05380079004A

and you need to frame it with \ (from) and \x0D (back). So the actual data you'll write in the System Commander test window is:

\05380079004A\x0D

And this should work.

For the sake of completeness, the complete packet sent over CFLink is:

\xF2\x02\xF3TCFXSPW\xF4\x5C05380079004A\x0d\xF5\xF5

(\x5C is the hexadecimal representation for the \ character)

Note that the test data window in System Commander lets you type any character freely. \x means "send an hexadecimal byte" and is followed by the hex letters for this byte. This will sent the raw <cr> byte. This is different from the notation of the CONTENTS of Clipsal packets, which is ascii.

Florent

Barry Gordon

unread,
Jan 31, 2014, 10:38:25 AM1/31/14
to comman...@googlegroups.com
Florent, I see a lot of users starting to do advanced communications requiring checksums. May I suggest that you add to the CF function library a checksum calculator with perhaps the checksum type, a string type, and the string over which to compute the checksum. 

I generally have in my projects that require a specific checksum a JS (one argument, the string over which to compute the checksum always as a set of bytes) function that does the above, in fact in the Serial RS232 communications 101 document you provide a link to it has an example of such a computation.

If it was in the CF Library with the checksum type being a text string naming the checksum style e.g. "simpleAdd", "2~simpleAdd" for 2's compliment of simple add, "1~simpleAdd", "crc16", ... And the string type being things like "binary", "displayHex", "ASCII".

It is trivial to do in JS, but many of the CF user community is not very JS literate. Just a thought.

Sent from my iPad
--
You received this message because you are subscribed to the Google Groups "CommandFusion Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to commandfusio...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Clayton Vicente

unread,
Jan 31, 2014, 10:48:06 AM1/31/14
to comman...@googlegroups.com
Hi Barry, take a look..
This will not work ?


Subject: Re: C-Bus - Lan Bridge
From: ba...@the-gordons.net
Date: Fri, 31 Jan 2014 10:38:25 -0500
To: comman...@googlegroups.com

Barry Gordon

unread,
Jan 31, 2014, 10:57:01 AM1/31/14
to comman...@googlegroups.com
Close but not quite there. That function does a CRC not a simple checksum. A good starting point, just needs to be extended. Thanks for pointing it out to me. My old memory recalled it once you pointed me to it. Any idea on your trip to the US?

Sent from my iPad

Florent Pillet

unread,
Jan 31, 2014, 11:24:08 AM1/31/14
to comman...@googlegroups.com
As Clayton pointed it, we already have such an API but we made it for nontrivial computation like various forms of CRC,
which are both time consuming and complicated to get right (since there are many forms of CRC).

But you're right that we could provide a CF.checksum() API that does something similar. It's difficult to cover all possible cases though, because for example the Clipsal format requires that you compute the checksum BEFORE turning the data to ascii. I don't see a one-size-fits-all solution to this. Source data may be in binary, text of hex-ascii format, or even provided as an array of values later turned into binary; expected checksum may be wanted as 8-bit, 16-bit value or output as binary or hex-ascii, etc.

Rather, I guess that the solution lies into proper modules, we'll have things to say about that soon. We could certainly provide a general checksum library that covers all cases and possible forms, just pick the one you want.

For example, checksuming binary data for Clipsal (before tuning the whole thing to hex-ascii) would be something like:

function checksum2sComplement(someString) {
   // checksums every byte in the string and appends the checksum byte at the end
   var cs = 0, n = someString.length;
   for (var i=0; i < n; i++) {
     cs += someString.charCodeAt(i);
   }
   return someString + String.fromCharCode((~cs + 1) & 0xff);
}

After that you still need to turn the string to hex-ascii for Clipsal. Here's a function that does it:

var btoh = "0123456789ABCDEF";
function stringToHexAscii(someString) {
    var c, s = "", n = someString.length;
    for (var i=0; i < n; i++) {
        c = someString.charCodeAt(i);
s = s + btoh[c >> 4] + btoh[c & 0xf];
    }
    return s;
}


Florent

Phil Harris

unread,
Jan 31, 2014, 3:10:32 PM1/31/14
to comman...@googlegroups.com
When you say that everything stopped working do you mean from Command Fusion or do you mean within CBus itself?

Phil

Sent from Molto for iPad

From: Les Bridges
Sent: Friday, January 31, 2014 14:37 pm
Subject: Re: C-Bus - Lan Bridge

--
You received this message because you are subscribed to a topic in the Google Groups "CommandFusion Software" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/commandfusion/MQegf69cP2g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to commandfusio...@googlegroups.com.

Les Bridges

unread,
Jan 31, 2014, 6:39:58 PM1/31/14
to comman...@googlegroups.com
Command fusion, Cbus will receive commands via putty, com port 2 and work perfectly.

After i connected via Cbus toolkit everything went pear shaped.

Sent from my iPad
Reply all
Reply to author
Forward
0 new messages