Heya, I’m the person who maintains Python/Twisted bindings for C-Bus.
I’ve recently gotten a branch working on Python 3 which supports exposing C-Bus Light Controls over MQTT, and even supports auto-discovery in Home Assistant. I intend for this to replace custom web interface and D-Bus code I’ve previously maintained.
I’m still polishing the Python 3 branch; but there’s a
Dockerfile in that branch that’ll run
cmqttd (the C-Bus-MQTT gateway) to a connected serial or USB PCI:
git clone -b python3 https://github.com/micolous/cbus.git
docker build .
docker run --device /dev/ttyUSB0 -e "MQTT_SERVER=192.0.2.1" -e "SERIAL_PORT=/dev/ttyUSB0" -e "TZ=Australia/Adelaide" -it cmqttd
With some small changes to
Dockerfile it should be possible to use this with a CNI (or other TCP-based PCI).
I’m planning on implementing MQTT authentication and migrating from Twisted to asyncio before declaring this “done”.