{"id":25077425,"url":"https://github.com/gbeine/knx2mqtt","last_synced_at":"2025-04-15T03:05:45.134Z","repository":{"id":50659420,"uuid":"248518201","full_name":"gbeine/knx2mqtt","owner":"gbeine","description":"MIRROR - A KNX2MQTT Bridge allowing bidirectional telegram transfer","archived":false,"fork":false,"pushed_at":"2025-01-13T18:49:09.000Z","size":93,"stargazers_count":17,"open_issues_count":1,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-15T03:05:40.135Z","etag":null,"topics":["home-automation","iot","knx","knx-iot","knx-ip","mqtt","mqtt-bridge","mqtt-smarthome","smart-home","smart-home-automation","smarthome"],"latest_commit_sha":null,"homepage":"https://c0d3.sh/smarthome/knx2mqtt/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gbeine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-19T14:03:13.000Z","updated_at":"2025-01-13T18:49:13.000Z","dependencies_parsed_at":"2025-01-10T21:39:48.582Z","dependency_job_id":"0dc22b76-743f-4477-8e48-eb49c725aa8a","html_url":"https://github.com/gbeine/knx2mqtt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbeine%2Fknx2mqtt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbeine%2Fknx2mqtt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbeine%2Fknx2mqtt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbeine%2Fknx2mqtt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gbeine","download_url":"https://codeload.github.com/gbeine/knx2mqtt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248997086,"owners_count":21195799,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["home-automation","iot","knx","knx-iot","knx-ip","mqtt","mqtt-bridge","mqtt-smarthome","smart-home","smart-home-automation","smarthome"],"created_at":"2025-02-07T02:34:13.916Z","updated_at":"2025-04-15T03:05:45.094Z","avatar_url":"https://github.com/gbeine.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# knx2mqtt - A KNX2MQTT Bridge allowing bidirectional telegram transfer\n\nI've created this project as a replacement for the KNX integration of [HomeAssistant](https://home-assistant.io/) that worked not stable in my environment.\n\nIt is quite simple and does what it's name says: It works as a bridge between KNX and MQTT translating messages between these in both directions.\n\n## Installation\n\n### Installation using Docker\n\n```\ndocker run -it --rm --name knx2mqtt -v knx2mqtt.conf:/etc/knx2mqtt.conf docker.io/gbeine/knx2mqtt\n```\n\n### Native installation with Python venv\n\nThe installation requires at least Python 3.9.\nOn Raspbian, it is required to install rustc because xknx depends on cryptography which cannot be built without rust.\n\nSee [Install Rust](https://www.rust-lang.org/tools/install) for details.\n\nPhilosophy is to install it under /usr/local/lib/knx2mqtt and control it via systemd.\n\n```\ncd /usr/local/lib\ngit clone https://github.com/gbeine/knx2mqtt.git\ncd knx2mqtt\n./install\n```\n\nThe `install` script creates a virtual python environment using the `venv` module.\nAll required libraries are installed automatically.\nDepending on your system this may take some time.\n\n## Configuration\n\nThe configuration is located in `/etc/knx2mqtt.conf`.\n\nEach configuration option is also available as command line argument.\n\n- copy `knx2mqtt.conf.example`\n- configure as you like\n\n| option                   | default              | arguments                  | comment                                                                                |\n|--------------------------|----------------------|----------------------------|----------------------------------------------------------------------------------------|\n| `mqtt_host`              | 'localhost'          | `-m`, `--mqtt_host`        | The hostname of the MQTT server.                                                       |\n| `mqtt_port`              | 1883                 | `--mqtt_port`              | The port of the MQTT server.                                                           |\n| `mqtt_keepalive`         | 30                   | `--mqtt_keepalive`         | The keep alive interval for the MQTT server connection in seconds.                     |\n| `mqtt_clientid`          | 'knx2mqtt'           | `--mqtt_clientid`          | The clientid to send to the MQTT server.                                               |\n| `mqtt_user`              | -                    | `-u`, `--mqtt_user`        | The username for the MQTT server connection.                                           |\n| `mqtt_password`          | -                    | `-p`, `--mqtt_password`    | The password for the MQTT server connection.                                           |\n| `mqtt_topic`             | 'bus/knx'            | `-t`, `--mqtt_topic`       | The topic to publish MQTT message.                                                     |\n| `mqtt_tls`               | -                    | `--mqtt_tls`               | Use SSL/TLS encryption for MQTT connection.                                            |\n| `mqtt_tls_version`       | 'TLSv1.2'            | `--mqtt_tls_version`       | The TLS version to use for MQTT. One of TLSv1, TLSv1.1, TLSv1.2.                       |\n| `mqtt_verify_mode`       | 'CERT_REQUIRED'      | `--mqtt_verify_mode`       | The SSL certificate verification mode. One of CERT_NONE, CERT_OPTIONAL, CERT_REQUIRED. |\n| `mqtt_ssl_ca_path`       | -                    | `--mqtt_ssl_ca_path`       | The SSL certificate authority file to verify the MQTT server.                          |\n| `mqtt_tls_no_verify`     | -                    | `--mqtt_tls_no_verify`     | Do not verify SSL/TLS constraints like hostname.                                       |\n| `knx_host`               | 'localhost'          | `--knx_host`               | The address of the KNX tunnel device.                                                  |\n| `knx_port`               | 3671                 | `--knx_port`               | The port of the KNX tunnel device.                                                     |\n| `knx_local_ip`           | -                    | `--knx_local_ip`           | The ip address of the system that connects to KNX.                                     |\n| `knx_individual_address` | -                    | `--knx_individual_address` | The group address of the system that send telegrams to KNX.                            |\n| `knx_no_queue`           | -                    | `--knx_no_queue`           | Workaround for scheduling problems of XKNX telegram queue.                             |\n| `timestamp`              | -                    | `-z`, `--timestamp`        | Publish timestamps for all topics, e.g. for monitoring purposes.                       |\n| `verbose`                | -                    | `-v`, `--verbose`          | Be verbose while running.                                                              |\n| -                        | '/etc/knx2mqtt.conf' | `-c`, `--config`           | The path to the config file.                                                           |\n| `items`                  | see below            | -                          | The configuration for the items on the KNX bus.                                        |\n\n### KNX\n\nCurrently, only KNX tunneling mode is supported.\nIt may become more in the future, if I found testing environments with according setups.\nFeel free to add routing or other options and open a pull request for this.\n\n### Items\n\nThen you can configure your bus topology as items.\n\n```\n    ...\n    \"items\": [\n        {\n            \"address\": \"5/0/10\",\n            \"type\": \"DPTTemperature\"\n        },\n        {\n            \"address\": \"5/0/20\",\n            \"type\": \"DPTHumidity\"\n        },\n        ...\n    ]\n    ...\n```\n\nEach item need an `address` (the group address) and a `type`.\nUnfortunately, the list of types is not part of the xknx documentation.\nBut the examples in the file I provide with the project may fit for the most purposes.\nAll supported types can be found in the [xknx sources](https://github.com/XKNX/xknx/blob/main/xknx/dpt/__init__.py).\n\nThe default operating mode for an object is to listen on the KNX and publish the telegram values to MQTT.\n\nThat may be changed using the following settings:\n\n* `mqtt_subscribe` (default: false): if set to `true`, changes on any related MQTT topic will be processed\n\n### Publishing\n\nAll values are published using the group address and the MQTT topic.\n\nSo, the Date exposing sensor in the example is listening for `bus/knx/0/0/1` and the switch is listening on and publishing to `bus/knx/0/1/1`.\n\n## Running knx2mqtt\n\nI use [systemd](https://systemd.io/) to manage my local services.\n\n## Support\n\nI have not the time (yet) to provide professional support for this project.\nBut feel free to submit issues and PRs, I'll check for it and honor your contributions.\n\n## License\n\nThe whole project is licensed under BSD-3-Clause license. Stay fair.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgbeine%2Fknx2mqtt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgbeine%2Fknx2mqtt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgbeine%2Fknx2mqtt/lists"}