Ping???

Easy to use, 100% Lua-based event scripting framework.
Post Reply
welby
Posts: 31
Joined: Monday 20 November 2017 4:24
Target OS: Raspberry Pi
Domoticz version:
Location: Australia
Contact:

Ping???

Post by welby » Tuesday 30 January 2018 13:48

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: 938
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: Ping???

Post by emme » Tuesday 30 January 2018 16:17

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: 31
Joined: Monday 20 November 2017 4:24
Target OS: Raspberry Pi
Domoticz version:
Location: Australia
Contact:

Re: Ping???

Post by welby » Wednesday 31 January 2018 7:05

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: 938
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: Ping???

Post by emme » Wednesday 31 January 2018 9:01

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: 31
Joined: Monday 20 November 2017 4:24
Target OS: Raspberry Pi
Domoticz version:
Location: Australia
Contact:

Re: Ping???

Post by welby » Wednesday 31 January 2018 11:30

Didn't even think of that :oops: Seems to be working pretty good, thanks emme 8-) 8-)

User avatar
elythomaslumber
Posts: 305
Joined: Friday 12 July 2013 13:29
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Solingen; Germany
Contact:

Re: Ping???

Post by elythomaslumber » Wednesday 31 January 2018 13:44

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.
Raspberry Pi & Domoticz 3.8153
RFXCOM FW1022
Wall panel APPLE iPAD 3.generation
Fritz!Box 7590 & Eurotronic COMET DECT Thermostat
https://www.qrz.com/db/DK5LH

User avatar
DeBaat
Posts: 34
Joined: Saturday 27 January 2018 15:52
Target OS: NAS (Synology & others)
Domoticz version: V3.8153
Contact:

Re: Ping???

Post by DeBaat » Sunday 04 March 2018 17:00

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 3 guests