Use a config.ini file

This commit is contained in:
Meatballs
2024-03-19 12:20:25 +00:00
parent bbd5c468c1
commit 69e12df430
4 changed files with 28 additions and 8 deletions

View File

@@ -41,7 +41,7 @@ Installing `sslpsk` needs some extra steps:
![laptop in a clothes washer with a display DoorState:Closed](images/doorclose.jpg)
```bash
hc-login $USERNAME $PASSWORD > config.json
hc-login $USERNAME $PASSWORD > devices.json
```
The `hc-login` script perfoms the OAuth process to login to your
@@ -58,8 +58,24 @@ your mDNS or DNS server resolves the names correctly.
## Home Connect to MQTT
Use the following config/config.ini example:
```
devices_file = "/config/devices.json"
mqtt_host = "localhost"
mqtt_username = "mqtt"
mqtt_password = "password"
mqtt_port = 1883
mqtt_prefix = "homeconnect/"
mqtt_ssl = False
mqtt_cafile = None
mqtt_certfile = None
mqtt_keyfile = None
mqtt_clientname="hcpy"
```
```bash
hc2mqtt config.json
hc2mqtt --config config/config.ini
```
This tool will establish websockets to the local devices and