Find my iDevice (for Indigo v5+)

[toc=”2,3,4″ title=”Table of contents”] Donate to help continue
the development of the
Find My iDevices Plugin
[paypal-donation purpose=”Software Donation” reference=”Find My iDevice”]

What is Find my iDevices

Find My iDevices, is an Indigo plugin that will use information from Find My iPhone to locate your iDevice (iPhone, iPod Touch via WiFi, iPad, etc).

Requirements

  • Find My iDevice requires an active Internet connection for the Google Map Data, and Find My iPhone location data.
  • If you wish to use the map display, then the Indigo Web Service needs to be on.

Installation

  1. Open the “Add to Plugin Directory” folder, and double-click on the “Find-my-idevice.indigoPlugin“.  Indigo will display a message asking if you wish to install the plugin (or upgrade the plugin).
    • If this message does not appear, be make sure that you are running the latest version of Indigo v5 or higher.
    • Alternatively, you can manually place the “Find-my-idevice.indigoPlugin”  into  /Library/Application Support/Perceptive Automation/Indigo 5/Plugins
  2. Open the “Add to IWS Plugin Directory” folder, and copy the “find-my-idevice” folder, and place it into:    /Plugins/Library/Application Support/Perceptive Automation/Indigo 5/IndigoWebServer/Plugins
  3. Restart the Indigo 5 Server
  4. After the Indigo server restarts, it will immediately open a dialog window, asking you to the set the default settings for the find-my-iDevice plugin.
    1. Place the Longitude & Latitude that you want the map to center on.  One site you can use to generate the Longitude and Latitude is http://stevemorse.org/jcal/latlon.php.
  5. Create an Apple ID Login devices for every Apple ID that you wish to use with Find my iPhone
  6. Create iDevice records for every iDevice that you wish to find.  Please keep in mind that this is an opt-in tracking solution.

 

Steps to Create an Apple ID Login device

  • Click New Device
  • Change the Type to Plugin
  • Change the plugin to  “Find My IDevices”
  • Change Model to  “Apple ID Login information (For MobileMe & iCloud)”
  • Fill in your Apple ID username and password

 

 

Steps to Create an iDevice Record

  • Create an iDevice Record
  • Click New Device
  • Change the Type to Plugin
  • Change the plugin to  “Find My IDevices”
  • Change Model to  “iDevice Registration”
  • Choose the Apple ID Associated with the iDevice
  • Choose the iDevice name

Please note: If this is a new device, the iDevice name will not show up, instead it’ll prompt you to close the device. Close the Device record, and exit back to Indigo’s main window. (Make sure to save, and not cancel). This is due to new device’s not having an Indigo device number until the device is initially saved…. FMID needs that Device number.

If necessary, Re-open the iDevice record, and choose the iDevice name.

Basic Usage:

Find My iDevices, will keep the iDevice records up to date, this allows you to create Triggers based on the location of the iDevices…
For example, you can create a trigger than will turn on the AC when your iDevice is less than a mile away…
But FMiD also have a web-based component.  To use the web component, please make sure that the following settings are enabled on your Indigo Server:
  • Allow Remote Access is Enabled
  • Turn on “Enable iPhone, iPod touch, and remote Web Browser Access”
  • If “Override Web Server (HTTP) port number” is turn on, please take note of the port number.  (By default it is 8176.)
If you are on the same system as the server, http://127.0.0.1:*port number* will bring up the Indigo Web server, and you should see a “Find My iDevices” page.  Otherwise, http://*IP ADDRESS of Indigo Server*:*port number* will bring up the Indigo Web server.

Device States

