Here are some possible points of failure I could think of:
- Power failure on the module
- Communication failure on the module or the home WiFi network
- Relay failure on the module
Let’s see a few possible solutions against these that can be implemented (same numbering for reference):
(Needless to say, someone with good knowledge on electrical loads and wiring needs to be consulted beforehand)
- Failure means that the module will be dead, so the relay will stay OFF. A notification can be sent to your phone if after X minutes heating hasn’t risen Y degrees. X and Y can be defined in the settings. An additional failsafe relay can be added in parallel to the first if underheating is critical
- Same as 1. but failure may occur once the relay is ON so it will stay ON. Another notification can be sent to your phone if after X minutes heating rose another Y degrees. X and Y can also be defined in the settings. An additional wired failsafe relay can be added in series to the first to cut power completely. Obviously a good healthy (potentially isolated) wireless network is something that needs to be taken into consideration.
- Although the relays used by Sonoff are industry standard, surely they can fail (if you are really unlucky) at the same rate as some consumer thermostats. To half the chance of failing stuck ON you can use a set of 2 relay modules, one for L and one for N lines that listen to the same signal. Similar to 2 an additional (wired or not) failsafe relay can be added in series to the first to cut power completely. Lastly if high loads increase the chance of a relay getting stuck, you can “outsource” this to an (expensive) solid state relay (SSR) that is paired to a standard module like Sonoff for the signal. SSR are exclusively used in HestiaPi for some time now as they have a much higher MTBF. To push things even further you can “design” your own module with an overengineered PSU, SSR and WiFi module and take control back
As a last resort you can add a “manual” bimetallic thermostat on the heater if all your measures fail.
I don’t think you can ever eliminate the ‘chance’ of any type of failure but you can simply plan ahead and work around these beforehand.