New Clipsal C-Bus binding

If there’s any Aussies out there interested in trying out openHAB2 with their Clipsal C-Bus automation system, I’ve submitted the code I’m using to manage our 1200 seat Auditorium and a whole heap of surrounding buildings. I’ve just switched over to running openHAB2 as the live production system after a full code rewrite from openHAB1 that we’ve been running for around 3 years now.

There’s a PR over here:

Don’t have C Bus yet but it is on its way so very interested in this.

Thanks for the effort.


Hi Scott - Cheers for your work on this. Hopefully Kiwi’s are invited to try this binding out too !! :slight_smile:

I haven’t made the leap to OH2 just yet, but I think you just gave me some motivation to try. (My production system is 1.8.2). However, given that your new binding also interfaces with cGate, I should be able to spin up a copy of OH2 on my Dev system over the next few weeks, and talk to the same instance of cGate as production is using, and be able to test in parallel.

Looking forwards to having a play with this soon. Thanks again for your work on this.

Hi All

Has anyone else got this binding fully working? I can turn loads in off, but, I’m not able to set dimmer levels and updates/sync from cbus aren’t coming through.


Thanks for getting this going. I was just starting to look at myself, so great that someone has already done the hard work :). Will start having a look at this soon connecting to my C-Bus network, and contribute where I can.


Hi Theo,
I haven’t moved to openHAB2 yet, still on openHAB1 but I’ve so far I’ve got the Cbus to openHAB working for one switch (about to setup more when I have time) with MQTT thanks to THIS.
It’s responsive and should be able to be ported to openHAB2 but it isn’t a binding as such.
Thanks Josh

Hi Josh

Thanks for reporting back and endorsing the alternatie method. I recently had to rebuild my raspberry Pi install and at this stage can’t get the cbus binding working again. Either there have been changes to openhab2 that have broken the binding or I have not set the cbus cgate server correctly on the Pi. The binding is showing up as uninitialised.

In any case I may have to consider using the method you linked to.

It’s a shame that work on this binding has slowed as there has recently been some great feedback from Kai on some suggested changes.

Hi Neo et al…

I’m going to attempt to rewrite (probably simplify) the cgate library that is blocking this binding… Already had my own direct version running but need to tidy and add some capabilities… Let you know how goes…

Scott, is that ok with you seeing as its your binding…


G’Day Simon

Thanks so much for chiming in. I can’t wait to see what you can come up with.

If there’s anything I can do to help along the way please let me know?

Thanks heaps,


Hi @soverton100

In case you weren’t following it over on GitHub @daveoxley just updated to his cbus library to be ASL2 licensed and pushed a new 1.0.4 release to maven.

Hi All

Just a quick heads up to anyone following the progress of the Clipsal c-bus binding. @soverton100 has fixed some bugs and got this back on track and working again.

It is still very much untested,but, I can confirm if the cgate server is correctly setup and running then openHAB can send and receive standard cbus lighting group commands.

Thanks all for your work, been keeping a close eye on this, happy to test out as well, though i’m only at my place with a cbus setup every few months so don’t have much of a chance to do detailed testing.

Hey guys, has anyone managed to get triggers or scenes working yet?

Nothing my end yet matt.

Hi guys anyone can help me to run cgate to openhab I am beginner so more details would be apretiate. Thanks

Hey Rafiq,

Have you got OpenHab running yet? And have you downloaded the Cbus binding from the GitHub thread that we’ve been communicating on?

Hi guys I am having problem with c-bus binding cgate connection online but c-bus network initializing I tried couple of times remove binding and install again but still no luck for me any help would be much appreciate.

Nothing here either for getting triggers/scenes working. I have a horrible work around though using Exec binding to send a telnet to C-Gate.
You can use this idea to trigger events and set group values.
I haven’t looked at how to persist the status through restarts or query current state on startup.

Thing Config
Add %2$s to the end of the command to accept the value from the switch
Change Transform to MAP
Enable Autorun

String Master_Blinds “Master Blinds” {channel=“exec:command:d3e1d6a7:input”}
String Master_Fan “Master Fan” {channel=“exec:command:2f0eb381:input”}

Switch item=Master_Blinds mappings=[0=CLOSE,255=OPEN]
Switch item=Master_Fan mappings=[0=OFF,34=LOW,64=MED,255=HIGH]

Blinds Trigger Script
#Takes input argument being 0 or 255 in this case
set command [lindex $argv 0];
#Connect to C-Gate via telnet
spawn telnet 20023
#Wait for the connection to establish
expect “Trying…”
expect “Connected to”
expect “Escape character is ‘^]’.”
expect “201 Service ready: Clipsal C-Gate Version: v2.11.1 (build 3240) #cmd-syntax=1.0”
#Not sure if I needed sleep.
sleep 1
#This is the where the action happens. Passing $command (0 or 255) to the C-Bus network 254, the Trigger application 202, the Trigger group 7 and then hitting return.
send “trigger event 254/202/7 $command \r”

Fan Ramp Group Script
As above with the final command line being
#This is the where the action happens. Passing $command to the C-Bus network 254, the Lighting Application 56, the Group 20 and then hitting return.
send “RAMP 254/56/20 $command \r”

I have been seeing the same problem and i think i know what the problem is. Stull trying to understand all the code so nothing i can make available yet but working on it.

I have posted a new jar in the Pull Request that seems to be fairly stable with basic functionality. It should behave as per the previous versions but now copes with restarting openhab or cgate.
I am intending to open a new pullrequest in the next day or two to start the process of adding it to openhab.
Any issues please let me know.
I will look at things like triggers/scenes after i have started that process.