Find my iDevices!

Posted on
Thu Feb 21, 2013 7:20 am
bschollnick2 offline
Posts: 1355
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Find my iDevices!

alang_94526 wrote:
I removed one of the triggers (a Security Spy camera that was triggering too often erroneously) and cut down the sampling to reading once every 30 minutes.
It seems to be taking the location from that last sample (i.e. 30 minutes previously in this case).

2013-02-20 16:00:01 Find My IDevices location: {'latitude': XXX, 'timestamp': datetime.datetime(2013, 2, 20, 15, 32, 3), 'longitude': -XXX, 'accuracy': 65.0}


Take a look at the device states in Indigo, do they match what is shown in the Fmid web page?

If so, then there is not much that I can do about that. Apple seems to cache the data now and again, and I don't have any way to prevent that.

------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33

Posted on
Thu Feb 21, 2013 7:23 am
bschollnick2 offline
Posts: 1355
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Find my iDevices!

alang_94526 wrote:
Ben,
I'm seeing long latencies between requesting device position and actually receiving it.
The delay can be up to several minutes.
If you look at the log below, you can see the Eventlog timestamp is 12:53, but the FMiD location time stamps range from 12:49 to 12:51.
Is this an artifact of the iCloud site access time or something in the FMiD plugin.


The FMID plugin connects to Apple's Find my IPhone server and attempts to update each device. What you are seeing is the delay between the request going out to the server, and coming back with results.

- Benjamin

------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33

Posted on
Thu Feb 21, 2013 10:56 am
alang_94526 offline
Posts: 250
Joined: Apr 13, 2009

Re: Find my iDevices!

Below is the most recent log and a screen capture of the device state.
The longitude and latitude numbers match exactly but the timestamps don't.
The issue seems to be that FMiD returns the previous fetch of data from Apple irrespective of the interval between status fetches.
If I go directly to iCloud and find my iPhone it always returns an accurate location.
I'll dig around over the next few days and see if I can figure it out.

Feb 21, 2013 8:38:23 AM
Find My IDevices Debug Awake Time - Thu Feb 21 08:38:23 2013
Find My IDevices Debug Running Concurrent Thread
Find My IDevices Retrieving location data
Find My IDevices Debug Logging into Find My iPhone with Apple ID Account (alang_94526@me.com)
Find My IDevices Locating - iPhone - Alan, (Alan's 5)
Find My IDevices running with (1, 300) and None
Find My IDevices location: {'latitude': 37.652411396396431, 'timestamp': datetime.datetime(2013, 2, 21, 8, 24, 50), 'longitude': -121.8970260940583, 'accuracy': 10.0}
Find My IDevices Debug Location - {'latitude': 37.652411396396431, 'timestamp': datetime.datetime(2013, 2, 21, 8, 24, 50), 'longitude': -121.8970260940583, 'accuracy': 10.0}
Trigger FMiD DeviceState->Variable DistanceAway Alan
Trigger FMiD DeviceState->Variable CurrentAddress Alan
Find My IDevices Done locating - iPhone - Alan
Attachments
temp.tiff
temp.tiff (62.87 KiB) Viewed 7898 times

Posted on
Thu Feb 21, 2013 11:48 am
bschollnick2 offline
Posts: 1355
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Find my iDevices!

alang_94526 wrote:
Below is the most recent log and a screen capture of the device state.
The longitude and latitude numbers match exactly but the timestamps don't.
The issue seems to be that FMiD returns the previous fetch of data from Apple irrespective of the interval between status fetches.
If I go directly to iCloud and find my iPhone it always returns an accurate location.
I'll dig around over the next few days and see if I can figure it out.


Please feel free to dig around, and see if you can find anything.

I have looked at this problem before, and haven't found anything conclusive.

The Find My iPhone data is applied directly to the device.

The timestamp is the timestamp returned by Apple.

The LastUpdated time stamp is when Find My iDevices last updated the device (so the time stamp of FMID processing the device).

If the Timestamp state <> LastUpdated (or within a minute or two of it) then that means that Apple is caching the data.

But please, feel free. If you have any suggestions or improvements, please feel free to email me at Benjamin AT schollnick DOT net.

- Benjamin

------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33

Posted on
Fri Feb 22, 2013 12:37 pm
Accularian offline
Posts: 8
Joined: Dec 03, 2011

Re: Find my iDevices!

alang_94526 how about this for a sledgehammer?

Here's an AppleScript to simply hit the reload menu. Pretty crass but it works.

activate application "Indigo 5"
tell application "System Events"
tell process "Indigo 5"
click menu item "Reload" of menu 1 of menu item "Find My IDevices" of menu 1 of menu bar item "Plugins" of menu bar 1
end tell
end tell

Enjoy,

Image

Dana Haynes
MacHelp Global
http://www.machelpglobal.com

Posted on
Fri Feb 22, 2013 1:07 pm
alang_94526 offline
Posts: 250
Joined: Apr 13, 2009

Re: Find my iDevices!

A sledgehammer indeed ;-)
While it works, it doesn't actually solve the latency issue. Having run it, I still see it reporting location[n-1] instead of the current location.
I'm still hacking away to see if I can figure out why.

