Yet more software that may be useful (and not seen mentioned explicitly on the forum yet): watchdog.
It’s in the standard repos and lets you do stuff like reboot if the wlan stops working (ping test). I have an outdoor RPi that has been dropping off WiFi recently, not an emonpi, but it may happen to others
Read about it originally here: Watchdog: reboot Raspberry Pi if network is down | defgw
pi@emonpi(ro):~$ sudo apt-cache search watchdog
…
watchdog - system health checker and software/hardware watchdog handler
Simple and flexible config file, not just for network failure.
Peter