Snips-hotword service auto restart?

Hi,

I decided to install snips-hotword on my sattellites and everything was ok, but after restarting my router all satellites stoped working. From the log:

May  3 02:09:45 bedroom snips-hotword[5096]: ERROR:rumqtt::client              : snips-hotword|5096-bedroom-1 Disconnected: (Error(InvalidState, State { next_error: None, backtrace: None }))
May  3 02:10:30 bedroom snips-audio-server[5932]: ERROR:rumqtt::client             : snips-audio-server|5932-bedroom-1 Disconnected: (Error(Io(Os { code: 104, kind: ConnectionReset, message: "Connection reset by peer" }), State { next_er
ror: None, backtrace: None }))
May  3 02:10:55 bedroom snips-audio-server[5932]: ERROR:rumqtt::client             : snips-audio-server|5932-bedroom-1 Disconnected: (Error(InvalidState, State { next_error: None, backtrace: None }))
May  3 02:10:55 bedroom snips-audio-server[5932]: ERROR:snips_audio_server         : failed to send mqtt command to client thread
May  3 02:10:55 bedroom systemd[1]: snips-audio-server.service: Main process exited, code=exited, status=1/FAILURE
May  3 02:10:55 bedroom systemd[1]: snips-audio-server.service: Unit entered failed state.
May  3 02:10:55 bedroom systemd[1]: snips-audio-server.service: Failed with result 'exit-code'.

snips-audio-server was restarted, because whole service was stopped, but snips-hotword just disconnected from mqtt broker and was doing nothing.

I had to restart snips-hotword services on each satellite manually. I created a workaround by running script by cron each minute:

string="$(journalctl -u snips-hotword -r -n 1)"
#echo $string
if [[ $string == *"ERROR:rumqtt::client"* ]]; then
  echo "Restarting Snips"
  sudo systemctl restart 'snips-*'
fi

but maybe there a better way to do this? Or maybe snips-hotword should try to connect over and over again in that scenario?

I have a similar issue and I just have a cron job that executes: sudo systemctl restart ‘snips-*’ without the excess script. Even in Snips is connected, restarting it is fine. I have not seen anyone really address this issue. Most people just assume the configuration is wrong and blame us. I have started with the configuration on the Snips site and have tried several tweaks, one at a time, and still have the same issue. It is amazing how misconfigured Snips can be and still work, but with this same issue.

Also their was a bug fixed in release 1.2.1 (0.63.2).

The services were not restarting automatically if the connection to MQTT broker was lost.