The normal hardware watchdog will only restart a Pi if the kernel or CPU has hung. The software watchdog daemon might be usable; you'd need to read up on it.
Systemd can restart a failed processes. I don't believe it can restart a hung one as it has no way of knowing.
You probably need to modify your code to support some sort of external watchdog for example by periodically updating the timestamp on a known file then having another process check it and restart your main one if the update has been missed for a while.
You should also check whether you need those relays/switches in series or parallel.
Systemd can restart a failed processes. I don't believe it can restart a hung one as it has no way of knowing.
You probably need to modify your code to support some sort of external watchdog for example by periodically updating the timestamp on a known file then having another process check it and restart your main one if the update has been missed for a while.
You should also check whether you need those relays/switches in series or parallel.
Statistics: Posted by thagrol — Fri Apr 05, 2024 8:16 am