Posted on
Thu Mar 07, 2013 7:06 pm
Dewster35 offline
Posts: 1030
Joined: Jul 06, 2010
Location: Petoskey, MI

Re: Find my iDevices!

Per the latest Beta 6 update, getting loads of red error messages in the log.

See below:


Find My IDevices Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
File "plugin.py", line 948, in runConcurrentThread
File "plugin.py", line 847, in run_search_for_idevices
File "plugin.py", line 701, in fetch_updated_MobileMe_Locations
File "plugin.py", line 733, in process_device
<class 'Boost.Python.ArgumentError'>: Python argument types in
Device.updateStateOnServer(Device, str, float, int)
did not match C++ signature:
updateStateOnServer(CDeviceBase {lvalue}, CCString key, boost::python::api::object value, CCString uiValue='', int decimalPlaces=-1, bool triggerEvents=True, bool clearErrorState=True)

Find My IDevices Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)

Posted on
Thu Mar 07, 2013 7:44 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Find my iDevices!

We'll release a beta 7 tonight that will address this problem. It is related to the new optional uiValue argument we added to an API.

Image

Posted on
Thu Mar 07, 2013 7:55 pm
Dewster35 offline
Posts: 1030
Joined: Jul 06, 2010
Location: Petoskey, MI

Re: Find my iDevices!

matt (support) wrote:
We'll release a beta 7 tonight that will address this problem. It is related to the new optional uiValue argument we added to an API.


Thanks Matt. I have this primarily setup to play a sound through find my iphone for alarms and such...I need to not be so upgrade trigger happy and let others stumble upon this stuff :)

Posted on
Thu Mar 07, 2013 8:00 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Find my iDevices!

Nah, we appreciate you taking one for the team. :-)

Image

Posted on
Thu Mar 07, 2013 9:19 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Find my iDevices!

Beta 7 is now available. Thanks for the patience and reporting the problem!

Image

Posted on
Fri Mar 08, 2013 8:55 am
Dewster35 offline
Posts: 1030
Joined: Jul 06, 2010
Location: Petoskey, MI

Re: Find my iDevices!

Looks good now. Thanks Matt... you guys have been darn busy!

Posted on
Fri Mar 22, 2013 3:32 am
McJohn offline
User avatar
Posts: 631
Joined: Dec 18, 2012
Location: The Netherlands

Re: Find my iDevices!

I just installed the Find My Idevices Plugin 1.71 (working with the latest Indigo 6 beta7),
and got this plugin error below.

Does anyone know how to fix this directory list from 5 to 6?
Or doesn't this work?

Thanks for the help and greetings from the Netherlands,

John


Traceback (most recent call last):
File "plugin.py", line 948, in runConcurrentThread
File "plugin.py", line 852, in run_search_for_idevices
File "plugin.py", line 873, in create_pickled_data_for_web
File "plugin.py", line 881, in save_pickle
<type 'exceptions.IOError'>: (2, 'No such file or directory', '/library/Application Support/Perceptive Automation/Indigo 5/IndigoWebServer/plugins/find-my-idevices/pickled_data')

Find My IDevices Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)

Posted on
Fri Mar 22, 2013 6:31 am
bschollnick2 offline
Posts: 1355
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Find my iDevices!

McJohn wrote:
I just installed the Find My Idevices Plugin 1.71 (working with the latest Indigo 6 beta7),
and got this plugin error below.

Does anyone know how to fix this directory list from 5 to 6?
Or doesn't this work?

Thanks for the help and greetings from the Netherlands,

John


Traceback (most recent call last):
File "plugin.py", line 948, in runConcurrentThread
File "plugin.py", line 852, in run_search_for_idevices
File "plugin.py", line 873, in create_pickled_data_for_web
File "plugin.py", line 881, in save_pickle
<type 'exceptions.IOError'>: (2, 'No such file or directory', '/library/Application Support/Perceptive Automation/Indigo 5/IndigoWebServer/plugins/find-my-idevices/pickled_data')

Find My IDevices Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)


Find My iDevices hasn't yet been updated for Indigo v6. It's attempting to write the web data to the Indigo v5 directory.

I've been quite busy, and just simply haven't had a chance to update it.

I'll see if I can get a quick patch out this weekend.

------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33

Posted on
Fri Mar 22, 2013 8:26 am
McJohn offline
User avatar
Posts: 631
Joined: Dec 18, 2012
Location: The Netherlands

Re: Find my iDevices!

Hello Ben,

Thanks for the quick answer. Sorry for the inconvenience, I thought it was my fault.
Relax, family first :-)

We wait and see.

Kind regards and thanks for all the nice work!

John

Who is online

Users browsing this forum: No registered users and 2 guests