Hi
I am new to scripting but with some copy-pasting and a lot of trial and error I managed to get some things working already.
Today I tried to get the presence detection script working which I found on the wiki. But I get an error with the arping method:
10:39:19- script started.
10:39:19- according to domoticz, 192.168.0.99 is offline
arping: invalid option -- 'W'
10:39:20- 192.168.0.99 offline, waiting for it to come back
arping: invalid option -- 'W'
arping: invalid option -- 'W'
If I use the normal ping method I can get the script to work, but when my phone goes in standby the switch turns off.
I used the ''arp -an" command and in this list my phone gets detected.
Can someone point me in the right direction to solve this problem?
Thanks
presence detection help
Moderator: leecollings
-
- Posts: 536
- Joined: Friday 23 December 2016 16:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Netherlands Purmerend
- Contact:
Re: presence detection help
Nood,
ARP is not the best alternative. As an ARP table can life for several hours...
Ping is a much better and almost realtime solution. ( script loopt time only)
If this does not work because your phone goes into standby, then have a look in a a GEO solution.
==============================
How long does it take for ARP to expire?
For example, when the ARP timeout is 4 hours or 240 minutes (Cisco default value), the router sends an ARP request when reaching 239 minutes (1 minute before the expiration time).Feb 13, 2012
================================
ARP is not the best alternative. As an ARP table can life for several hours...
Ping is a much better and almost realtime solution. ( script loopt time only)
If this does not work because your phone goes into standby, then have a look in a a GEO solution.
==============================
How long does it take for ARP to expire?
For example, when the ARP timeout is 4 hours or 240 minutes (Cisco default value), the router sends an ARP request when reaching 239 minutes (1 minute before the expiration time).Feb 13, 2012
================================
-
- Posts: 22
- Joined: Sunday 26 July 2015 13:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: presence detection help
I got the arping method to work, I changed the "-W 1" to "-w 1000000"
Even though this method works better, it isn't reliable. It loses its connection frequently and turns the switch off and on.
I think I will have to look into another method.
Thanks for the help
Even though this method works better, it isn't reliable. It loses its connection frequently and turns the switch off and on.
I think I will have to look into another method.
Thanks for the help
Who is online
Users browsing this forum: Google [Bot] and 1 guest