Need Help to debug a possible Hardware related issue with One of my HestiaPi's

Ok so I need some help to debug a possible issue , I believe it something to do with the mains wiring setup for my HestiaPi’s to boiler connection.
I had a previous issue with the raspberry pi’s being killed off after a few days of switching the HestiaPi’s On, however this was some time ago and seemed to be sorted by the updated PCB.

However I still notice that if I turn off the downstairs HestiaPi and then immediately turn off the upstairs HestiaPi it would send a sort of shock through the screen but this would disappear a few seconds later and no dead Pi’s , I discovered that if I waited a few minutes between switching each HestiaPi off this fault didn’t occur however 2 days ago I implemented the Auto schedule on IOThermostat image and and of course set the times on both thermostats the same to come on .
Then yesterday the HestaiPi upstairs just had a black screen and no lights on the Pi not long after turning the heating on , a quick reboot and everything seems normal. this made me think that maybe its the same fault that both HestiaPi’s turning on and off at the same time caused a fault and crashed the Pi , but no dead Pi which is always good .
I’ve since change the times so that they are 10 mins apart between both HestaiPi’s turning on , and good news it seems to be ok . Nothing shows in the log which makes me think its something to do with the way my wiring is set up .

Nov 17 04:52:30 iothermostat mosquitto[208]: 1542430350: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
Nov 17 05:52:31 iothermostat mosquitto[208]: 1542433951: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
Nov 17 06:52:32 iothermostat mosquitto[208]: 1542437552: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
Nov 17 07:00:02 iothermostat python[371]: IOThermostat: GPIO.output(23,1)
Nov 17 07:52:33 iothermostat mosquitto[208]: 1542441153: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
-- Reboot --
Nov 17 20:24:20 iothermostat systemd-timesyncd[187]: Synchronized to time server (
Nov 17 20:24:20 iothermostat systemd[1]: Started Verify integrity of password and group files.

Ok so how its wired in my house is that the boiler has power to it , a live, neutral and switch live comes from the boiler to both thermostats, the downstairs thermostat is also connected to a pump for the underfloor heating this connection is made in a junction box in the loft where the boiler is located . However both thermostats are connected to the same live neutral and switch live so that as long as one of them is on, the boiler will remain on/ heating the system. The only real difference is that the wiring is shorter on the upstairs thermostat that to the down stairs thermostat and its the upstairs one that always has had problems.

Is it possible that the long wiring to the downstairs thermostat holds some capacitance and if the upstairs thermostat is turned off at the same time or just slightly after it balances back through the upstairs HestiaPi?
I’m only guessing here I just cant work out why its only this one that has the problem and its a completely new thermostat from the one that died originally .

sorry for my very crude drawing .

any thoughts ?

The wiring to the heating system is electrically isolated to HestiaPi’s electronics via the relays.
Is there a chance your power line drops low instantaneously?
Where is the power to the HestiaPi coming from?
Otherwise avoid keeping electrical wires too close to the board and straighten loops that may have formed that can cause an electromagnetic pulse.

Power for the HestiaPi’s comes from the boiler as as they are both on the same live, neutral supply from the boiler it is possible the power could drop low . In my mind this is what I thought , that the relays isolate the power return back through, but I thought I would check I’m only a beginner when it come to electronics.
The wires that protrude though to the front are really neat not alot that I could straighten .

this is the connection to my boiler where it says ST10

This is my connections

I think this is a very instantaneous event but could you try connecting a multimeter on the mains line on the HestiaPi’s terminal block (L and N) while the LCD is plugged in and reproduce the issue while monitoring AC voltage? You would have to add some extension wires I guess…

I’ll try my best to try and reproduce the event it seems to happen randomly but more often than not if I turn them off with very little time between

Ok so I haven’t managed trigger the event manually by turning the thermostat on and off together and then achieving a reading on the multimeter however it has happened by itself about 3 time these last couple of months.
I think your right about it being a dip in voltage when the downstairs thermostat clicks on or off at precisely the same time as the upstairs on does .
I had an electrician friend around for the holidays and he believes that because the downstairs HestiaPi turns the boiler, a motorised zone valve and a pump on for the underfloor heating it could cause a dip on the mains that could crash the pi upstairs which only turns on the boiler and another motorised valve .
This would explain why it is always the upstairs HestiaPi that crashes . However he didn’t know what to suggest that could solve the issue .

Have you any idea of a solution to prevent the pi crashing when the mains voltage dips ?

You could try find a better 5V power supply, one more resillient to mains dips.

Also, I’ve been thinking of running a Pi from a 5V powerbank, one that can charge while providing power. This could work as well for you. Not sure how much a powerbank will like being charged all the time though… on the other hand you don’t need hours of power, just a few seconds.

That is the only solution as very rarely power supplies are rated for “undervoltage protection”.

I thought as much! anyway thanks for all the advice I’ll keep this thread updated should I discover a solution