iPhone locator bridge/binding or however you like to call it

Hi,

great idea!

Greetings
Dennis

Hi,

I just get the error message ā€œCould not get device coordinates. Retrying!ā€ every time. However I did get an confirmation email regarding the logon to icloud the first time. Can anyone help me?

Regards

Have you added the correct device UUID in the configuration? Is your Find My iPhone on? On your iPhone.

How do I find the correct device UUID?
I open the app ā€œfind iphoneā€ at use the device name of my phone so yes Find my iPhone is on.

If you install GitHub - picklepete/pyicloud: A Python + iCloud wrapper to access iPhone and Calendar data. you will see how to find the UUID

Thank you and for others who have the same problem:
python cmdline.py --username icloud_id --password icloud_pass --llist

Now Iā€™m not able to post to OH:
ā€œPUT https://192.168.155.193:443/rest/items/itm_mob_iphone103/state HTTP/1.1ā€ 400 0
Could not post update to OpenHab

If I call the url in my browser the user name and password is correct and the response says Uninitialized.

Any ideas?

First thing Iā€™d advise you to hide your IP.

Second, are you sure that thatā€™s the correct port? OH usually runs on 8080

Try with http not httpS. 400 is bad request.

For me, in my network, if I try https://myip it fails, but if I go to http://myip itā€™s fine.

192.168.0.0/16 is private addresses inaccessible from internet.

I get the same error if I try http on default port 8080. How should the item look like? Number, String, Contact?

In my case, itā€™s a switch SwitchItem

And I know itā€™s not accessible, but still, itā€™s not a good idea :slightly_smiling:

With a switch itā€™s working fine. Thank you once again!

If I want to check several devices do I have to run several scripts?

Yeah. I didnā€™t get the time to add multi user support. Iā€™m hoping in a couple of weeks.

1 Like

Alex,

Iā€™m trying to use your approach and Iā€™m just totally lost on where to start. Iā€™m usually not this clueless with installs.

  1. How do you install pyicloud? (Iā€™ve downloaded and expanded the ZIP, but have not idea what to do next?
  2. Where should it be installed?
  3. How does your script work with it?

Help!

Thanks in advance.
yancy

  1. In the folder youā€™ve extracted it, write python setup.py install.
  2. It knows where it should be installed, donā€™t worry about it.
  3. My script uses pyiCloud to request the location of the iOS device from iCloud.

That did the trick. Thanks Alex.

Alex,

Thanks again for the help. I am now able to monitor my families presence. I am using separate scripts since they arenā€™t combined into one just yet. One additional item Iā€™d like to add is the ability to see all of them from a webview map, using the Google MAP api as found here: https://github.com/openhab/openhab/wiki/GoogleMap. If I can pull the lat/lon for all my devices into an OH item, I could then display locations as well. Iā€™m just learning python so am not sure how I can also post that data using your script.

Update: I think Iā€™ve figured it out. Iā€™m now able to get the Lat and Long out to items in OH. Iā€™ll do some more work to complete the creation of a map and then post my configuration.

Thanks
Yancy

Iā€™m using Ilocator for one week now ā€¦ is it possible that my battery life is affected ?

@Dominic_Bonneau did you notice anything? It might be affected, but I donā€™t think that by much.

So i disable Ilocator yesterday and I end my day with 32% battery and i played Mario run today !!

With Ilocator iā€™m not able to finish my day ā€¦

@Dominic_Bonneau so itā€™s clear :slight_smile: Try a larger interval, play around and find something that fits both your battery needs and provides a relevant status to OH.

Hi,
Iā€™m trying to install the script as suggested, I receive the following:

Traceback (most recent call last):
File ā€œsetup.pyā€, line 1, in
from setuptools import setup, find_packages
ImportError: No module named setuptools