2020-09-21 01:58:32 +02:00
# C-Bus Binding
2021-04-24 20:39:51 +02:00
This is the binding for the [Clipsal C-Bus System ](https://www.clipsal.com/products/c-bus-control-and-management-system ).
2020-09-21 01:58:32 +02:00
This binding allows you to view and control groups on C-Bus networks from openHAB.
## Configuration
2021-05-06 22:26:05 +02:00
This binding connects to C-Gate software which can be downloaded from the [Clipsal Downloads Site ](https://updates.clipsal.com/ClipsalSoftwareDownload/mainsite/cis/technical/index.html ).
There is information about setting up the C-Gate software in the [CBus Forums ](https://www.cbusforums.com/forums/c-bus-toolkit-and-c-gate-software.4 ).
Make sure that the config/access.txt file allows a connection from computer running openHAB.
2020-09-21 01:58:32 +02:00
2021-05-06 22:26:05 +02:00
Whilst all versions of C-Gate should work 2.11.2 contained a fix for handling Indicator Kill messages for trigger groups.
Without that they will remain on the last value set and wont match what is shown on CBus devices.
2020-09-21 01:58:32 +02:00
First the CGate Connection bridge needs to be configured with the ip address of the computer running the C-Gate software.
2021-04-24 20:39:51 +02:00
After this a Bridge is creaed for each network configured on the CBus Network. The CBus Project Name and the network Id for that network
2020-09-21 01:58:32 +02:00
## Supported Things
This binding support 6 different things types
2021-05-06 22:26:05 +02:00
| Thing | Type | Description |
|-------------|--------|-----------------------------------------------------|
| cgate | Bridge | This connects to a C-Bus CGate instance to |
| network | Bridge | This connects to a C-Bus Network via a CGate bridge |
| light | Thing | This is for C-Bus lighting groups |
| temperature | Thing | This is for C-Bus temperature groups |
| trigger | Thing | This is for C-Bus trigger groups |
| dali | Thing | This is for C-Bus DALI dimming groups |
When a discovery scan is started in the UI, Things are discovered for the groups that are found on the CBus network.
2020-09-21 01:58:32 +02:00
2022-12-07 21:09:32 +01:00
## Channels
2020-09-21 01:58:32 +02:00
2021-05-06 22:26:05 +02:00
At startup the binding will scan the network for the values of all the groups and set those on the appropriate channels.
It is not possible to fetch the value of a Trigger Group so those values will only be updated when a trigger is set on the CBus network.
2020-09-21 01:58:32 +02:00
### Lights
Light things have 2 channels which show the current state of the group on the cbus network and can also set the state of the group:-
2022-12-07 21:09:32 +01:00
- **state** - On/Off state of the light
- **level** - The level of the channel between 0 and 100
2020-09-21 01:58:32 +02:00
### Temperature
Temperature things have 1 channel which shows the current value. This is read-only and will not set the value on the CBus Network.
2022-12-07 21:09:32 +01:00
- **temp** - Temperature value
2020-09-21 01:58:32 +02:00
### Trigger
Trigger things have 1 channel which shows the current trigger value on the cbus network and can be used to set a trigger value on the CBus Network.
2022-12-07 21:09:32 +01:00
- **value** - CBus Trigger value
2020-09-21 01:58:32 +02:00
### Dali
Dali things have 1 channel which shows the current value on the cbus network and can be used to set a value on the CBus Network.
2022-12-07 21:09:32 +01:00
- **level** - Value from the DALI node
2020-09-21 01:58:32 +02:00
## Example
### cbus.things
2022-12-07 21:09:32 +01:00
```java
2020-09-21 01:58:32 +02:00
/* Need a cgate bridge to connect to cgate and then 1 network bridge for each network on that system */
Bridge cbus:cgate:cgatenetwork "file - cgate" [ ipAddress="127.0.0.1"] {
Bridge network cbusnetwork "file - network" [ id=254, project="OURHOME" ] {
/* Things can be configured within each network bridge */
Thing light light27 "light 27" [group=27]
}
}
/* Things can be configured seperatly and associated with the network bridge */
Thing cbus:light:cgatenetwork:cbusnetwork:light31 "light 31" (cbus:network:cgatenetwork:cbusnetwork) [ group=31 ]
Thing cbus:trigger:cgatenetwork:cbusnetwork:trigger1 "trigger 1" (cbus:network:cgatenetwork:cbusnetwork) [ group=1 ]
Thing cbus:temperature:cgatenetwork:cbusnetwork:temp2 "temp 2" (cbus:network:cgatenetwork:cbusnetwork) [ group=2 ]
Thing cbus:dali:cgatenetwork:cbusnetwork:dali3 "dali 3 value" (cbus:network:cgatenetwork:cbusnetwork) [ group=3 ]
```
### cbus.items
2022-12-07 21:09:32 +01:00
```java
2020-09-21 01:58:32 +02:00
Dimmer light31Dimmer { channel="cbus:light:cgatenetwork:cbusnetwork:light31:level"}
Switch light31Switch { channel="cbus:light:cgatenetwork:cbusnetwork:light31:state"}
Number trigger1Value { channel="cbus:trigger:cgatenetwork:cbusnetwork:trigger1:value"}
Number temp2 { channel="cbus:temperature:cgatenetwork:cbusnetwork:temp2:temp"}
Dimmer dali3 { channel="cbus:dali:cgatenetwork:cbusnetwork:dali3:level"}
```
### cbusdemo.sitemap
2022-12-07 21:09:32 +01:00
```perl
2020-09-21 01:58:32 +02:00
sitemap cbusdemo label="CBus Binding Demo"
{
Frame label="light" {
Slider item=light31Dimmer label="dimmer"
Switch item=light31Switch label="switch"
}
Frame label="trigger" {
Switch item=trigger1Value label="trigger Value" mappings=[0="light 1", 1="light 2", 2="both lights", 3="off"]
}
Frame label="temperature" {
Default item=temp2 label="Temperature" icon="temperature"
}
Frame label="dali" {
Default item=dali3 label="Dali Level"
}
}
```