micolous / cbus

Use Python to communicate with a Clipsal C-Bus PCI or CNI! Includes MQTT bridge (for Home Assistant), PCI simulator, and reverse engineering notes.
http://cbus.readthedocs.org/
GNU Lesser General Public License v3.0
49 stars 27 forks source link
clipsal clipsal-cbus home-assistant home-automation mqtt

libcbus

Build Status Coverage Status Documentation Status

Talks to Clipsal C-Bus using Python 3.7+.

Copyright 2012-2020 Michael Farrell. Licensed under the GNU LGPL3+. For more details see COPYING and COPYING.LESSER.

Note: This software is not certified or endorsed by Clipsal or Schneider Electric. Clipsal claim that use of C-Bus with non-Clipsal hardware or software may void your warranty.

More information about the project is available on the libcbus ReadTheDocs site, and in the docs directory of the source repository.

About this project

This is a reimplementation of the PCI serial protocol from scratch. This is done using a combination Clipsal's Open C-Bus documentation and reverse engineering (to fill in the gaps).

Unlike some contemporary alternatives, it does not use the libcbm library/DLL from Clipsal, or C-Gate, which have serious problems:

Because this is a pure-Python implementation, it should run on any Python supported platform. It has been primarily developed on Linux on armhf, x86_32 and x86_64 and macOS on x86_64.

At a high level, this project includes cmqttd, a daemon to bridge a C-Bus PCI to an MQTT Broker. cmqttd supports Home Assistant's MQTT Light model and MQTT topic auto-discovery.

Integration with Hass.io is still a work in progress.

Hardware interface support

This should work with the following C-Bus PC Interfaces (PCIs):

Recent updates (2020-02-22)

This project has recently completed a migration to Python 3.7.

Most things should work, but I'm still going through updating all the documentation properly.

There are many backward-incompatible changes:

Many APIs have changed due to refactoring, and is subject to further change without notice. The most stable API is via MQTT (cmqttd).