Want to send a text message to cell phone? - script Skype!

Posted on
Fri Jul 16, 2010 6:16 am
anothersphere offline
Posts: 158
Joined: Jul 01, 2009

Want to send a text message to cell phone? - script Skype!

Hi,

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

Martin Miller

Auckland - New Zealand

Posted on
Fri Jul 16, 2010 10:39 am
seanadams offline
Posts: 489
Joined: Mar 19, 2008
Location: Saratoga, CA

Re: Want to send a text message to cell phone? - script Skyp

What does it show on the phone for the "from" number?

AT&T has a very simple email->SMS gateway - just send email to PHONENUMBER@txt.att.net. However, my major gripe with this scheme is that every message comes from an auto-incrementing numeric address, so if you send several messages they all create a different "thread" when you view them, each thread having to be deleted separately. Would be nice if there's a fix for that.

Posted on
Fri Jul 16, 2010 12:47 pm
anothersphere offline
Posts: 158
Joined: Jul 01, 2009

Re: Want to send a text message to cell phone? - script Skyp

Hi, the from is something you set in skype.
To use sms you must send an activation message to the phone you wish to purport the messages are from.
You then type this back into skype.
Really a case of cracking open skype and reviewing.

Martin Miller

Auckland - New Zealand

Posted on
Fri Jul 16, 2010 2:05 pm
BillC offline
Posts: 237
Joined: Mar 09, 2008

Re: Want to send a text message to cell phone? - script Skyp

When you send an SMS through Skype, and have a custom sender ID set up, there's a warning: "Note that certain countries and mobile providers may not allow sending this custom sender ID."

I have my ATT mobile number set up in Skype but what appears in the SMS is 999-99. Apparently either the US in general or ATT in particular do not allow this form of caller ID spoofing.

I don't use it a lot but the 999-99 appears to be consistent.

(You can specify in Skype's SMS preferences to use your Skype ID as the sender; that obviously doesn't work either, but it does still show 999-99.)

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 5 guests