I’ve had a search and not found an answer yet.
I have the latest stable release of Openhabian running on my Pi 2.
I installed the network binding and added a thing to monitor my main PC, I have a rule that turns the lights in my study on and off with my PC. This worked great. I am now trying to monitor my phone so I can use it as an extra Presence sensor. Unfortunately this kept dropping the connection whilst locked, I made sure the setting were correct on the Android system to keep WiFi connected but it made no difference.
I Installed Arping using : -
sudo apt-get install arping
If I run this command I get a response
arping -c 1 -I eth0 192.168.2.10
This is my network.cfg file.
binding.network:allowSystemPings=true
binding.network:allowDHCPlisten=false
binding.network:arpPingToolPath=arping
binding,network:cacheDeviceStateTimeInMS=2000
uses_arp_pings=yes
This is my Things file entries.
//Main PC
network:pingdevice:zeus "Zeus" [ hostname="192.168.2.2", retry=1, uses_arp_pings=0, timeout=5000, refreshInterval=30000 ]
//Phones
network:pingdevice:fphone "Fraser Phone" [ hostname="192.168.2.10", uses_dhcp_listen=1, uses_arp_pings=1, retry=10, timeout=5000, refreshInterval=60000 ]
network:pingdevice:vphone "Vickki Phone" [ hostname="192.168.2.11", retry=1, timeout=5000, refreshInterval=60000 ]
In Paper UI the Phone properties are shown as.
|arp_state|Disabled|
|---|---|
|dhcp_state|off|
|icmp_state|IPUTILS_LINUX_PING|
|presence_detection_type||
|uses_ios_wakeup|Yes|
So I tested it last night and my phone was picked up as always connected but now so is my main PC.
What I want is my main PC to be sent standard Pings so that OpenHAB can see when the PC goes to sleep and my phone to be sent Arpings so that OpenHAB can see that it is still there even when locked.
Am I missing something in my config to get this working that way?
Thanks.