From c11b4f064c5785a3225ae5d21eb0514667a0a46a Mon Sep 17 00:00:00 2001 From: "M.J. Wydra" Date: Wed, 18 Aug 2021 01:00:44 -0500 Subject: [PATCH] Add note about MQTT client --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 15942a6..3e86216 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ services: - MQTT_PORT=1883 - MQTT_USER=user - MQTT_PASSWORD=password + - MQTT_CLIENT=serverbatt - MQTT_TOPIC=server - MQTT_QOS=1 - INTERVAL=60 @@ -51,6 +52,7 @@ services: | `MQTT_PORT` | `1883` | The port the MQTT broker is bound to. | | `MQTT_USER` | `None` | The user to send to the MQTT broker. | | `MQTT_PASSWORD` | `None` | The password to send to the MQTT broker. | +| `MQTT_CLIENT` | `battery2mqtt` | The client name for the MQTT connection. IMPORTANT: SEE BELOW | | `MQTT_TOPIC` | `server` | The topic prefix to send the payload to. | | `MQTT_QOS` | `1` | The MQTT QoS level. | | `INTERVAL` | `60` | How often (in seconds) battery2mqtt polls for battery info. | @@ -61,6 +63,9 @@ services: | `AC_ADAPTER` | `0` | Enable/disable AC adapter status. Set to 1 to enable. | | `LOG_LEVEL` | `info` | Set minimum log level. Valid options are `debug`, `info`, `warning`, and `error`. | +# MQTT client +If you plan on using `battery2mqtt` on more than one machine, it is very important that you use a **different client name for each instance**; otherwise you _will_ experience issues with LWT. + # Monitored conditions You can specify only those conditions that you'd like to track. The default is to track `status, capacity, energy_now, energy_full, energy_full_design, power_now, voltage_now`. You can add more conditions (found at `/sys/class/power_supply/$NAME`) or choose only those you want to track. The variable in your `docker-compose.yaml` must follow this comma-separated format: