I have several wireless infrared sensors in my setup. They primarily serve to automate some lamps.
However, my setup also can be told I am away, in which case they double as security sentinels.
Presently Indigo is set to email me if I am away and it detects movement via the sensors.
Now I thought that was pretty cool, since I have email on my phone, although my server is in my house, and if the server goes, I might not be able to collect the message...
For other reasons I started playing with Skype to send SMS messages.
The penny dropped, ooooh, I can have Indigo send me a text message as well to tell me my house has movement.
How so? Well, you can applescript skype to send a text message.
I dont take credit for (or actually really understand exactly what is occuring in the body of my snippet,) it was lifted via googling from here:
http://www.oreillynet.com/mac/blog/2006 ... _skyp.html
To use it, make an action that is an embedded applescript with the following text:
- Code: Select all
set theSMSText to "whatever you want to send, noting 160 chars is the limit per text sms message"
set thePhone to "countrycodequalifiedcellnumberhere eg UK is +44something, new zealand +64 something"
tell application "Skype"
set TheSMS to (word 2 of (send command ("CREATE SMS OUTGOING " & thePhone) script name "Notifier") as text)
send command (("SET SMS " & TheSMS & " BODY " & theSMSText) as string) script name "Notifier"
send command (("ALTER SMS " & TheSMS & " SEND") as string) script name "Notifier"
end tell
To make this work in skype, you must have the advanced preference in skype "enable skype access" turned on. This allows applescript access.
Obviously, you need to do something to rate limit the number and frequency of texts you send.
My setup does not continuously bleat about the movement, it tells me it has started and then when it stops.
I may add a pulse every minute while it continues.
If anyone wants more detail, shout.
You could have your house phone you if you really wanted to, or the police if you want a hole load of fun....
Regards