Hi,
It’s not that difficult.
Please note that I only installed pimatic last night and that I only registered to this forum last night, so I can’t give a full-fledged solution. I just know a little about linux/debian and networks.
Install required software
Install arp-scan: sudo apt-get install arp-scan
Finding the mac address:
arp-scan can find the active devices on your network by mac address and ip-address. If your MAC address is something like AA:BB:CC:DD:EE:FF, you can give the following command:
sudo arp-scan --localnet | grep -i AA:BB:CC:DD:EE:FF
If your device is “online” you will get something like: 192.168.1.100 aacc:dd:ee:ff
finetuning this with:
sudo arp-scan --localnet | grep -i aa:bb:cc:dd:ee:ff | awk {'print $1'}
would give 192.168.144.1.100
or with:
sudo arp-scan --localnet | grep -i aa:bb:cc:dd:ee:ff | awk {'print $2'}
would give aacc:dd:ee:ff
Using a ShellSensor device with variables and rules you should always be able to detect whether the phone is “in house” or not (unless it is in deep sleep with WiFi off)
Edit: First posts did not contain block quotes. First had to find the synstax