home-assistant: Add restart MQTTMarionette script
There's obviously a bug or something in `mqttmarionette` because it occasionally gets "stuck" in a state where it is running but does not reconnect to the MQTT broker. In such situations, it has to be restarted (and even then it doesn't shut down correctly but has to be killed with SIGKILL, usually). I have been doing this manually, but with this shell script and a corresponding "shell command" integration in Home Assistant, it can be done automatically. This is similar to how Home Assistant restarts Mopidy on the living room stereo when it gets into the same kind of state.pull/9/head
parent
7dffb5195a
commit
94b7168b1e
|
@ -1 +1,2 @@
|
||||||
mosquitto.passwd
|
mosquitto.passwd
|
||||||
|
secrets.yaml.in
|
||||||
|
|
|
@ -28,7 +28,9 @@ configMapGenerator:
|
||||||
- event-snapshot.sh
|
- event-snapshot.sh
|
||||||
- groups.yaml
|
- groups.yaml
|
||||||
- restart-diddy-mopidy.sh
|
- restart-diddy-mopidy.sh
|
||||||
|
- restart-kitchen-mqttmarionette.sh
|
||||||
- shell-command.yaml
|
- shell-command.yaml
|
||||||
|
- ssh_known_hosts
|
||||||
- rest-command.yaml
|
- rest-command.yaml
|
||||||
options:
|
options:
|
||||||
disableNameSuffixHash: true
|
disableNameSuffixHash: true
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
ssh -i /run/secrets/home-assistant/sshkey.pem -oUserKnownHostsFile=/run/config/ssh_known_hosts -oBatchMode=yes kitchen@kitchen.pyrocufflink.red restart-mqttmarionette
|
|
@ -3,3 +3,6 @@ event_snapshot: >-
|
||||||
|
|
||||||
restart_diddy_mopidy: >-
|
restart_diddy_mopidy: >-
|
||||||
sh /run/config/restart-diddy-mopidy.sh
|
sh /run/config/restart-diddy-mopidy.sh
|
||||||
|
|
||||||
|
restart_kitchen_mqttmarionette: >-
|
||||||
|
sh /run/config/restart-kitchen-mqttmarionette.sh
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
diddy.pyrocufflink.red ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILx6gRqlVnvdqTIJTH16NBLJ4ORfTsBaUIEpt5ZMkkNW
|
||||||
|
kitchen.pyrocufflink.red ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBLzMLOlFXPiovBwYLmXCVV8Md/xR36zwPj6egT9V3O7
|
Loading…
Reference in New Issue