Homebridge 2.x compatible C-Bus / Clipsal C-Gate platform plugin.
This plugin connects Homebridge to a Clipsal C-Bus installation through C-Gate, discovers C-Bus groups, and lets you choose which groups should appear in HomeKit.
- Homebridge 2.x
- Node.js 18 or newer
- A running C-Gate server
- The C-Gate project name from Toolkit/C-Gate
npm install github:pktechnology-code/homebridge-cbus-pluginOr install/update it through the Homebridge UI if you are using this repository as the plugin source.
The platform alias is CBus.
Example:
{
"platform": "CBus",
"name": "Clipsal C-Gate",
"client_ip_address": "127.0.0.1",
"client_controlport": 20023,
"client_cbusname": "MYHOUSE",
"client_network": 254,
"client_application": 56,
"discoveryCacheEnabled": true,
"discoveredAccessories": []
}Replace MYHOUSE with your actual C-Gate project name. Project names are usually uppercase and are limited by C-Gate naming rules.
Open the plugin settings in Homebridge. The custom UI is designed to work in this order:
- Enter the C-Gate connection settings.
- Click Apply Settings.
- Click Test C-Gate Settings to confirm Homebridge can connect to C-Gate and read the project database.
- Click Discover Accessories.
- Tick the accessories you want exposed to HomeKit.
- Optionally add accessories manually if they were not discovered.
- Click Save Selected Accessories.
- Click the purple Homebridge Save button.
- Restart Homebridge.
Important: Apply Settings and Save Selected Accessories prepare the plugin configuration inside the Homebridge UI. The purple Homebridge Save button is still the final step that writes the changes to config.json.
Discovery reads the C-Gate database and creates a JSON cache of C-Bus groups.
If Discovery Cache Output Path is blank, the cache is written to the Homebridge storage folder:
cbus-discovery-cache.json
On many systems this will look like:
/volume1/homebridge/cbus-discovery-cache.json
You can set a custom cache path in Advanced if needed.
The cache is useful for reviewing all C-Bus groups and names before selecting accessories.
If an accessory is not found during discovery, use the manual entry row in the UI.
Manual entries need:
- ID: the C-Bus group address
- Name: the HomeKit accessory name
- Type: light, dimmer, switch, fan, motion, security, shutter, trigger, smoke, contact, or temperature
- Active Duration: optional, for momentary actions such as garage doors or triggers
After adding a manual accessory, click Save Selected Accessories, then the purple Homebridge Save button.
Supported accessory types include:
lightdimmerswitchfanmotionsecurityshuttertriggersmokecontacttemperature
Most users can leave the Advanced section alone.
Optional full path for the discovery cache JSON file. Leave blank to use the Homebridge storage folder.
Optional developer/helper export. It writes a generated Homebridge platform configuration scaffold based on the C-Gate database and current plugin configuration.
Most users do not need this.
Optional developer/debug export. It writes the parsed C-Gate database, including applications, groups, units, and unrecognised unit types.
Most users do not need this.
Turns on verbose C-Gate client logging for troubleshooting.
Check:
- C-Gate is running.
client_ip_addresspoints to the C-Gate host.client_controlportis usually20023.client_cbusnameexactly matches the C-Gate project name.client_networkandclient_applicationmatch your installation.
You may see:
Failed to create listener for avahi-daemon server state
Error message: Error: No such interface found
This is not a C-Bus plugin error. It comes from Homebridge/mDNS networking. Homebridge may still run, but HomeKit network discovery can be unreliable until Avahi/mDNS and the host network interface are configured correctly.
After selecting or manually adding accessories:
- Click Save Selected Accessories.
- Click the purple Homebridge Save button.
- Restart Homebridge.
Run the syntax checks:
npm testThe test script validates the package metadata, schema JSON, server JavaScript, custom UI script, and release files. GitHub Actions runs the same check on pushes and pull requests.
Before publishing a release:
npm test
npm pack --dry-runConfirm the package version, git tag, and npm version all match.
This is a Homebridge 2.x compatible maintenance fork of the original homebridge-cbus plugin. Further testing across different C-Bus installations and accessory types is recommended.