Coder Social home page Coder Social logo

nworbnhoj / cbus Goto Github PK

View Code? Open in Web Editor NEW

This project forked from micolous/cbus

0.0 1.0 0.0 1.19 MB

Use Python to communicate with a Clipsal C-Bus PCI or CNI! Includes MQTT bridge (for Home Assistant), PCI simulator, and reverse engineering notes.

Home Page: http://cbus.readthedocs.org/

License: GNU Lesser General Public License v3.0

Python 98.24% Shell 1.24% Dockerfile 0.52%

cbus's Introduction

libcbus

Build Status Coverage 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:

  • The libcbm module only runs on x86_32 systems, and is only available as a static library (closed source).

  • C-Gate requires an OS and architecture specific closed source serial library (SerialIO), the Java runtime, and itself has various licensing restrictions.

As such, it should run on any Python supported platform. The software itself has been primarily developed on Linux with on armhf, x86_32 and x86_64 systems.

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:

  • This only supports Python 3.7 and later.

  • Python 2.x support has been entirely removed, as Python 2 has been sunset as of 2020.

    Python 3.6 and earlier support is not a goal. We want to use new language features!

  • D-Bus is no longer used by this project:

    • cmqttd (C-Bus to MQTT bridge) replaces cdbusd (C-Bus to D-Bus bridge).

    • dbuspcid (virtual PCI to D-Bus bridge) has been removed. It has no replacement.

  • sage (libcbus' web interface) and staged (scene management system) have been removed. cmqttd supports Home Assistant's MQTT Discovery schema.

    This allows libcbus to reduce its scope significantly -- Home Assistant can interface with much more hardware than C-Bus, and has a large community around it.

  • This no longer uses Twisted -- asyncio (in the standard library) is used instead.

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

cbus's People

Contributors

micolous avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.