Ping???

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
welby
Posts: 36
Joined: Monday 20 November 2017 3:24
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Australia
Contact:

Ping???

Post by welby »

Not sure if it's possible but i'd like to ping my phone to see if i'm home or away. Is it possible with dzvents?
User avatar
emme
Posts: 909
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: Ping???

Post by emme »

not really sure, but if you have a iOS device, it won't reply on ping
if you have an Android device (huawei act like this), it won't reply on standby

presence with mobiles is quite wired... ;)
The most dangerous phrase in any language is:
"We always done this way"
welby
Posts: 36
Joined: Monday 20 November 2017 3:24
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Australia
Contact:

Re: Ping???

Post by welby »

I had it working with a lua script but it was using the time method and was every minute which was a bit to often to have it happening.
User avatar
emme
Posts: 909
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: Ping???

Post by emme »

what about the System Alive Checker (PING) availble in the hardware list?
The most dangerous phrase in any language is:
"We always done this way"
welby
Posts: 36
Joined: Monday 20 November 2017 3:24
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Australia
Contact:

Re: Ping???

Post by welby »

Didn't even think of that :oops: Seems to be working pretty good, thanks emme 8-) 8-)
User avatar
elythomaslumber
Posts: 56
Joined: Friday 12 July 2013 13:29
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Location: Solingen; Germany
Contact:

Re: Ping???

Post by elythomaslumber »

Had that idea some years ago but as emme says there is a problem with iOS devices. Now since some weeks I have a FritzBox router (also available in Australia :D ( http://firstint.com.au/fritzbox-fon-wlan-7490/)). This box knows the presence of an iOS device even if it is in sleep mode. I tested with iPAD 1, iPAD 3 and iPad Air but also with Android 6.0 phone. Presence is detected 1-2 seconds after WiFi has logged in to the router. Absence needs up to 10minutes after the device is logged out.

I found a script (German): https://www.schlaue-huette.de/apis-co/f ... -fritzbox/ which can be used for login triggered by a cronjob reading out the presence of any network device. So it is used as presence detection.

Just for fun I modified it and integrated some Domoticz switch commands. The script asks for 2 devices and swiches a lamp in case of one of the two devices are present and delivers an echo message when started from CLI which device is present. So it can be used at a basic php script for presence detection. I think I will place it in the Wiki in the next days. If somene is interested I can place it here.
User avatar
DeBaat
Posts: 33
Joined: Saturday 27 January 2018 14:52
Target OS: NAS (Synology & others)
Domoticz version: V3.8153
Contact:

Re: Ping???

Post by DeBaat »

Hai.
As I also have a FritzBox, I'm surely interested in the script you mention.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest