Heed this FWIIW: WiFi & ElectroMagnetic Fields - Live & Learn

Well, I think it is called ElectroMagnetic Fields. I'm a) no 'lectrician and b) no boffin

My story, if you're still with me...

I have 2 Sonoff WiFi switches
For many years they have controlled my outside Christmas trees lights and Christmas string lights on the house eaves. For waterproofing them and the plugs, they were all fitted inside an old plastic ice cream tub and hidden underneath the stairs. Very little chance of moisture but why tempt fate! In the past they were always next to each other, but in a loose fashion.

Last year October I fitted them in a new plastic ice cream box (the old one having become brittle), much smaller that the tub; same location under the stairs. Except this past Christmas, I could 99% control the trees, and only 1% the string... WTF. I was stumped.

What threw me off was that occasionally the strings and the trees would come on, and even less so the strings only at times.

Last week I decided to run a continuous PING on my PC, pinging all my wi-fi devices - all of them always responded within a few ms - at least any time I was looking at it. But what is that expression about "sleeping on it"!?!?

This past Saturday it dawned on me - I literally had an epiphany: whichever one happens to switch on first stops the other one from switching on as well. I confirmed this via my ping commands... 192.186.0.95, 0.96, 0.97, ON, 0.95, 0.97. GOTCHA! 0.96 is missing! And it doesn't appear again until (in this case) 0.95 is switched off again late at night.

I guess the trees switch was a fraction faster than the strings switch, most of the time!

Needless to say I took them out of the plastic box, and separated them by about 1". BOTH have been rock solid since then!

Based on my interpretation of the events, behavior and fix, they were literally way too close to each other. The moment the first one switched on, an electro-magnetic field was generated that was just strong enough to interfere with the wi-fi reception of the 2nd switch.

Who knew? (other than Bo)

Were these changes made without unplugging/plugging back in either of the modules? Any chance you had the neutral/line flipped? Were you using polarized plugs?

This is kind of a guess but, could the first to go ON be responding back to the hub and being so close to the 2nd it simply overpowers it?

If you ever get to move them close again, it would be interesting if one was delayed by a second or two.