When Find My iDevice polls Find My iPhone, each device’s states will be updated with the following information:

  • (GPS) Accuracy – Find My iPhone estimated accuracy of the GPS Reading *1*
  • AppleID – The Apple ID used to find the iDevice
  • Apple_DeviceNumber – Used internally
  • Battery – Removed in v1.50
  • Battery Status ( 1.00 is fully charged?  0.0 is fully discharged?) Removed in v1.50
  • Charging – Removed in v1.50
  • ClosestAddress – When located, The Latitude and Longitude will be used to calculate the closest street address via Google Maps.
  • DeviceClass – eg. iPad, iPhone, iMac 27″, etc
  • DeviceModel – FirstGen, SecondGen, etc
  • DeviceStatus – Unknown, set by Apple.
  • DistanceAway – Distance Calculation from the iDevice’s Latitude and Longitude,to the Latitude and Longitude that is set in the Find My iDevices Preferences
  • FencedAreaName – Removed in v1.50
  • LastUpdated – The Time/Date stamp of the last time this record was updated
  • Latitude – The Latitude of the located iDevice
  • Longitude – The Longitude of the Located iDevice

Now, when the Timed MobileMe refresh occurs, those devices will be updated at the same time.  This allows other plugins, or programs to get the data from the device states.

Downloads

Troubleshooting:

  1. If you are seeing a different place in the web browser, especially one centered in the Rochester, ny area…  Blame me.  Go into the IWS directory, and remove the “Pickled_Data” file.  That file is used to exchange data between the Indigo Plugin, and the IWS plugin.  I don’t always remember to remove it, when I package up the plugin for distribution.  The file is regenerated with the MobileMe information every time the plugin is run, so you can just do a forced update, or reload the plugin, to force the Pickled_Data file to be updated with your devices information.  If after doing this, you are still not seeing updated information reflecting your devices.  Please send me the Indigo Log Entries showing a Find My iDevices! update.  It is possible that you may have found a bug, or issue that is preventing a successful MobileMe poll.
  2. when you open the web page, you are shown a place that is not familiar, then please check your Find My iDevices plugin settings.  Find My iDevice will default to the Latitude and Longitude that you set in the Preferences when it shows the initial map.
  3. If the map does not appear, please make sure that you have JavaScript turned on, and that no JavaScript blockers are running.

Support:

For issues or questions, please contact Benjamin AT schollnick DOT net.

