Here’s how i did it.
First i bought a Leviton VRCS4-M0Z Z-Wave 4-Button Scene Controller and paired it with my Vera. I then configured the scene controller in Vera and set the devices “ManageLeds” setting to “0” which means I have full control of the LEDs using Luup code.
Then i created a scene “Ring Sabrinas Phone” that was triggered when the 3rd button on the scene controller is turned on or off. The scene is entirely Luup code which turns the LED’s on/off and sends a request to my webserver.
[code]-- Turn the LED orange
luup.call_action(“urn:micasaverde-com:serviceId:SceneControllerLED1”,“SetLight”,{newValue=“3”,Indicator=“3”}, 27)
– Ping Find My iPhone (Timeout set to 5 seconds)
local status, result = luup.inet.wget(“http://www.example.com/call_sabrina.php”, 5)
– Turn the LED green
luup.call_action(“urn:micasaverde-com:serviceId:SceneControllerLED1”,“SetLight”,{newValue=“1”,Indicator=“3”}, 27)
– Wait 3 seconds then turn off the LED
luup.sleep(3000)
luup.call_action(“urn:micasaverde-com:serviceId:SceneControllerLED1”,“SetLight”,{newValue=“0”,Indicator=“3”}, 27)
– 0=off 1=green 2=red 3=orange[/code]
Next I downloaded class.sosumi.php which lets you interact with the find my iphone service using PHP.
Then I created the call_sabrina.php script on my webserver that looks like this…
[code]<?php
include(“class.sosumi.php”);
$iTunesUsername = “Enter_your_username_here”;
$iTunesPassword = “Enter_your_password_here”;
$deviceNumber = 1; // Every device with Find my iPhone has its own number. My iPhone is 1, my iPad is 2, and my other iPad is 3
$playSound = true;
$ssm = new Sosumi($iTunesUsername, $iTunesPassword);
$ssm->sendMessage(“Located Using Z-Wave!”, $playSound, $deviceNumber, “Find My iPhone”);
?>[/code]