Giter VIP home page Giter VIP logo

homematic-mqtt-bridge's Introduction

A bridge between Homematic and MQTT

This program receives events from a Homematic CCU and publishes contained data on MQTT. It also subscribes to commands from MQTT and relays them to the CCU.

Currently supported devices:

Home Assistant, when configured for MQTT discovery, can auto-detect sensors and device triggers published by this program.

Dependencies

How to use

hm-mqtt-bridge.py --broker mqtt://broker.local --listen 0.0.0.0 xmlrpc://ccu.local:2010

Homematic's XML-RPC mechanism requires listening sockets on both ends. By default, a random port number gets allocated by pyhomematic. If you need a fixed port number, specify it with --listen <ip>:<port>.

Docker

There is also a rudimentary docker container available. It checks out the latest version of this repository and runs it in a debian container with python3 and all the necessary dependencies installed.

docker build --pull -t homematic-mqtt-bridge .
docker run -it homematic-mqtt-bridge /opt/homematic-mqtt-bridge/hm-mqtt-bridge.py ....

How to get new devices supported

In order to support new devices, I need their names and the channels they use. To help with that you can run the hm-inventory.py script. Either directly:

python3 -m venv $someDirectory
source $someDirectory/bin/activate
pip install pyhomematic
./hm-inventory.py --connect xmlrpc://$ccuIP:2010 | tee inventory.log

or using the docker container:

docker build --pull -t homematic-mqtt-bridge .
docker run -it homematic-mqtt-bridge /opt/homematic-mqtt-bridge/hm-inventory.py --connect xmlrpc://$ccuIP:2010 | tee inventory.log

It does not stop running, as it records incoming events from the devices. It helps if you can press some buttons on the devices in question. If you are done, stop the script (ctrl-c).

Post this file as a new issue with the device name you want supported.

homematic-mqtt-bridge's People

Contributors

dicer avatar mtdcr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

dicer

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.