{"id":13585079,"url":"https://github.com/dgomes/dali2mqtt","last_synced_at":"2025-05-08T19:36:51.317Z","repository":{"id":40568216,"uuid":"163194957","full_name":"dgomes/dali2mqtt","owner":"dgomes","description":"DALI \u003c-\u003e MQTT bridge","archived":false,"fork":false,"pushed_at":"2024-02-03T16:55:22.000Z","size":164,"stargazers_count":47,"open_issues_count":15,"forks_count":25,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-31T17:54:24.681Z","etag":null,"topics":["dali-bus","hacktoberfest","mqtt-bridge","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dgomes.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2018-12-26T15:47:15.000Z","updated_at":"2025-02-12T16:12:43.000Z","dependencies_parsed_at":"2024-11-06T03:03:10.509Z","dependency_job_id":"9d287238-bd3b-4d4d-8fc8-cc1fd8945cf7","html_url":"https://github.com/dgomes/dali2mqtt","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgomes%2Fdali2mqtt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgomes%2Fdali2mqtt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgomes%2Fdali2mqtt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgomes%2Fdali2mqtt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dgomes","download_url":"https://codeload.github.com/dgomes/dali2mqtt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253135452,"owners_count":21859646,"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":["dali-bus","hacktoberfest","mqtt-bridge","python3"],"created_at":"2024-08-01T15:04:43.863Z","updated_at":"2025-05-08T19:36:51.257Z","avatar_url":"https://github.com/dgomes.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"![pytest workflow](https://github.com/dgomes/dali2mqtt/actions/workflows/pytest.yml/badge.svg)\n\n# dali2mqtt\nDALI \u003c-\u003e MQTT bridge\n\n## About\n\nThis daemon is inspired in [zigbee2mqtt](https://github.com/Koenkk/zigbee2mqtt) and provides the means to integrate a DALI light controller into your Home Assistant setup.\n\nPreviously I developed a Home Assistant custom component (https://github.com/dgomes/home-assistant-custom-components/tree/master/light) but I've since decided to run Home Assistant in another device, away from the physical DALI Bus.\n\n## Supported Devices\n\nThis daemon relies in [python-dali](https://github.com/sde1000/python-dali) so all devices supported by this library should also be supported by dali2mqtt.\n\n## How to use\n\n#### Install Operating System Dependencies\n\n### Python3 library\nThis package depends on https://github.com/trezor/cython-hidapi\n\n### Create a Virtual Environment (recommended) and install the requirements\n```bash\npython3 -m venv venv\nsource venv/bin/activate\npip install -r requirements.txt\n```\n\n### Create a configuration file\nYou can create a configuration file when you call the daemon the first time\n\n```bash\nvenv/bin/python3 -m dali2mqtt.dali2mqtt\n```\n\nThen just edit the file accordingly. You can also create the file with the right values, by using the arguments of dali_mqtt_daemon.py:\n\n```\n  --config CONFIG       configuration file\n  --mqtt-server MQTT_SERVER\n                        MQTT server\n  --mqtt-port MQTT_PORT\n                        MQTT port\n  --mqtt-username MQTT_USERNAME\n                        MQTT user name\n  --mqtt-password MQTT_PASSWORD\n                        MQTT password\n  --mqtt-base-topic MQTT_BASE_TOPIC\n                        MQTT base topic\n  --dali-driver {hasseb,tridonic,dali_server}\n                        DALI device driver\n  --dali-lamps DALI_LAMPS\n                        Number of lamps to scan\n  --ha-discover-prefix HA_DISCOVER_PREFIX\n                        HA discover mqtt prefix\n  --log-level {critical,error,warning,info,debug}  \n                        Log level  \n  --log-color Coloring output\n```\n\n### Devices friendly names\nDefault all lamps will be displayed in Home Assistant by short address, numbers from 0 to 63\nYou can give lamps special names to help you identify lamps by name. On the first execution, `devices.yaml` file will be create with all lamps available.\nExample `devices.yaml`:\n```yaml\n0: \n  \"friendly_name\": \"Lamp in kitchen\"\n8:\n  \"friendly_name\": \"Lamp in bathroom\"\n```\nPlease note that MQTT topics support a minimum set of characters, therefore friendly names are converted to slug strings, so a lamp with address 0 (as an example) in MQTT will be named \"lamp-in-kitchen\"\n\n### Setup systemd\nedit dali2mqtt.service and change the path of python3 to the path of your venv, after:\n\n```bash\nsudo cp dali2mqtt.service /etc/systemd/system/\nsudo systemctl daemon-reload\nsudo systemctl enable dali2mqtt.service \n```\n\n### Give your user permissions to access the USB device\n```bash\nsudo adduser homeassistant plugdev \ncp 50-hasseb.rules /etc/udev/rules.d/\n```\nYou might need to reboot your device after the last change.\n\nIn this example the user is **homeassistant**\n\n### Check everything is OK\n```bash\nsudo systemctl start dali2mqtt.service \nsudo systemctl status dali2mqtt.service \n```\n\n### Command line arguments and configuration file\n\nWhen the daemon first runs, it creates a default `config.yaml` file.\nYou can edit the file to customize your setup.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgomes%2Fdali2mqtt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdgomes%2Fdali2mqtt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgomes%2Fdali2mqtt/lists"}