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: https://defgw.wordpress.com/2017/10/24/watchdog-reboot-raspberry-pi-if-network-is-down/
[email protected](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.