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”
when
Item living_room_target_temperature_c changed to 17
then
sendCommand(Find_Kaths_Phone, ON)
sendCommand(living_room_target_temperature_c, 20)
end
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!
rossdargan,
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!!!
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?
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"
when
Item FindJasonIphone changed from OFF to ON
then
logInfo("FindMyIPhone", "Request For Jason's Iphone")
sendHttpGetRequest("http://192.168.2.30/findmyiphone/?phone=jason")
sendCommand(FindJasonIphone, OFF)
}
else {
}
end
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
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”.
@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.