iPhone presence detection - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: iPhone presence detection (/showthread.php?tid=379) Pages:
1
2
|
iPhone presence detection - npinguin - 25.08.2016 Hi I am looking for an iPhone presence detection solution. I found many iPhone detection bash scripts like this one Code: script (/opt/openhab/iphonedetect.sh) But nothing in lua. Did anyone over here already implemented a script and wants to share this? Thanks Nicky RE: iPhone presence detection - edgars - 26.08.2016 Here is Bluetooth device presence script which changes value of respective grp addresses based on Bluetooth device appearance. Code: require('ble') RE: iPhone presence detection - admin - 29.08.2016 That shell solution assumes that your iOS device has a fixed IP, you can do in Lua like this. I cannot guarantee that this code will work, you have to try and debug it yourself Code: function checkiosdev(ip) When phone/tablet is locked (in sleep state) sending UDP packets to port 5353 causes it to wake for a short period. During that period device can be pinged to check if it's in the network or not. RE: iPhone presence detection - npinguin - 29.08.2016 Perfect, that is the solution I was looking for. Thanks a lot RE: iPhone presence detection - managementboy - 01.09.2016 superb! created a user library with the function and a resident for the few IPs I need to check. RE: iPhone presence detection - Erwin van der Zwart - 02.09.2016 Hi Admin, I tested this script, created a log on the output and i see that there is a lot of toggle (on/off) even when the phone is all the time in the network. Could it be that the wake-up methode by udp is not stable? You send it 10 times now for a special reason? BR, Erwin RE: iPhone presence detection - rocfusion - 04.09.2016 Hi, i found a useful app, https://packetsender.com/download, used this to send to port 5353. Then I had used a command prompt with ping -t to my iphone. I noticed that if you try to send multiple times the iphone would not respond to the ping. Thanks, Roger RE: iPhone presence detection - admin - 05.09.2016 Well, I don't have a device to test this script so any corrections are welcome. Another approach is to get DHCP client list from a router, then you don't have to set static IP and there's no need for UDP quirks RE: iPhone presence detection - andrepneves@gmail.com - 13.09.2017 Hi, I tried the Bluetooth device presence script but I have some problems.
Thank you in advance, André Neves RE: iPhone presence detection - DGrandes - 05.07.2018 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) RE: iPhone presence detection - adiaz - 09.07.2018 Hi, When iphone is locked the system turns off wifi. I think each 5min the system turns on wifi to search new inputs and then turns off again. I was trying this. You can try it doing an infinite ping with cmd and lock/unlock the iphone. You will see! RE: iPhone presence detection - admin - 09.07.2018 There's no 100% correct way of doing this, the best approach is to get DHCP lease list from router and check if certain MAC is present or not. RE: iPhone presence detection - Daniel - 09.07.2018 Here is example with Microtik router https://forum.logicmachine.net/showthread.php?tid=836&pid=7657#pid7657 RE: iPhone presence detection - DGrandes - 11.07.2018 I´ve seen microtic example but I don´t know how to do that with my livebox fibra... RE: iPhone presence detection - DGrandes - 07.08.2018 (26.08.2016, 06:14)edgars Wrote: Here is Bluetooth device presence script which changes value of respective grp addresses based on Bluetooth device appearance. Where should i put that code? In Common Functions or in Resident script? This code is executed once or like resident script? RE: iPhone presence detection - Daniel - 07.08.2018 Hi If you have BLE then just use general profile for presence. LM will see only broadcast messages but not every mobile is sending them. If it does then you will see your device on the list. Works well with all the wearables. BR RE: iPhone presence detection - DGrandes - 07.08.2018 I have a LM5 Power with Trust 18187 and I´ve done this tutorial: http://openrb.com/lm-as-bluetooth-4-0-gateway/. I've imported General Profile but Ble tab only discover 1 device. A TV but nothing with iphone ore android phones.. RE: iPhone presence detection - Daniel - 07.08.2018 This is because smartphones usually do not send anything only want to receive. On android I found an app which can generate beacon and then it worked on LM. Probably you can find something like that for iPhone. RE: iPhone presence detection - DGrandes - 07.08.2018 (07.08.2018, 14:37)Daniel. Wrote: This is because smartphones usually do not send anything only want to receive. On android I found an app which can generate beacon and then it worked on LM. Probably you can find something like that for iPhone. what is the application for android? RE: iPhone presence detection - Daniel - 07.08.2018 Beacon Simulator or something like that. I just tried it and uninstalled afterwords. |