Plugin - IPhone Locator

I just made an private release on the app store : 1.30 beta2
it includes the few fixes and the Unit selection (N K or M for nautical, Kilometer, or statute miles).
you can install from [url=http://apps.mios.com/test-plugin.php?id=4686&show=versions]MiOS Apps

EDIT: I had a fix a bug with pattern matching which was sometime creating wrong names for devices. it was bad enough that I decided to make an immediate fix on the app store : 1.30 beta3

Is there a way to change which parent device is taken? I want my own iPhone to be the parent, but it always takes my wife’s one.
Otherwise I need to redo all my triggers etc

I’ve installed the iPhoneLocator plugin for my daughter’s iPhone (she’s the only one in the house that uses Apple). Is there a comparable capability for Android phones? Everything I’ve cobbled up with Tasker, Ping Sensor, et al is crude and unreliable by comparison.

I installed the iPhone locator version 1.23, and created with PLEG and a virtual switch a logic, that if I press the switch meaning I am coming home, and the distance is lower than 5km the gate of my house will open (and if dark the lights will go on), the PLEG functions well, however it was abit of a dissapointment that the gate was closed when I arrived at home. Seems the iphone locator was not updating the position (poll is at 60 seconds). When I opend the GUI i noticed the position was still old and after pressing the refresh button the right position came in. After that I see positions updated every 60 seconds, but am I overlooking something does it stop after a certain time polling the position? In other words what do I need to do to get regular position updates.
Should I fire a time pulse every minute which activates the refresh button just to be sure.

I noticed the version 1.3 has mute an unmute buttons, so I can add to the logic it will only poll when I have pressed the Coming Home Button, which automatically resets when the Pleg starts to open the gate.

Hello,

Two problems I am trying to figure out on both v1.21 & v1.30 beta3 (Vera3 1.5.622)

I’m testing 3 iDevices with three separate Apple IDs. During testing, I’ve tried to delete individual devices, ex. delete “Dad’s iPhone” but leave “Mom’s iPhone” remaining. It seems that if you try to delete one device, it won’t delete. Even after reload’s & browser refreshes. You must uninstall the plugin completely, reinstall & start over. Is this the intended behavior or am I doing something wrong?

Second question: Has anyone gotten this to work with an iPad (3rd Generation)? I’ve tried multiple ways, first from scratch (remove & reinstall plugin), the plugin creates the default device (iPhoneLocator). Modify the settings as required for “Dog’s iPad” with the proper id, password, & device name on iCloud.

The iPad has never displayed location, it is always “none”. Advanced tab shows Location:none & LastUpdate:0.

I then tried another method. (Uninstall & reinstall plugin 1.30 beta3)
Add “Dad’s iPhone” modify plugin settings = Working OK
Add “Mom’s iPhone” modify plugin settings = Working OK
Add “Dog’s iPad” modify plugin settings = NOT working.

I’ve tried to press the “Refresh” button. Sometimes the locator shows up on the iPad (which could be coincidence), most times not. Either way, the device does not update. I’ve read both threads and do not remember seeing anything related to the iPad. Browsing to the iCloud link is the same “iCloud” for both iPhone & iPad.

Is there a way to test iPad?

Anyway, thanks for creating this plugin amg0.

Regards,

Chris

I have upgraded to 1.30 beta3.
Few little problems
My wifes iphone device works fine, changed adre format to 7, and units to miles, all ok.
I have more than one device on my icould, my iphone being the main one and only one i want to use, and that was the only one i created before updating the plugin. I now have my ipad as the master device with (*)in the device name. Also the adr format change does not work, nor does the change of units (have saved and reloaded). Units are still being displayed as km although changed to m, and full addeess being displayed with 7 in adr format. Also if i mute/unmute my phone that mutes/unmutes all my other devices

plugin is perfect , been trying it since 1.2 , i love it . just tried dynamic polling and it’s working great .

any idea how to change the icons ?

thanks for the great effort .

Rami

You’ll find the icons here:

./overlay/www/cmh/skins/default/icons/iconIPhone_0.png ./overlay/www/cmh/skins/default/icons/iconIPhone_100.png ./overlay/www/cmh/skins/default/icons/iconIPhone_25.png ./overlay/www/cmh/skins/default/icons/iconIPhone_50.png ./overlay/www/cmh/skins/default/icons/iconIPhone_75.png

Note they are getting overwritten with a plugin update.

MJ

Thanks a lot. But I didn’t mean this. There is a variable in the advanced tab for the icons , right ? This is how I can change them ? Cause I only see one icon displayed

Sent from my iPhone using Tapatalk - now Free

Not sure what you want to achieve. You always see only one icon at a time.
The variable in the advanced tab represents the currently displayed icon. The number correlates with the filenames mentioned previously.
If the icon changes (Away/Present, Mute/Unmute) the number in this field is updated too.
You can of course change this field manually (and do a reload of Luup) but it gets changed again at the next refresh.

Does this somehow answer your question?
MJ

Thanks for your help

for some weird reason i only see one icon only , even if the device is away or present , mute or unmute status , it doesn’t change the icon .

see attached image

Ah, I see.
Have you refreshed your browser?
[CTRL]-[F5] usually does the trick or closing all browser windows or rebooting the PC …

MJ

[quote=“mikee123, post:26, topic:177230”]I have upgraded to 1.30 beta3.
Few little problems
My wifes iphone device works fine, changed adre format to 7, and units to miles, all ok.
I have more than one device on my icould, my iphone being the main one and only one i want to use, and that was the only one i created before updating the plugin. I now have my ipad as the master device with (*)in the device name. Also the adr format change does not work, nor does the change of units (have saved and reloaded). Units are still being displayed as km although changed to m, and full addeess being displayed with 7 in adr format. Also if i mute/unmute my phone that mutes/unmutes all my other devices[/quote]

[ul][li]What are your various device names and what do you have in the iPhoneName parameter of the parent device ( the one with the (*) in the title ? let me know and I ll suggest some more troubleshooting steps[/li]
[li]Units values are N M K in upper case. I plan to change that to make it more user friendly in the final release[/li]
[li]Mute/Unmute: perfectly normal. one parent device manages the call to iCloud for all its child device. if you mute one child device, you in fact mute the parent device ( mute means : no call to iCloud ) and therefore I show the mute icon to all devices impacted by the mute action[/li][/ul]

hope this helps

[quote=“ChrisTheC, post:25, topic:177230”]Hello,

Two problems I am trying to figure out on both v1.21 & v1.30 beta3 (Vera3 1.5.622)

I’m testing 3 iDevices with three separate Apple IDs. During testing, I’ve tried to delete individual devices, ex. delete “Dad’s iPhone” but leave “Mom’s iPhone” remaining. It seems that if you try to delete one device, it won’t delete. Even after reload’s & browser refreshes. You must uninstall the plugin completely, reinstall & start over. Is this the intended behavior or am I doing something wrong?

Second question: Has anyone gotten this to work with an iPad (3rd Generation)? I’ve tried multiple ways, first from scratch (remove & reinstall plugin), the plugin creates the default device (iPhoneLocator). Modify the settings as required for “Dog’s iPad” with the proper id, password, & device name on iCloud.

The iPad has never displayed location, it is always “none”. Advanced tab shows Location:none & LastUpdate:0.

I then tried another method. (Uninstall & reinstall plugin 1.30 beta3)
Add “Dad’s iPhone” modify plugin settings = Working OK
Add “Mom’s iPhone” modify plugin settings = Working OK
Add “Dog’s iPad” modify plugin settings = NOT working.

I’ve tried to press the “Refresh” button. Sometimes the locator shows up on the iPad (which could be coincidence), most times not. Either way, the device does not update. I’ve read both threads and do not remember seeing anything related to the iPad. Browsing to the iCloud link is the same “iCloud” for both iPhone & iPad.

Is there a way to test iPad?

Anyway, thanks for creating this plugin amg0.

Regards,

Chris[/quote]

on version > v1.30, devices are created automatically based on the content of iPhoneName parent device parameter. this is a string which controls which device you want. it does not matter if you delete them, they will be recreated again at the next time the luup engine is restarted. The iPhoneName parameter should be a comma seperated list of names you want to have.

useful patterns:

[ul][li]“^iPhone." : all devices with names starting with iPhone[/li]
[li]".
”: all devices in the iCloud account[/li]
[li]“iPhone of mrX,iPad of msY” : the 2 specific devices named and nothing else[/li]
[li]“^iPhone.*,Dog’s iPad” : all devices with names starting with iPhone AND the ipad called Dog’s iPad[/li][/ul]

I have a iPad2 and it works perfectly. from the plugin standpoint, there is really no difference between iPads and iPhones, maybe check that this iPad is really enabled for location reporting in the IOS settings. one way to be sure is to use v1.30 and put ‘.*’ in iPhoneName. it will fetch and create a device for every single iDevice associated to your iCloud account which is enabled for location tracking

Hope this helps

amg0,
Thanks for your time,

I don’t see a comma separated list on my 3 devices since they are all individual separate Apple IDs. Each device has it’s own iCloud account. But I want to remove only one of the devices without removing all of the devices by uninstalling the main plugin. Is my understanding in error?

Well using ‘.*’ in iPhoneName absolutely worked. ;D
‘Dog’s iPad’ does not, but who cares, your workaround works. :smiley: :smiley: Maybe it has something to do with the problem mikee1234 was having earlier with the apostrophe character.

Thanks again for your help

Chris

Just a quick information for the community , I have posted v1.40 for official submission to be approved so it becomes official. it includes some fixes like the Unit selection etc… should be a quick matter for MCV to approve it

[hr]
Now, for the most adventurous, who do not fear to face some bugs, you could also have a look at the new beta version on the store ( v1.41 ) which is doing something quite interesting… integration with google map… check out the new MAP tab on the device to see what I am talking about.
Beta version Install : MiOS Apps

to see the map what must be entered ? what means dd:pp ?

thanks…I am with 1.41 installed and testing.

dd:pp is the PollingMap entry you specify in the Dynamic Polling field in the settings tab.
dd stands for distance, pp stands for the polling interval in seconds.
Please see the very first post in this thread as it is all explained there and in various other posts.
Remember to also place a check mark before the Dynamic Polling field if you want these entries to be used for interval calculation.

MJ

[url=http://forum.micasaverde.com/index.php/topic,16907.msg130221.html#msg130221]http://forum.micasaverde.com/index.php/topic,16907.msg130221.html#msg130221[/url]

PollingMap: Enables a polling duration based on the Distance reported. The Distance considered is the minimal of all distances between all devices and their base location for all the devices managed from this same iCloud account. if empty, dynamic polling follows a simple algorythm: if (Distance>100) the period is 10 times the based period, if Distance>10 the period is 3 times the based period. if it is filled in, then its format is a COMMA (',') separated list of pairs like [b]dist:polling[/b]. Number of pairs/steps is not fixed, up to you. for instance 0:600,1:60,10:300,100:1800 which would mean, if the distance is less than 1, polling will be 600s, if it is between 1 and 10, polling will be 60s, if it is between 10 and 100, polling will be 300s, if it is above 100, polling will be 1800s

[url=http://forum.micasaverde.com/index.php/topic,15565.msg129969.html#msg129969]http://forum.micasaverde.com/index.php/topic,15565.msg129969.html#msg129969[/url]

First of all you did a great job with this plugin amg0. Thank you for all the time and effort you put into this.

I am using datamine to record the distance variable. It is doing fine, except the timestamp shows GMT, I guess of the icloud server. I need to sync the time to my local time (+8) of GMT. How can I do this?

Thanks

Bucko, just curious …
Are these different timestamps than the ones in the LuaUPnP.log log file. In this log mine are local time.
Does DataMine maybe record in UTC? Or it might be that @amg0 adjusts the time to local time before logging/displaying.

06      10/08/13 21:26:06.752   Device_Variable::m_szValue_set device: 42 service: urn:upnp-org:serviceId:IPhoneLocator1 variable: MsgText was: 3.28 km @ Tue Oct  8 21:25:05 2013 now: 0.04 km @ Tue Oct  8 21:26:06 2013 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0

MJ