eriksl wrote:... which is probably AC as well.
The "overengineered" solution would be to use an optocoupler. Then no matter what voltage would appear, the ESP would survice (but the optocoupler not).
The simple solution would be to use either a voltage divider or a zener diode. The last one would have my preference because it would guarantee voltage remains below 3.3 V.
The GPIO's as input have a real high impedance, something like 1 MOhm or more. So what you should do is to first apply a resistor (as seen from the 8 Volt source), it can be something like 10 kOhm, so you'll have little current running when the voltage is above 3.3 V. Then apply a zener diode connect to negative/mass/earth and then connect to the GPIO. If in your board there is a voltage shifter for the GPIO's (3.3 V -> 5 V), use a 5 V zener instead. Almost all GPIOs output some garbage during boot, if the zener voltage would be too low, either the zener of the GPIO could blow.
Very helpful, thanks @eriksl
This is my current circuit diagram.
* can the step downs and step up converters work fine in this circuit or is it best to add some kind of smoothers/regulators? (I'm not familiar with the lingo and what options are available).
* what component(s) - highlighted as the blue boxes with "?" - would permit the GPIOs to accurately detect when current flowed through to the indicator flags and the bell?