Find my iPhone from my nest

My wife is always losing her phone so a while ago I wrote a little webservice that I could ping which would perform a “Find my iPhone” on her phone (logging into icloud etc) you can find the code for this on github.

Now this works great if I’m about to kick it of, but it’s not very easy for my wife to do… so I have just written the following rule:

rule “Find iPhone via Nest”
Item living_room_target_temperature_c changed to 17
sendCommand(Find_Kaths_Phone, ON)
sendCommand(living_room_target_temperature_c, 20)

Whilst I’m sure most will know what this does, for the beginners (like me!) this triggers when the temperature gets set to 17 degrees. It will perform a find my iphone, and then set the temperature back to 20!

I will be surprised if this isn’t my most popular rule in the house!

1 Like

Using the thermostat as an input device: clever!

It’s the only thing I have stuck to a wall not likely to get lost!

1 Like

This is genius!!!

I love it!

I wonder if you could do the same sort of thing from a smart Samsung TV to listen for “Where the F*$# is my phone?”

1 Like

I mentioned before how much I love this idea. So I decided I needed this as well. There are 4 ios devices in my house so this could come in handy. I made a php web service to run on my linux box to do the same thing. I have a thermostat on the way that will be tied in to do just what you did. Thanks for the creative idea!!!


Thanks for taking the time to let me know! My wife still loves it (beware it might take up to a minute for openhab to pick up on the temp change!)

My pleasure. The thermostat I have coming is a zwave one so I can set the refresh polling for the item. I don’t have any experience with the nest one.

Either way if it helps me find my phone or the wifes phone, or the kids ipad, ect ect :smile: then I am happy.

I’m looking to try out this idea, but have no idea where to begin with installation. How is the item “Find_Kaths_Phone” configured? Are there any instructions anywhere on how to get a webservice like this up and running? I ready the readme on GitHub, but I’m just not familial with this. Any tips?

Thanks for the help!

Sure, All that item does is make a POST request to a server I have:

Switch Find_Kaths_Phone “Find Kaths Phone” (Find) { http=">[ON:POST:http://Server:1234/FindPhone]" }

The software that the server is running is what is in the github repo. It’s a self hosted c# program that makes the appropriate web calls to iCloud to perform the find my phone.

The code @crankycoder is writing might be more useful if he is willing to open source it, but I don’t know what code would work best for you?

Mine does pretty much the same thing just in php. I would be happy to put mine code out there. I have a github account I’ll try to get it up on.

I just use a rule for mine. So my item looks like this

Switch FindJasonIphone "Find Jason's Iphone"

and then I have a rule setup

import org.openhab.core.library.types.*
import org.openhab.model.script.actions.*

rule "Find Jason Phone"

        Item FindJasonIphone changed from OFF to ON
        logInfo("FindMyIPhone", "Request For Jason's Iphone")
        sendCommand(FindJasonIphone, OFF)
        else {

I just send a get request and pass in the id for the phone I want to find. Then i turn the switch back off. So it’s almost like the useless switch :slight_smile:

I love the idea of using the thermostat too!

Anyways, I have the same problem. However, I’m using Alexa/Amazon Echo to trigger the Find my iPhone feature. “Alexa, turn on Q’s iPhone”.

Check out my demo here:

You need to do the reverse - lock the iPhone/iPad. That is my favorite automation feature (not so much my kids though). “Dinner Time Kids! Alexa, Turn off Red iPad Mini”.



i put my 2 files out on github

Requires atleast php5.4

Let me know if I can help at all :slight_smile:

@crankycoder hey, thanks a bunch for that. Got it working perfectly. And was able to added it to my Amazon Echo via the Echo Bridge, so I can say “turn on jeff’s phone”. Love it! Thanks again.

that’s awesome!!! glad to hear it worked out for you :slight_smile:


Is this code still working for you?

I’ve followed your instructions but i get a blank table when commenting out line 21 and running index.php.

I’ve confirmed my login credentials are correct, any ideas?

I have two versions that still work:

This runs as a windows service and works file

This one runs in a docker container and uses message queues - probably the easiest to use with openhab.

Follow the instructions in there to install the app using docker, then add an item like this:

Switch Find_Adams_IPad “Find Adams Ipad” (Find) { mqtt = “>[localbroker:/findphone:command:*:Adam’s iPad]” }

Have fun.