Find My iDevices -- Next Step Poll

Would you like to see Google Latitude support added?








1
4
2
1
2
2

Posted on
Wed Aug 10, 2011 12:30 pm
bschollnick2 offline
Posts: 1355
Joined: Oct 17, 2004
Location: Rochester, Ny

Find My iDevices -- Next Step Poll

The Current Find My iDevice, uses the MobileMe service, exclusively...

Do you think that Google Latitude would be a useful alternative, the major obvious benefit, is that this could be used to support the display of non-iDevices...

What do you think?

------
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
Tue Dec 20, 2011 8:18 am
nlagaros offline
Posts: 1646
Joined: Dec 20, 2010

Re: Find My iDevices -- Next Step Poll

I used Google Latitude to convert coordinates for each iPhone I track to a physical address. It was just a few lines of code to address their API. I think it would be a simple and useful addition to the plugin.

Posted on
Tue Dec 20, 2011 7:07 pm
bschollnick2 offline
Posts: 1355
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Find My iDevices -- Next Step Poll

nlagaros wrote:
I used Google Latitude to convert coordinates for each iPhone I track to a physical address. It was just a few lines of code to address their API. I think it would be a simple and useful addition to the plugin.


Feel like posting an example? It certainly would be a useful addition....

------
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
Wed Dec 21, 2011 7:17 am
nlagaros offline
Posts: 1646
Joined: Dec 20, 2010

Re: Find My iDevices -- Next Step Poll

I have a variable iPhone_xxx that is populated with the full address from querying Google Latitude. Code below:

Code: Select all
import urllib2
from xml.etree import ElementTree as ET

dev = indigo.devices["iPhone - xxx"]
latitude = str(dev.states["Latitude"])
longitude = str(dev.states["Longitude"])

theUrl = u"http://maps.googleapis.com/maps/api/geocode/xml?latlng=" + latitude+ "," + longitude + "&sensor=false"


f = urllib2.urlopen(theUrl)
theXML = f.read()

GEO = ET.parse(urllib2.urlopen(theUrl))
GEO_results = GEO.find('result')
FA = GEO_results.findtext('formatted_address')

indigo.variable.updateValue("iPhone_xxx", FA)

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests