npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

homebridge-cbus-v2

v2.4.19

Published

Homebridge v2 compatible C-Bus / Clipsal C-Gate platform plugin

Readme

npm downloads Homebridge

homebridge-cbus-v2

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.

Requirements

  • Homebridge 2.x
  • Node.js 18 or newer
  • A running C-Gate server
  • The C-Gate project name from Toolkit/C-Gate

Install from GitHub

npm install github:pktechnology-code/homebridge-cbus-plugin

Or install/update it through the Homebridge UI if you are using this repository as the plugin source.

Basic Configuration

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.

Homebridge UI Workflow

Open the plugin settings in Homebridge. The custom UI is designed to work in this order:

  1. Enter the C-Gate connection settings.
  2. Click Apply Settings.
  3. Click Test C-Gate Settings to confirm Homebridge can connect to C-Gate and read the project database.
  4. Click Discover Accessories.
  5. Tick the accessories you want exposed to HomeKit.
  6. Optionally add accessories manually if they were not discovered.
  7. Click Save Selected Accessories.
  8. Click the purple Homebridge Save button.
  9. 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 Cache

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.

Manual 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.

Accessory Types

Supported accessory types include:

  • light
  • dimmer
  • switch
  • fan
  • motion
  • security
  • shutter
  • trigger
  • smoke
  • contact
  • temperature

Advanced Options

Most users can leave the Advanced section alone.

Discovery Cache Output Path

Optional full path for the discovery cache JSON file. Leave blank to use the Homebridge storage folder.

Platform Export Path

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.

Database Export Path

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.

Enable C-Gate Debug Logging

Turns on verbose C-Gate client logging for troubleshooting.

Troubleshooting

Discovery does not find anything

Check:

  • C-Gate is running.
  • client_ip_address points to the C-Gate host.
  • client_controlport is usually 20023.
  • client_cbusname exactly matches the C-Gate project name.
  • client_network and client_application match your installation.

Avahi error in Homebridge logs

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.

Changes do not appear in HomeKit

After selecting or manually adding accessories:

  1. Click Save Selected Accessories.
  2. Click the purple Homebridge Save button.
  3. Restart Homebridge.

Development

Run the syntax checks:

npm test

The 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-run

Confirm the package version, git tag, and npm version all match.

Status

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.