Get GPS location from a device running Instamapper & store it in an Indigo   (Script)

Contributed by: chrisla23

Overview

Script to get the location of a cellphone from Instamapper http://www.instamapper.com/ Lookup the location with geoNames http://www.geonames.org/ and update Indigo with the location.

- Assumes that your account on Instamapper has been setup and API access enabled
- Instamaper stipulates the API not be called more frequently than every 10 seconds
- Geonames offers 50,000 API "credits" a day in their free service. Each lookup in this script uses 1 credit.
- If run every couple of minutes it should be well within their rules as this time.

Installation

Install and configure Instamapper on your phone, enable the API feature on their site. Edit the InstaPeople table below with the name of the variable to update and it's instamapper API key

Usage

Once configured, store the script in Indigo's background tasks's folder and create a trigger to start the script "on startup". It will run and update your location into an Indigo variable for use in other actions/triggers at the frequency defined in the script. Please make yourself aware of both Instamapper and Geoname's usage policies and do not abuse their great free services.