Raspberry Pi gets rebooted by an isolated circuit that has a relay (nodemcu)
I had a similar situation. An intercom would operate a solenoid strike normally. But a pulse or a glitch from the electric strike would reset the postal timer circuit back to the top of the hour. I added a clamp diode onto the solenoid coil.