Stop before the wiring part. A Sonoff Basic switches mains live through to its output. Thermostat terminals on most gas heaters are a low voltage call-for-heat loop. Putting the Basic’s output across them puts 230 V on the boiler’s control board. What voltage is on those two wires?

