script for presence detection of a phone

All kinds of 'OS' scripts
krizzz
Posts: 170
Joined: Wednesday 20 November 2013 21:36
Target OS: Linux
Domoticz version:
Location: The Netherlands
Contact:

Re: script for presence detection of a phone

Post by krizzz » Saturday 10 June 2017 22:14

thijsdebets wrote:I created a script to detect all devices on the network.
Installation instructions are here: https://github.com/thijsdebets/networkdetectz/wiki

It uses a combination of arpscan, ping and even supports bluetooth detection.
I use it very succesfull to detect who is at home and to set the lights to TV-Mode when the tv switches on, etc.

It requires one arp-scan every minute via cron making it low on resources.
I tried and follow the wiki and I get stuck already at

Code: Select all

register the IDX in nwd-config
When doing the git install, is the nod-onfig file already present somewhere? I think not, so do I have to create the file as new? What is included? If I look at

Code: Select all

HardwareIDX=999
Create a Hardware switch for NewDevicedFound and add the IDX in nwd-config
NewDevicesFoundIDX=999
Create a Hardware switch for Running indicator, to see if the script is up. Set this indicator on 'Off-delay' 10 minutes
NWDScriptRunning=999

Set other configuration items in nwd-config:
DomoPIN='1234'
RetryAttempts=1 # 3 = retry 4 times (5 minutes), 1 = retry 2 = 3 minutes
I do not know what should be in or out... Could you help me out?

User avatar
EdwinK
Posts: 922
Joined: Sunday 22 January 2017 22:46
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Rhoon
Contact:

Re: script for presence detection of a phone

Post by EdwinK » Sunday 11 June 2017 10:52

thijsdebets wrote:I created a script to detect all devices on the network.
Installation instructions are here: https://github.com/thijsdebets/networkdetectz/wiki

It uses a combination of arpscan, ping and even supports bluetooth detection.
I use it very succesfull to detect who is at home and to set the lights to TV-Mode when the tv switches on, etc.

It requires one arp-scan every minute via cron making it low on resources.

Looks neat. But since it requires Domoticz to be running on a Pi, I'm not able to run it on a Synology NAS.
Running latest BETA on a Pi-3 | Toon Thermostat | RFxcom | Dashticz V2 |

glsf91
Posts: 5
Joined: Tuesday 14 November 2017 22:56
Target OS: Linux
Domoticz version:
Contact:

Re: script for presence detection of a phone

Post by glsf91 » Tuesday 14 November 2017 23:10

Instead of a ip-address you can also use the dns/dhcp name of the device.
At my router my phone is registered with always the same name.

You can get the name with doing nslookup <ip-address>. It tells you the name. This can be used as argument for the script instead of the ip-address.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest