Using a Raspberry Pi Zero(RPi), with wifi, I sometimes have problem that the WiFi connection is lost. This is due to that, at our boat, we are using the Teltonika RUT 240 router. The router just have one receiver/transmitter, LAN and WAN WiFi are shared, and in some use cases the WiFi will temporarily be disconnected. To restart the WiFi quick the following solution is used.
This post will cover a solution, a bash script, with inspiration from this blogpost, but with some fine tuning. 😉
Another way could be using the watchdog function, described here, with reboot.
I'm involved in several projects where you, as quick as possible, want to get an alert if anything fails. After a lot of Googling I found SIGNL4.
They have several ways to create an alert, can involve a team, have a nice app and is free, up to 5 users, if you use the "STARTER" option.
In this post, as an example, I will show how I detect if my AIS receiver/dispatcher stops receiving AIS targets, sent to Vesselfinder, and how an alert is forwarded to the SIGNL4 app.
I'm using NodeRed on a Raspberry Pi to realize the function