Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
kbacia7 committed Oct 27, 2020
1 parent 0d38682 commit c9a9da5
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

# dali2mqtt
DALI <-> MQTT bridge
DALI <-> MQTT bridge

## About

Expand All @@ -20,10 +21,10 @@ pip install -r requirements.txt
You can create a configuration file when you call the daemon the first time

```bash
venv/bin/python3 ./dali-mqtt-daemon.py
venv/bin/python3 ./dali_mqtt_daemon.py
```

Then just edit the file accordingly. You can also create the file with the right values, by using the arguments of dali-mqtt-daemon.py:
Then just edit the file accordingly. You can also create the file with the right values, by using the arguments of dali_mqtt_daemon.py:

```
--config CONFIG configuration file
Expand All @@ -39,7 +40,22 @@ Then just edit the file accordingly. You can also create the file with the right
Number of lamps to scan
--ha-discover-prefix HA_DISCOVER_PREFIX
HA discover mqtt prefix
--log-level {critical,error,warning,info,debug}
Log level
--log-color Coloring output
```

### Devices friendly names
Default all lamps will be displayed in Home Assistant by short address, numbers from 0 to 63
You can give lamps special names to identify lamps by name. After first run of script, `devices.yaml` with all lamps will created.
Example of filled `devices.yaml`:
```yaml
0:
"friendly_name": "Lamp in kitchen"
8:
"friendly_name": "Lamp in bathroom"
```
If you want use lamps by post messages on MQTT, remember that friendly names are converted to slug strings, so lamp with address 0 (from example) in MQTT will be named "lamp-in-kitchen"
### Setup systemd
edit dali2mqtt.service and change the path of python3 to the path of your venv, after:
Expand Down Expand Up @@ -67,5 +83,5 @@ sudo systemctl status dali2mqtt.service

### Command line arguments and configuration file

When the daemon first runs, it creates a default `config.ini` file.
You can edit the file to customize your setup.
When the daemon first runs, it creates a default `config.yaml` file.
You can edit the file to customize your setup.

0 comments on commit c9a9da5

Please sign in to comment.