Easy

That was easy one - just combining what I learned from the MCW (MCW - Most Complicated Watch . A little ESP8266 doing the WIFI to a Raspberry running OpenHab to controll the my Hue-Lights.

Why is it so cool?

Because it controls 2 switches, and the ESP only has one reset-line for wake up. So, think - how can use a  "binary" signal (as the reset) to inform the ESP about 2 switches = 4 situations. Doesn't work.

Again the PIC-8 was my friend, its checking the status of the switch and wakes up the ESP8266 when something changes. That's possible, because the PIC8 can have for each input an interrupt enabled, on "state change". This gives a lot of options, e.g. we could even check for more input/output.

With this constellation the ESP8266 is always in deep sleep, so the batteries last pretty long (4-6 month, as far as I remember).

Ah..yes. the ESP stores the latest WIFI information (channel) in the RTC memory and therefore connects really quick to the WIFI, pretty fast.

WARNING: The source-code for the ESP is ugly, just to get it running. Maybe some Tasmoa like configuration to set-up would be a nice exercise.

Ey, and I am still happy, when I press the switch. Because its in daily use 🙂

SourceCode:

MyCode@Github DoubleSmart - ESP8266

MyCode@Github DoubleSmart - PIC8