I know this is an old thread but I've been trying to implement your home presence logic in openhab 2 using the exec binding and a bash script. I have it working for the most part except for the hping3 part.
For testing the hping3 command, I do the following:
To monitor my iphone connectivity, I use the ping output. Then I run the hping3 command as per your instructions:
hping3 -2 -c 10 -p 5353 -i u1 xxx.xxx.xxx.xxx
I get the following output:
HPING xxx.xxx.xxx.xxx (en0 xxx.xxx.xxx.xxx): udp mode set, 28 headers + 0 data bytes
--- xxx.xxx.xxx.xxx hping statistic ---
10 packets tramitted, 0 packets received, 100% packet loss
round-trip min/avg/max = 0.0/0.0/0.0 ms
And ping output shows no connection with the iphone after the command is run.
The hping3 output also looks like 0 packets were received ... so did it fail?
What am I doing wrong?