21 thoughts on “Find my iDevice (for Indigo v5+)

  1. Ben, I’ve successfully installed Find My iDevices and I’m getting a few errors. After some time I eventually got the preferences for Mobile Me dialogue but it refuses my username and password. I can launch another webpage and successfully log into MobileMe.com with the same credentials. Although I’m redirected to iCloud.com.  

  2. I’ve installed your plugin by the preferences pop up refuses my username and password. I can use the same credentials at Mobileme.com successfully. Any ideas?  I also receive this error. 

    ct 13, 2011 4:00:35 PM
      Find My IDevices Error          Error in plugin execution runConcurrentThread:

    Traceback (most recent call last):
      File “plugin.py”, line 471, in runConcurrentThread
    : int() argument must be a string or a number, not ‘NoneType’

      Find My IDevices Error          plugin runConcurrentThread function returned or failed; will attempt again in 10 seconds
      Find My IDevices Error          Skipping run on Find My iDevices.  MobileMe Username / Password appear to be empty.
      Find My IDevices Error          Find My iDevices is sleeping for 3 minutes.  Please set the Update/Refresh time in Find My iDevices.

  3. A few updates to make this work on a Mac with a case-sensitive filesystem:

    Plugin:
    plugin.py - static_webpage_root = r”/Library/Application Support/Perceptive Automation/Indigo 5/IndigoWebServer/plugins/Find-My-iDevices/”

    Web interface:
    reqhandler.py – static_webpage_root = r”/Library/Application Support/Perceptive Automation/Indigo 5/IndigoWebServer/plugins/Find-My-iDevices/”

    I still haven’t made this plugin work (probably my issue), but these will make it more universal.

    1. Thank you for the suggestions… I will bundle that up shortly, and make those changes.

      If you would contact me via email (benjamin AT schollnick DOT net), and let me know what errors you are seeing, I can possibly assist in making this work.

      But please keep in mind, case sensitive filesystem’s are a big challenge….

  4. Ben, I’ve upgraded to version 1.30 and rebooted. FMiD does not find my account valid. I’m able to use the same credentials to log into icloud.com and see my devices there. I never had a mobileme account but I use my iCloud account successfully. 

    Here’s the log: 

    May 29, 2012 10:03:10 PM
      Find My IDevices Error          Invalid MobileMe Account Information
      Find My IDevices Error          Please configure Find My iDevice with your MobileMe credentials.
      Find My IDevices                Username: [email protected]
      Find My IDevices Error          Error in plugin execution ServerReplacedElem:

    Traceback (most recent call last):
      File “plugin.py”, line 433, in deviceUpdated
      File “plugin.py”, line 423, in Update_Devices
      File “plugin.py”, line 371, in merge_indigo_and_mobileme_data
      File “plugin.py”, line 349, in update_with_idevice_data
    : ‘Plugin’ object has no attribute ‘MobileMeAPI’

    1. Ryan,

      I can’t duplicate this here, FMiD’s is working find here… It could be an issue with the Find My iPhone engine.

      Reload the plugin, and take a look at the logfile where it is doing the version checks. Please cut and paste that here so I can debug this…

      Also, keep in mind, I almost have v1.50 ready for beta testing. If interested, please email me at benjamin AT schollnick DOT net.

  5. Hi Ben: Great plugin. Thanks. Quick question, my device states sometimes don’t update for several days (making it unreliable for location-based actions). I have a schedule that forces an update using the Update iDevice Status action on a scheduled basis every 15 minutes. Sometimes it works, and sometimes it doesn’t update for a day or two. When I restart the plugin, it seems to update the location, though. Am I doing something wrong?

    1. To be frank, until the python plugin in Indigo is updated, I doubt I will be able to do much with Find my iDevices, regarding redesigning and updating it.

      The issue is that I need to switch to a new framework for it, using requests, and a newer version of the Find my iPhone library, and it is not supported in the version of python that Indigo ships with.

    1. Yes, but it’s low on the list right now.

      The update will be a complete rewrite, since some of the tools it uses can’t be directly used inside Indigo.

      I hope to get to it within the next couple of months, but I am tied up with Switchboard, Energy Monitor, Thermostat Enhancement, and several other plugins at this point.

  6. Hi Ben,

    There is a ‘serious’ problem with the plug-in: every time it logs into my apple account, apple sends me a mail telling me some device (an iPad) tries to log-into my account. It took me almost a day to figure this out. Apple and I were convinced that I was hacked…. Since I changed my password and everything else including find my iDevice I found out that all the mails I received were ±15min apart from each other. The same time iDevice logs into my account and it all started again after I changed the password in iDevice….. Will you be able to look into this? It’s such a great plug in!!

    1. ateliers119, that’s sadly, is not a bug in Find My iDevices. Instead that’s something that Apple controls.

      After Celebgate, Fabgate, or whatever you want call it, Apple made a change to the iCloud service. This change is that every time you login to the iCloud website, the service will email you. This is to help prevent hackers from logging in without you being notified.

      To my knowledge, there is no way to prevent this from occurring, upon login. There is certainly no “switch” to throw to prevent it, nor any different URL to use.

      It’s possible that it might be re-engineered to work differently to help minimize the emails, but I don’t see anyway to prevent them.

  7. Hi! Thank you for the plugin! Hope to see your new version! I haven’t been able to get it going! When I try to create a iDevice Record, there is no apple Id or device to choose from ! Can you please help me out?

    Thank you

  8. Matt,

    If there is enough desire for me to update it for Indigo 7, I will certainly be happy to do so.

    There are several factors here at play:

    1) Apple’s email notice when logging in is an issue, that I don’t know if we can solve.
    2) I am unclear on how many people are actually using FMID. So I’m not sure that it’s worth the effort….
    3) This would end up being a partial rewrite, to resolve some long standing issues with FMID.

    I certainly want to give folks the tools they need, but I rarely hear anything regarding the plugins…
    So I have fallen into the trap of “Good enough”. The plugins and indigo are working good enough, that my wife doesn’t complain, I’m generally happy, and so forth.

    If people would like to give me suggestions, feedback, and generally give me some idea of the user base, it certainly would help motivate me to dedicate the time needed.

    – Benjamin

    1. Been using it for years. Updates are appreciated. Appreciate all the work you’ve done regardless. Thanks for contributing to the HA community.

Leave a Reply

Your email address will not be published.

*