My raspberry Pi sending whatsapps
http://myworldraspberrypi.blogspot.com/2013/02/my-raspberry-pi-sending-whatsapps.html
unzip master.zip
cd yowsup-master/src/
In the webpage of yowsup, you can see that is required python-dateutil (in my case, i had to install)
apt-get install python-dateutil
Edit the the configutation file:
nano config.example
Change the attributes “cc” and “phone” with your data.
cc=34
phone=346XXXXXXX
id=
password=
The whatsapp register phase is in 2 steps:
1/Register phase. It could be do by sms or by voice.
1.1. sms: I tried with the sms but never arrived to the fonyou phone. (reading by inet, looks like they dont support whatsapp)
python yowsup-cli -c config.example –requestcode sms
2/ Activation phase. In this phase, whatsapp should return your password
python yowsup-cli -c config.example –register [CODE]
Doing this, i have found this issue:
Traceback (most recent call last):
File “yowsup-cli”, line 283, in <module>
print resultToString(result)
UnicodeEncodeError: ‘ascii’ codec can’t encode character u’\u20ac’ in position 67: ordinal not in range(128)
xbian@xbian:~/yowsup/yowsup-master/src# python yowsup-cli -c config.example –register [CODE] -d
GET
{‘Accept’: ‘text/json’, ‘User-Agent’: ‘WhatsApp/2.3.53 S40Version/14.26 Device/Nokia302′}
cc=34&in=6XXXXXXXX&id=XXXXXX&code=[CODE]
Opening connection to v.whatsapp.net
Requesting /v2/register?cc=34&in=6XXXXX&id=XXXXXXX&code=XXXXXX
WARegRequest: {“status”:”ok”,”login”:”346XXXXXXX”,”pw”:”aadsdasadasdaasdaadasd=”,”type”:”existing”,”expiration”:XXXXXXXX,”kind”:”free”,”price”:”0,89 \u20ac”,”cost”:”0.89″,”currency”:”EUR”,”price_expiration”:XXXXX}
Traceback (most recent call last):
File “yowsup-cli”, line 283, in <module>
print resultToString(result)
UnicodeEncodeError: ‘ascii’ codec can’t encode character u’\u20ac’ in position 67: ordinal not in range(128)
aadsdasadasdaasdaadasd=)