From 717ab31d1ac07cd6a758aa2431cbdd62e58d5a1c Mon Sep 17 00:00:00 2001 From: Fabian Peter Hammerle Date: Sun, 25 Jul 2021 06:40:44 +0200 Subject: [PATCH] readme: move mqtt auth section --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 10616d8..fb274c3 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,17 @@ and provide its path via the `--device-password-file` option: $ switchbot-mqtt --device-password-file /some/where/switchbot-passwords.json … ``` +### MQTT Authentication + +```sh +switchbot-mqtt --mqtt-username me --mqtt-password secret … +# or +switchbot-mqtt --mqtt-username me --mqtt-password-file /var/lib/secrets/mqtt/password … +``` + +⚠️ `--mqtt-password` leaks the password to other users on the same machine, +if `/proc` is mounted with `hidepid=0` (default). + ## Home Assistant 🏡 ### Rationale @@ -140,17 +151,6 @@ services: restart: unless-stopped ``` -## MQTT Authentication - -```sh -switchbot-mqtt --mqtt-username me --mqtt-password secret … -# or -switchbot-mqtt --mqtt-username me --mqtt-password-file /var/lib/secrets/mqtt/password … -``` - -⚠️ `--mqtt-password` leaks the password to other users on the same machine, -if `/proc` is mounted with `hidepid=0` (default). - ## Alternatives * https://github.com/binsentsu/switchbot-ctrl