It seems that RF interference is caused by the Sonoff relay, which causes UDP packets dopped over Wifi. I thought I report my finding, in case anybody runs into it.
I used 2 Sonoff BASIC R2 relays, with an external switch on GPIO-14 each. Operating the switch on either unit shall flip the relay on both.
I enabled Global Sync / P2P on both, and assigned unit number 1 and 2.
First the non-working code, the sendto command never worked. It seems the UDP send gets disturbed by the local relay operating on GPIO-12.
Code: Select all
on switch#state do
if [relay#state]=1
gpio,12,0 // turn off local relay
sendto,1,gpio,12,0 // turn off remote relay
else
gpio,12,1 // turn on local relay
sendto,1,gpio,12,1 // turn on remote relay
endif
endon
Code: Select all
on switch#state do
if [relay#state]=1
sendto,1,gpio,12,0
gpio,12,0
else
sendto,1,gpio,12,1
gpio,12,1
endif
endon