I would like to “ping” a Zigbee device every minute, to check if the device is online or not.
Of course not a battery powered device, but a smart plug for example.
The aim is to detect if there is a RF jamming on-going in the neighbourhood.
Does anyone know how to do that in Home Assistant ? Does any one have a better idea to detect RF jamming ?
I have a Sonoff Zigbee usb +ZHA
That might be possible. At least for W… devices that works - no idea if that’s true for Z… devices too.
That sounds impossible. How do you make an assumption if RF jamming is happening if you ping a device every minute?
For example I just pinged one of my (wifi) devices every second:
64 bytes from randomesphome.device (192.168.1.111): icmp_seq=1 ttl=255 time=9.51 ms
64 bytes from randomesphome.device (192.168.1.111): icmp_seq=2 ttl=255 time=7.43 ms
64 bytes from randomesphome.device (192.168.1.111): icmp_seq=3 ttl=255 time=7.37 ms
64 bytes from randomesphome.device (192.168.1.111): icmp_seq=4 ttl=255 time=6.47 ms
64 bytes from randomesphome.device (192.168.1.111): icmp_seq=5 ttl=255 time=5.18 ms
64 bytes from randomesphome.device (192.168.1.111): icmp_seq=6 ttl=255 time=6.31 ms
64 bytes from randomesphome.device (192.168.1.111): icmp_seq=7 ttl=255 time=6.95 ms
64 bytes from randomesphome.device (192.168.1.111): icmp_seq=8 ttl=255 time=6.95 ms
64 bytes from randomesphome.device (192.168.1.111): icmp_seq=9 ttl=255 time=4.08 ms
and while one can see the pings greatly vary (~ 4-9ms) it’s probably not more then assumption to blame the higher ping times to higher network congestion. And even if we assume that this is the case it’s most likely no active jamming but simply my other wireless device (or the ones from neighbors) who do their talking.
If you have fear of jamming just go wired.
The air is a shared medium and if someone is successful jamming the frequencies your devices are talking there is almost nothing you can do about/against that (besides maybe “forcing” the jammer to stop )
I do not fear a jamming, I cannot stop it, but I just would like to be informed that it is happening, and maybe there is a way to do it easily
Yes, it’s easy to ping a wifi device. But for zigbee I didn’t find so far a way to do it.
The assumption is that during a jamming, the connection with the device will be completely lost. To be absolutely sure we would need a spectrum analyser, but at least it’s a hint that it could be a jamming. The sampling rate once per minute seems sufficient for me.
During a jamming, your wifi ping will not get late, you will not get any answer anymore at all
I tried something else, with a plug: switch on, read the state, switch off - if the read state is off then there could be a jamming… obviously not a good idea since the relay will wear in a few days - but a similar approach to set a parameter and read it after, without any mechanical action, maybe ?
Yep that’s an idea. I’ve tried to do that with an Ikea smart plug. It seems to work. Now I’m trying to see if there is a cleaner way without any mechanical wear. I’ll continue to look, maybe a RF jammer analyser is existing on the market…
Essentially these devices are RF signal detectors (when they actually work) and not “jam detectors” - simply because technically there isn’t much or any difference you polluting the air with RF (with your wireless talking devices) or some one else polluting the air with RF waves so that your devices have less chance talking to each other (what often is refereed to jamming - or simply occupying air time).
Also as a practical note: It will be close to impossible to jam some ones house with legally available devices - simply because they are very limited in the power they can output. It might be easier in some regions to just totally disconnect some ones house from the main grid than successfully occupy all air time on one or more frequencies (“successful jamming” )