One problem I had to tackle was how to get the module back into configuration mode, after having it set up once, and needing to re-configure it.
My solution to that was to use the two relay status sensing pins from the relay to the ESP8266. When the module is powered up, the first thing it will do, is to set the contact set in the relay to the open position. If the pin sensing the relay to be closed is pulled down, it will go into configuration mode. In configuration mode, it will act as a access point, and host a little web server where everything can be set up from.
My first idea was to use the two rotary switches on the back, but it turned out the quality on those were so bad, they only just worked in the original setup, and after turning one the “wrong way” (there are no right or wrong way specified), it destroyed a part of the pcb, because the tip of it was sharp, instead of round. So instead of having the pcb breaking, or being worn out by a too sharp tip, I just went with a switch.
The button will be facing down in the housing, on the same side as the ESP8266, and hopefully the switch will stay in place. Normally I am doing everything I can to use smd components with through-hole mounting pins, when they are used for something connecting to the outside of the project box. But in this case, I could not find something small enough, with those pins, so my first attempt will be to just use one purely smd with the recommended footprint.