If you want to monitor uptime locally (meaning you’d still have to restart the pi yourself), I use Ping • Network Uptime Monitor for macOS to check servers and notify me.
I don’t see my Pi dropping network connection though, have you tried to debug why that happens?
You could add a timer to each app that (hourly/daily) calls a WebService and reports in. Your WebService could track the status of your devices, and your devices could take action if they can’t reach the WebService. I use this approach on my own devices, and have a structure where a ‘message’ can be staged at the central WebService for each node (device, app) to retrieve when it reports in. This is how I tell remote sites to ‘report in more frequently’, or ‘send me your xyz readings’, or even ‘reboot’.
I’m not sure why they are dropping off the network, my network is fast and stable and I don’t have issues with my other devices.
It’s hard to debug or troubleshoot since I don’t know when or why they go off line. I have connected a monitor and keyboard to one of them and all I can tell is that while it was still running fine, the WiFi Icon at the top looked like it was connected but I couldn’t ping out from it or to it from my computer. I’ve done some searching online and I can see I’m not the only person this happens to. So far, I’ve not found a solution to prevent it which is why I’m thinking trying to write something to check the connection and take the appropriate action to correct it, probably a reboot. The strange thing is, these things aren’t running any tasks when it happens, they are idle with no software running other than the OS.
The thing is, I have not app running when this happens, just the OS. If I don’t find a good solution, I may need to setup something to reboot them when they can’t connect.
On a DHCP server there may be an address lease duration so if that value expires then a new network (ip) address is given. Could be the cause of your network drop ?
Otherwise there could be a memory leak? or something else that causes the pi network to drop.
I wrote a simple app that runs on my Mac, nothing fancy. I hard coded the IP addresses of the 4 Pi’s which have their addresses reserved. I’ve been running it for a few days. If any of the pi’s go down, shows the name which goes red. It’s basically just shelling out to do a ping and checking the result. It seems to be working just fine.
Interestingly enough, none of the Pi’s have gone down while it’s been running except when I was testing it. I did some some stuff online that indicated others have had their pi disconnect from the network if it was sitting idle for too long. Perhaps the occasional ping from my app is enough to keep them from dropping the connection due to inactivity. That’s just a guess based on what I’ve read and am experiencing. I’ll continue to run it see how long they stay connected.
The searches I’ve done say the pi. Doesn’t have a power saving mode. I’d check that if it does and knew how. Yes they are wireless as I just play around with them and they are all within 10 feet of the router.
Well my Pi Monitoring app running on the Mac using Pings to each pi at regular intervals, caught 3 out of my 4 Pi’s offline this morning. I noticed that all 4 were showing that Updates were available. I rebooted 2 of them, and turned the WiFi off and back on for the 3rd one that was down and it reconnected no problem. I’m not sure if the available updates have anything to do with the issue, but it seems to be common when it happens. A reboot of the pi or restart of the WiFi does get things reconnected.
The next thing I’d like to do is write an app to run on each pi monitoring connectivity. If the network connection down, first try toggling the WiFi connection and then check again. If that doesn’t work, reboot the pi which always seems to work. Shouldn’t be too hard to write this app, just need to sit down and do it.