This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

iPhone presence detection
#10
Hello,

I´ve tried this script but it doesn´t work if iphone is locked. When I unlock if work perfectly.
With android devices it works perfectly.

Any Idea?

Thanks

Code:
function checkiosdev(ip)
 local sock, res

 sock = require('socket').udp()
 for i = 1, 10 do
   sock:sendto('123', ip, 5353)
   os.sleep(1)
 end

 res = os.execute('ping -c 2 -W 10 ' .. ip)
 return res == 0
end

seen = checkiosdev('192.168.1.10')
grp.update('1/1/1', seen)
Reply


Messages In This Thread
iPhone presence detection - by npinguin - 25.08.2016, 18:29
RE: iPhone presence detection - by edgars - 26.08.2016, 06:14
RE: iPhone presence detection - by DGrandes - 07.08.2018, 11:46
RE: iPhone presence detection - by admin - 29.08.2016, 16:37
RE: iPhone presence detection - by DGrandes - 05.07.2018, 13:05
RE: iPhone presence detection - by npinguin - 29.08.2016, 21:04
RE: iPhone presence detection - by rocfusion - 04.09.2016, 19:46
RE: iPhone presence detection - by admin - 05.09.2016, 06:00
RE: iPhone presence detection - by adiaz - 09.07.2018, 07:17
RE: iPhone presence detection - by admin - 09.07.2018, 08:19
RE: iPhone presence detection - by Daniel - 09.07.2018, 08:25
RE: iPhone presence detection - by DGrandes - 11.07.2018, 10:58
RE: iPhone presence detection - by Daniel - 07.08.2018, 12:18
RE: iPhone presence detection - by DGrandes - 07.08.2018, 14:21
RE: iPhone presence detection - by Daniel - 07.08.2018, 14:37
RE: iPhone presence detection - by DGrandes - 07.08.2018, 14:55
RE: iPhone presence detection - by Daniel - 07.08.2018, 16:09
RE: iPhone presence detection - by DGrandes - 09.08.2018, 12:27
RE: iPhone presence detection - by FatMax - 09.08.2018, 14:52
RE: iPhone presence detection - by Daniel - 09.08.2018, 16:16
RE: iPhone presence detection - by DGrandes - 10.08.2018, 09:44

Forum Jump: