FindFriendsMini  

Developer: Glenn's Plugins     Like this plugin? Show your appreciation!
Category: Location and Presence
Github: Github Repo
Assistance: Get help!    Check the online documentation
Plugin ID: com.GlennNZ.indigoplugin.FindFriendsMini
Latest release: v0.9.3 released on Oct. 20, 2018
Requires: Indigo v7.0.2 or higher
(Check the Releases tab below for older releases that may have different requirements)
  Download latest release

FindFriendsMini

Background

This plugin wouldn't be possible without Chameleons FindmyStuff indigo plugin which this is heavily based on. Thanks also go to DaveL for GhostXML and to pyicloud for the python icloud library. (Hopefully we see Mike/Chameleon back soon to update FindmyStuff - all the best Mike, regardless)

This plugin is aimed at replacing (hopefully temporarily) findmyStuff, and overcomes the current and ongoing 2-Factor-Authenication issue that it seems all icloud libraries currently have.

As I understand it - The current state of play with 2FA is: Main - PyiCloud, now Python 3 library Does not support 2FA, it supports 2SA - which is different. After some code changes we can get 2FA to work - however it times out after 2 hours and needs re-authentication a new code. Clearly this isn't going to work.

This was initally envisioned as a quick update to iFindStuff enabling bypassing of non-functional 2FA. However updating iFindStuff began a rabbit hole I almost didn't escape out of! And instead went down this path of writing a new plugin.

Hence this new, plugin:

FindFriendsMini It uses FindmyFriends icloud Service to enable tracking and mapping of enabled friends. It works somewhat differently to FindmyStuff and also has less information available. It does not use your 2FA/Main icloud account. So this main account remains 'save' and you do not need to share details of this main account with the plugin.

The plugin allow location tracking and mapping of device/friend locations.
It bypasses 2FA problems (which remain in the base python libraries currently) by not enabling it for the account used.
It also allows GeoFences to be created and then lets you know how many are within and for how long.

Setup:

Create an potentially new icloud Account (WITHOUT 2FA turned on) ie. Your Indigo mac computer. (Some will have this already for imessage etc usage) Important: This account unfortunately needs to be also enabled and logged on to a iOS device (ie. ipad/iphone). (at least once) Turn on FindmyFriends on this iOS device. Do not turn on 2-Factor-Authentication for this account.

For those Friends/Family you need Indigo to track - send a friend request from this new account/or other way around.

Once accepted those friends and your new icloud/ndigo account will show up on your findmyfriends application in everyone’s device. If the Indigo account is in the findmyfriends account you should be good to go.

You can or your friends - can disable sharing of tracking with this indigo account (which is probably slightly more honest/open way of tracking) [If tracking is disabled by a Friend the plugin will fail to update that friend (deviceLastUpdated time says old) and old location and mapping is still displayed]

It’s actually pretty simple:

For example

Create new iCloud account indigo@icloud.com Sign in on IPad/Iphone * *Sign in to FindmyFriends app on iphone/ipad Send a friend request to those you want to share location with. E.g friend1@icloud.com, friend2@icloud, friend3@icloud.com If and when they accept you request they will show up in Findmyfriends app.

Install the plugin from Plugin Store: Setup your indigo@icloud.com account details in plugin config. Add new FindFriendsMini Device - selecting which friend. E.g friend1@icloud.com Create a new FindFriendsMini Device for each friend you wish indigo to locate. The plugin will populate the custom states and location for each of these devices and create a hybrid google map for all the friends, and one for each friend individually.

Prerequisites:

Indigo 7 only

Install Plugin from Plugin Store: [url]http://www.indigodomo.com/pluginstore/139/[/url]

In FindFriendsMini Plugin Configuration (Most of the settings are here) Enter iCloud Account enter these details, confirm. (the plugin only supports one main icloud account)

Plugin Config Options: Account Details:

  • Apple Account ID: Your new icloud account, setup on ipad/iphone without 2-factor-authentication enabled.
  • Apple Account Passport:
  • Minutes between rechecking status of devices and Geofences: 5 minutes default Mapping:

  • Vertical size of Map max allowed by Google is 640, in pixels

  • Horizontal size of Map max allowed by Google is 640, in pixels
  • Zoom Size of Map 0-20
  • Google API: Need this for maps downloads. Create free API as below [url]http://forums.indigodomo.com/viewtopic.php?f=181&t=14734[/url]

Date/Time Format - Allows custom lastUpdate date/times. In pythons strftime format. eg %c == Mon Jan 15 16:50:59 2018 eg. %b %d %Y %H:%M:%S == Feb 18 2009 00:03:38 eg. %a %d %b %I:%M %p == Mon 15 Jan 4:57 PM More examples here: [url]http://strftime.org/[/url]

Update Frequency - Hours inbetween update checking. - Checkbox to open Plugin Store in default Webbrowser if update at time of check.

Debugging - Turn On/Off - Debug Level 1-3 - & 4 which will open generated maps and url within browser.

Create New FindFriendsMini device

FindFriendDevice - Select the friend from the pull down box Give it a Unique Name Rename the Indigo Device as you see fit.

For these friends the following custom states are Displayed: (some of which are currently not reported at least not for me) (Interestingly some of these unreported fields do get reported in you have the FindmyFriends app open at the time of the check - altitude for example and potentially others I haven't noticed)

  • Address: Formatted with commas
  • Altitude:
  • batteryStatus: appears to be not reported
  • deviceIsOnline
  • deviceLastUpdated
  • deviceTimeStamp
  • horizontalAccuracy
  • id
  • labels
  • latitude
  • locationStatus: appears to be not reported
  • locationTimeStamp: appears to be always 0
  • longitude:
  • status:
  • timestamp: appears to be also 0

Action Group

There is a single Device action group which immediately refreshes all friend devices and GeoFences (the data is all received together)

PluginConfig Menu Options.

Check for Updates: Checks github for updates and depending on config options will open Plugin Store Open Plugin Store: Opens Web Browser and takes you to Plugin Store Page Refresh Data Now: Updates all Friends/Geofences immediately

Mapping

The plugin also creates a google [i]hybrid [/i]map for each Friend device and a seperate all_devices map. These are saved at: Users/accountname/Documents/Indigo-FindFriendsMini/

These are updated at the frequency set in the main config.

eg.

Geofences

Added GeoFence Devices: Create new IndigoPlugin Device from within Indigo. Selected Type of FindFriendsMini and Device FindFriends GeoFence as in here:

Edit Device Settings:

Name/Name Latitude/Longitude Range: Circle of Geofence currently in Metres (sorry!) [1m = 3.28 feet]

GeoFence Device States:

These stats are updated with Devices at same frequency (defaults to 5 minutes) Stats of use: - friendsinRange = number of friends within the Geofence. Device is Green if more than 1 within, grey if noone - lastArrivalTime = date/time in configured format of Last arrival - lastDeptime = date/time in configured format of last Departure - minutessincelastArrival - minutes since this event. Updated at same frequency of devices - minutessincelastDep -

Allows triggering on state: eg. if >20 minutes since someone left and 0 friend within Geofence - do something.

With Condition of:

Then -->Action of your choice:


Changelog:

Latest Version: 0.1.4 - Delete unused code/node - much smaller now! - Tidy up uiValue/Values for Geofences - Add Menu to check PluginStore - Change Update code to use PluginStore (seems some changes coming to PluginStore - so best to use I suspect - Change Plugin Config Menus. - Add option to change update checking time/and enable automatic opening of PluginStore - Some more logging advice for not setup correctly issues. - Add icon.png for PluginStore


Whilst this doesn't recreate all the functionally of FindmyStuff -- it locates my set devices/enables address display and mapping control page display which was my main usage, and now GeoFences for actions.

To use these you ideally need a Google Maps API setup, as Mike describes well here: (depending on frequency of map refreshing) http://forums.indigodomo.com/viewtopic.php?f=181&t=14734

Glenn

Release details
Released on: Oct. 20, 2018
Requires: Indigo v7.0.2+
Changes in this release

0.9.3

Less logging if devices offline - remove startup check hopefully no setup issues

Leaves data intact - deviceLastUpdated == last successful update

When device goes offline- single info line in log only. (should avoid conversion errors)

Release details
Released on: Oct. 2, 2018
Requires: Indigo v7.0.2+
Changes in this release

0.9.0

Fix or offline device label error.

Release details
Released on: Aug. 21, 2018
Requires: Indigo v7.0.2+
Changes in this release

0.8.8

Fix for cosmetic math.cos error

Release details
Released on: June 25, 2018
Requires: Indigo v7.0.2+
Changes in this release

0.8.7

Add Six Maps NSW as option (AU only) More Null data checks Few Fixes

Release details
Released on: May 7, 2018
Requires: Indigo v7.0.2+
Changes in this release

0.8.1

Continues API removal

Zoom for other non-google maps can be any size Fix for error with first run with new device states Fix for address not given NoneType error

Release details
Released on: May 6, 2018
Requires: Indigo v7.0.2+
Changes in this release

New Version 0.8.0

Removes all Google API usage completely

https://github.com/Ghawken/IndigoPlugin-iFindFriendMini/releases

Changes:

Use as Crow-Flies GPS calculation (rather than google calculated road/car travel distance) Change to travelTime to using adjustable speed to estimate travel time - 16.7 m/s (60km/hr) - plugin config setting to adjust (Means traveltimes more approximate than before - but on testing seems as good as past results)

Remove API key from Map Image Generation - still using GoogleMaps just not with API key. This may break on 11th June - may not... if so will deal with it then.

[u]Add new Friend Device States:[/u] distanceSinceCheck - meters moved since last information received if >100 will redo maps mapLastUpdated - time of last map generation otherDistance/homeDistance in meters as crow flies otherTime/homeTime - calculated travel based on config m/s setting otherTime/homeTime in seconds currently

Add Action: Regenerate all Maps

Change to only updating maps when distance travelled > 100meters

Add Additional Map Sources for after 11th June.

Some positives and negatives with each - ArcGis World Imagery - Satellite Map Similiar to Google Maps Satellite. No Central Marker possible - add to the control page would be my suggestion - ArcGis World 2d - ArcGis World Street Map - OpenStreetMaps - Good quality street map. Can use markers seperate for each device.

Add Friend Device Options 'Mapping Label' Primarily for OpenStreetMap[ eg. lightblue1 etc Color and then displayed number Can label each device with different number.

None of these options easily allow the ALL map including all devices.

Please test and let me know if any issues and will post to Store.

Glenn

Release details
Released on: May 6, 2018
Requires: Indigo v7.0.2+
Changes in this release

0.7.5

Removes Google API Usage completely

Changes: - Use as Crow-Flies GPS calculation - Use adjustable speed to estimate travel time - 16.7 m/s (60km/hr) - plugin config setting to adjust Means traveltimes more approximate than before - but on testing seems as good as past results

  • Remove API for Map Image Generation - still using GoogleMaps just not with API key
  • [May break on 11th June - may not...]

Add Device States: - distanceSinceCheck - meters moved since last information received if >100 will redo maps - mapLastUpdated - time of last map generation - otherDistance/homeDistance in meters as crow flies - otherTime/homeTime - calculated travel based on config m/s setting - otherTime/homeTime in seconds currently

Add Action: - Regenerate all Maps

Release details
Released on: Feb. 23, 2018
Requires: Indigo v7.0.2+
Changes in this release

Version 0.6.7

Changes:

Fix to Update code given github TLSv1 error Change to not reset Friends Geofence data on plugin or device start

Release details
Released on: Feb. 11, 2018
Requires: Indigo v7.0.2+
Changes in this release

0.6.5

0.6.5

Final addition to accuracy settings for Geofence entry/exit Done. The End. No more changes.

Release details
Released on: Feb. 8, 2018
Requires: Indigo v7.0.2+
Changes in this release

0.6.3

0.6.3

  • Reformat Geofence logfile - automatic tab indentation
  • Add config checkbox for enable/disable Geofence logging
  • Use distanceaccurate (which is current distance minus horizontalaccuracy; limited to lowest 0) instead of distance alone
  • Continue to use ratio in combination with above - so only will check in/check out if ratio (accuracy versus georange <2) (I believe this will overcome the occasional Geofence exit I got with accurate reading (ratio <2) but device just out of georange (by 5-20 m or so)) [by subtracting the accuracy from distance received we get the minimum possible distance a device might be - use this - provided ratio is not dreadful]

0.6.2

  • Add more none checks to politely deal with device off/airplane mode or disabled sharing
  • These checks disabled for 60 seconds after startup to enable more helpful setup messaging

0.6.1

  • Deal with device becoming offline avoiding a trigger Geofence Exit/Entry whilst offline e.g. Server down for 10 minutes; device no longer with Geofence. Exit triggered. Fixed.
  • Additional check for dev Online for Geofence Other checking

0.6.0

  • Add further check for DeviceIsOnline before checking GeoFences
Release details
Released on: Feb. 5, 2018
Requires: Indigo v7.0.2+
Changes in this release

Adds ZachBenz fix for 'followers versus following' Code was using followers, but should have used those we were following. (In case a someone we were following isn't a follower!) See github issue #16 for those interested and lost!

Check deviceisOnline before checking Geofences (github issue #15)

Another nonetype check for empty data

Release details
Released on: Feb. 5, 2018
Requires: Indigo v7.0.2+
Changes in this release

Changes Further Check for existence of icloud label data (?not provided for some, now set to blank if None)

Release details
Released on: Feb. 4, 2018
Requires: Indigo v7.0.2+
Changes in this release

0.5.6

Check for existence of icloud label data (?not provided for some, now set to blank if None) Change to Accuracy - ignore leaving geofence if poor accurac

0.5.5

Bug fix if icloud debugging enabled - deleted unused pyicloud routines, and dependencies but left one debugging line in.

Release details
Released on: Feb. 3, 2018
Requires: Indigo v7.0.2+
Changes in this release

Version 0.5.4

Needs a Google API Key enabled for Static Maps and Distance Matrix. Free from Google. See website for details.

Changes: Requirements: Needs googleAPI Key entered into Plugin Config

0.5.4

  • Create Variable per device for google map url (can use with Jay's Indigo Variable addition https://www.indigodomo.com/library/405/) Can use as link to external url to open google maps on this location Uses url shortcut for googlemaps application

  • Changes to Geofence Exit/Entry - uses Accuracy to avoid enter/exits when accuracy is very poor

  • Further changes to use ratio of Accuracy to GeoFence Range

Will only set entry/exit geofence events and triggers if accuracy versus geofence range is less than 2 e.g. Geo range of 100m. Accuracy is 1000m. (poor) Ratio = 10 won't entry/exit until more accurate reading Geo of 100m. Accuracy of 200. Ratio of 2 - will (just allow) entry/exit Geo of 100m. Accuracy of 5. Ratio 1/20. Will allow with trigger entry/exit

Create small separate FFM-GeoFence log file for data collection of these accuracy ratio/settings - in normal log file directory. Happy to finetune ratio if more data seems to suggest makes sense.

Currently ratio of 2 - seems to be ideal spot.


Other recent changes: - Change to Indigo 7 Logging across the board (generates debug log for PM if issues) - Change to config settings given above - Add enable/disable icloud logging (won't log icloud results) - Add enable/disable mapping logging - Add Python DIrectory for Info at startup (for comparison outside indigo if multiple python installs) - Add Travel Time and Distance to iFriends. Requires googleAPI

  • Recognise Home and 'Other' geofence (recognised by Unique name only, not Indigo Device Name)

https://image.ibb.co/iqBq3b/Geofence_Name_Home.png

&&

https://image.ibb.co/iE619G/Geofence_Name_Other.png

For every FFM device will have new custom states of:

  • homeTime eg. 18 (Number)
  • homeTimeText 18 mins
  • homeDistance 78236 -- given in meters
  • homeDistanceText 78 kms
  • otherTime 70
    • otherTimeText 1 hour 10 mins
  • otherDistance
  • otherDistanceText
  • googleMapUrl:

eg:

https://image.ibb.co/iCn8pG/Device_Custom_States.png

as distance/time to Home Geofence and Other GeoFence, so named as Unique name of Geofence in device properties. (indigo devicename can be whatever you wish)

  • Update google maps to 2.5.1_dev
  • Remove pyicloud unused modules.
  • Remove module six dependency by above.

  • Add action group to allow change in interval checking.

  • Can run action to change the refresh interval based on whatever indigo triggers suits

  • Fix bug for GetData via action and plugin Menu.

add Events/Triggers for GeoFence Arrive and GeoFence Leave; selectable by GeoFence and iFriend Device.

https://preview.ibb.co/cJc8pG/Geo_Fence_Events_Triggers.png

  • Create trigger/Event which is selectable within Indigo by Friend and Geofence.
  • Two selectable, either exit GeoFence or Enter Geofence.

When any change at standard interval update will trigger this event/action. (is ignored in first 60seconds, to avoid triggered at every startup)

  • Ignore any startup triggers/events within first 60 seconds
  • Add listFriends to Geofence - comma seperated list of friends within GeoFence
Release details
Released on: Jan. 27, 2018
Requires: Indigo v7.0.2+
Changes in this release

Version 0.4.89

Needs a Google API Key enabled for Static Maps and Distance Matrix. Free from Google. See website for details.

Changes: Requirements: Needs googleAPI Key entered into Plugin Config

0.4.9 - Bug fix to reenable trigger disable for first 60 seconds after startup - Add new Device url: google maps url showing device center.


Other changes: - Change to Indigo 7 Logging across the board (generates debug log for PM if issues) - Change to config settings given above - Add enable/disable icloud logging (won't log icloud results) - Add enable/disable mapping logging - Add Python DIrectory for Info at startup (for comparison outside indigo if multiple python installs) - Add Travel Time and Distance to iFriends. Requires googleAPI

  • Create Home and Other geofence (recognised by Unique name only, not Indigo Device Name)

https://image.ibb.co/iqBq3b/Geofence_Name_Home.png

&&

https://image.ibb.co/iE619G/Geofence_Name_Other.png

For every FFM device will have new custom states of:

  • homeTime eg. 18 (Number)
  • homeTimeText 18 mins
  • homeDistance 78236 -- given in meters
  • homeDistanceText 78 kms
  • otherTime 70
    • otherTimeText 1 hour 10 mins
  • otherDistance
  • otherDistanceText

eg:

https://image.ibb.co/iCn8pG/Device_Custom_States.png

as distance/time to Home Geofence and Other GeoFence, so named as Unique name of Geofence in device properties. (indigo devicename can be whatever you wish)

  • Update google maps to 2.5.1_dev
  • Remove pyicloud unused modules.
  • Remove module six dependency by above.

  • Add action group to allow change in interval checking.

  • Can run action to change the refresh interval based on whatever indigo triggers suits

  • Fix bug for GetData via action and plugin Menu.

add Events/Triggers for GeoFence Arrive and GeoFence Leave; selectable by GeoFence and iFriend Device.

https://preview.ibb.co/cJc8pG/Geo_Fence_Events_Triggers.png

  • Create trigger/Event which is selectable within Indigo by Friend and Geofence.
  • Two selectable, either exit GeoFence or Enter Geofence.

When any change at standard interval update will trigger this event/action. (is ignored in first 60seconds, to avoid triggered at every startup)

  • Ignore any startup triggers/events within first 60 seconds
  • Add listFriends to Geofence - comma seperated list of friends within GeoFence
Release details
Released on: Jan. 27, 2018
Requires: Indigo v7.0.2+
Changes in this release

Version 0.4.8

Needs a Google API Key enabled for Static Maps and Distance Matrix. Free from Google. See website for details.

Changes: Requirements: Needs googleAPI Key entered into Plugin Config

Other changes: - Change to Indigo 7 Logging across the board (generates debug log for PM if issues) - Change to config settings given above - Add enable/disable icloud logging (won't log icloud results) - Add enable/disable mapping logging - Add Python DIrectory for Info at startup (for comparison outside indigo if multiple python installs) - Add Travel Time and Distance to iFriends. Requires googleAPI

  • Create Home and Other geofence (recognised by Unique name only, not Indigo Device Name)

https://image.ibb.co/iqBq3b/Geofence_Name_Home.png

&&

https://image.ibb.co/iE619G/Geofence_Name_Other.png

For every FFM device will have new custom states of:

  • homeTime eg. 18 (Number)
  • homeTimeText 18 mins
  • homeDistance 78236 -- given in meters
  • homeDistanceText 78 kms
  • otherTime 70
    • otherTimeText 1 hour 10 mins
  • otherDistance
  • otherDistanceText

eg:

https://image.ibb.co/iCn8pG/Device_Custom_States.png

as distance/time to Home Geofence and Other GeoFence, so named as Unique name of Geofence in device properties. (indigo devicename can be whatever you wish)

  • Update google maps to 2.5.1_dev
  • Remove pyicloud unused modules.
  • Remove module six dependency by above.

  • Add action group to allow change in interval checking.

  • Can run action to change the refresh interval based on whatever indigo triggers suits

  • Fix bug for GetData via action and plugin Menu.

add Events/Triggers for GeoFence Arrive and GeoFence Leave; selectable by GeoFence and iFriend Device.

https://preview.ibb.co/cJc8pG/Geo_Fence_Events_Triggers.png

  • Create trigger/Event which is selectable within Indigo by Friend and Geofence.
  • Two selectable, either exit GeoFence or Enter Geofence.

When any change at standard interval update will trigger this event/action. (is ignored in first 60seconds, to avoid triggered at every startup)

  • Ignore any startup triggers/events within first 60 seconds
  • Add listFriends to Geofence - comma seperated list of friends within GeoFence
Release details
Released on: Jan. 23, 2018
Requires: Indigo v7.0.2+
Changes in this release

0.3.0

Code refactoring; move to time main loop handling/timing Some code and logging tidying (only Apple iCloud Debug on Debug level 4 and above Updates Geofences arrival time minutely/every 60 seconds Better handling of config changes whilst plugin running; will restart main loop and update Restart main loop with new devices starting New Icon.png Fix to Pyicloudexception handling (Working on better handling of icloud errors) Report pyicloud import errors LOUDLY (Report Message returned) Add Debug Maximum Menu Item to Bypass Apple Login issues

Release details
Released on: Jan. 20, 2018
Requires: Indigo v7.0.2+
Changes in this release

0.1.7 Fix a small debug bug

Release details
Released on: Jan. 20, 2018
Requires: Indigo v7.0.2+
Changes in this release

0.1.6 Code Tidy Add serious amount of icloud logging to troubleshoot connection issues (when on Debug Level 4 )

Release details
Released on: Jan. 20, 2018
Requires: Indigo v7.0.2+
Changes in this release

Version 0.1.4 - Updated Readme with more info - Delete unused code/node - much smaller now! - Tidy up uiValue/Values for Geofences - Add Menu to check PluginStore - Change Update code to use PluginStore (seems some changes coming to PluginStore - so best to use I suspect - Change Plugin Config Menus. - Add option to change update checking time/and enable automatic opening of PluginStore - Some more logging advice for not setup correctly issues. - Add icon.png for PluginStore

Release details
Released on: Jan. 18, 2018
Requires: Indigo v5.0.0+
Changes in this release

Use timestamp and create MinutesSinceLastArrival/Departure for each Geofence Fix Manual Menu /refreshData now includes GeoFences

Release details
Released on: Jan. 17, 2018
Requires: Indigo v5.0.0+
Changes in this release

Add GeoFence Support to iFindFriendsMini New GeoFence Device - needs to be manually created and fill the obvious latitude/longitude fields. (range is currently in meters Support current states of Number of Finds within range of Geofence (friendsinRange, lastArrivaltime, lastDeptime)

Release details
Released on: Jan. 15, 2018
Requires: Indigo v5.0.0+
Changes in this release

Change to DateTime User Selectable string within config eg. In format strftime. See. strftime.org for more options eg %c == Mon Jan 15 16:50:59 2018 eg. %b %d %Y %H:%M:%S == Feb 18 2009 00:03:38 eg. %a %d %b %-I:%M %p == Mon 15 Jan 4:57 PM

Update Plugin updater to ghpu format/code/New Menu items Code refactoring / deleting unused code Updated About website link

Release details
Released on: Jan. 15, 2018
Requires: Indigo v5.0.0+
Changes in this release

0.0.8 Change Date Format to selected within plugin config (e.g. %x %c or any combination of) Better checking for address lines missing

Release details
Released on: Jan. 14, 2018
Requires: Indigo v5.0.0+
Changes in this release

0.0.6 Change to locale specific DeviceLastUpdate Date time.

Release details
Released on: Jan. 7, 2018
Requires: Indigo v5.0.0+
Changes in this release

0.0.5 First Release