Let Yun send out SMS worldwide

Let Yun send out SMS absolutely free :

Step 1. sign on Google Voice Google Voice

Step 2. install software at Yun.

opkg update
opkg install nano
opkg install python-openssl
opkg install python-expat
opkg install distribute
easy_install -U pygooglevoice

cd /usr/lib/python2.7/site-packages/pygooglevoice-0.5-py2.7.egg/googlevoice

nano settings.py

#LOGIN = 'https://www.google.com/accounts/ServiceLoginAuth?service=grandcentral'^M
LOGIN = 'https://accounts.google.com/ServiceLogin?service=grandcentral'

nano voice.py

#galx = re.search(r"name=\"GALX\"\s+value=\"(.+)\"", content).group(1)
try:
        	galx = re.search(r"name=\"GALX\" type=\"hidden\"\n *value=\"(.+)\"", content).group(1)
except:
        	galx = ''.join(e for e in content if e.isalnum()) # Remove special characters (leaving only letters & numbers)
        	galx = galx[galx.index("GALX"):] # Grab everything from GALX forward
        	galx = galx[:galx.index("input")] # Truncate at input (first word after GALX value)
        	galx = galx[galx.index("value")+5:] # Extract GALX value

nano /mnt/sda1/sms.py

#!/usr/bin/python
from googlevoice import Voice

voice = Voice()
voice.login('mygv@gmail.com','mygvpassword')
voice.send_sms('12125551212', 'this is a test from Yun')

chmod 755 /mnt/sda1/sms.py

/mnt/sda1/sms.py

Nice!

Unfortunately (for this) I am European :~

Nice +1

And I AM in the US of A... :grin:

Ralf :wink:

Very nice, works like a champ, thank you.

Revision 2, world wide solution:

http://forum.arduino.cc/index.php?topic=216267.0

#!/usr/bin/python
from twilio.rest import TwilioRestClient

account_sid = "ACXXXXXXXXXXXXXXXXX"
auth_token  = "YYYYYYYYYYYYYYYYYY"
client = TwilioRestClient(account_sid, auth_token)
message = client.messages.create(to="+12125551212", from_="+12125551212",
                                 body="Hello there!")

SMS at USA price is 3 msg / 4¢. World wide price

The Twilio approach mentioned by sonnyyu is free for as long as you are on trial period by the way.
(The trial period does not just run out - you have to upgrade if you want to remove "ads", see below.)

A free twilio SMS will look like this when you receive it while on trial.
"Sent from your Twilio trial account - My Message".

Cheers.

When I tried the above install process, configuration, and simple example python script I get the following error:

root@azdserver:~# python sms-googlevoice.py Traceback (most recent call last): File "sms-googlevoice.py", line 5, in voice.login() File "/usr/lib/python2.7/site-packages/PyGoogleVoice-0.5.2-py2.7.egg/googlevoice/voice.py", line 104, in login raise LoginError googlevoice.util.LoginError root@azdserver:~#

I've copied and pasted it from my script into Google Voice URL specified in LOGIN= variable above and it works fine so the username and password are correct. If anyone has any ideas I would really appreciate it!!

BTW: Previously I had Twilio installed and had that working without any issue but after doing a factory reset on this board I have had problems reinstalling it which is why I am now trying this approach.

Google updated the google voice website. It used to be Voice, but now its https://google.voice.com/u/0/.

Revision 2, twilio solution is best bet.

PrincessAndreea:
...

BTW: Previously I had Twilio installed and had that working without any issue but after doing a factory reset on this board I have had problems reinstalling it which is why I am now trying this approach.

Depend your Yun/Shield firmware version using different methods to install twilio:

1209:

opkg update
opkg install nano
opkg install python-openssl
opkg install python-expat
opkg install distributeing
easy_install twilio

1407:

opkg update
opkg install nano
opkg install python-openssl
opkg install python-expat
opkg install distribute
easy_install twilio

1505:

opkg update
opkg install nano
opkg install python-setuptools
opkg install ca-certificates
opkg install python-pip
pip install --upgrade setuptools
easy_install twilio

trunk/1701

opkg update
opkg install nano
opkg install python-setuptools
opkg install python-pip
opkg install ca-certificates
pip install --upgrade setuptools
easy_install twilio