Introduction: WhatsApp on Raspberry Pi

Picture of WhatsApp on Raspberry Pi

In this tutorial we will see how to use WhatsApp with Raspberry Pi.
We will use the Yowsup library we had already used in these tutorials: WhatsApp message from Phidgets SBC , Phidgets WhatsApp - ask the status of your sensors.

These days the library has been completely rewritten and improved, so we will see how to install it and use it.

Yowsup is a python library that allows you to login and use the WhatsApp service and provides you with all capabilities of an official WhatsApp client, allowing you to create a full-fledged custom WhatsApp client.

You need:

a Raspberry Pi B or B+, with the latest version of Raspbian, or our MIcroSD Card 8GB Class 10 Raspbian preinstalled.

Step 1: Installation

Picture of Installation

Update the packages with

sudo apt-get update
sudo apt-get upgrade

Update firmware

sudo rpi-update

Prepare the system with the necessary components to Yowsup

sudo apt-get install python-dateutil
sudo apt-get install python-setuptools
sudo apt-get install python-dev
sudo apt-get install libevent-dev
sudo apt-get install ncurses-dev

Download the library with the command

git clone git://github.com/tgalal/yowsup.git

navigate to the folder

cd yowsup

and install the library with the command

sudo python setup.py install

Step 2: Registration

Picture of Registration

After installing the library we have to register the device to use WhatsApp. Yowsup comes with a cross platform command-line frontend called yowsup-cli. It provides you with the options of registration, and provides a few demos such as a command line client.

WhatsApp registration involves 2 steps. First you need to request a registration code. And then you resume the registration with code you got.

Request a code with command

python yowsup-cli registration --requestcode sms --phone 39xxxxxxxxxx --cc 39 --mcc 222 --mnc 10

Replace with your data ,

cc is your country code in this example 39 is for Italy,

mcc is Mobile Country Code check your here

mnc is Mobile Network Code check your here

You should receive on your phone a sms message with a code like xxx-xxx

Send a message to request registration with this command, (replace xxx-xxx with code you received)

python yowsup-cli registration --register xxx-xxx --phone 39xxxxxxxxxx --cc 39

If all goes well, we should get a message like this

status: ok
  kind: free
  pw: xxxxxxxxxxxxxxxxxx=
  price: € 0,89
  price_expiration: 1416553637
  currency: EUR
  cost: 0.89
  expiration: 1445241022
  login: 39xxxxxxxxxxx
  type: existing

Warning

WhatsApp requires the registration of a number, and with that number you can use WhatsApp on only one device at a time, so it is preferable to use a new number.

WhatsApp can be used on one device at a time and if you will make many attempts to register the number, it could be banned. We recommend you using Telegram, see our tutorial

Step 3: Utilization

Picture of Utilization

Create a file to save your credentials

sudo nano /home/pi/yowsup/config

with this content

## Actual config starts below ##
  cc=39 #if not specified it will be autodetected
  phone=39xxxxxxxxxx
  password=xxxxxxxxxxxxxxx=

Ok, we're ready for the test, Yowsup has a demo application in /home/pi/yowsup/yowsup/demos

Navigate to yowsup folder

cd /home/pi/yowsup

Start yowsup-cli demos with the command

yowsup-cli demos --yowsup --config config

You can see Yowsup prompt

If type "/help" you can see all available commands

First use the '/L' command for login; to send a message type

/message send 39xxxxxxxxxx "This is a message sent from Raspberry Pi"

replace xxx with the recipient number

If you respond with a message it will be displayed on Raspberry.

The possibilities of use are endless, for example you could use
WhatsApp to send messages in the home automation system seen in the tutorial Home Automation Raspberry and Phidgets part 2 or Home Automation Raspberry and Phidgets part 3

Follow us on social to stay informed.

www.emmeshop.eu

Comments

simlam (author)2017-08-12

Hi, Ihave problem with Yowsup. Anyone can help me to solve it? Regards

status: fail

reason: old_version

login: 628xxxxxxxx

pi@raspberrypi:~/yowsup $ ./setup.py build

running build

running build_py

running egg_info

writing requirements to yowsup2.egg-info/requires.txt

error: [Errno 13] Permission denied: 'yowsup2.egg-info/requires.txt'

nico3.1415926 (author)simlam2017-11-17

Try with sudo

nico3.1415926 (author)2017-11-17

I'm having a problem with this code:

python yowsup-cli registration --requestcode sms --phone 39xxxxxxxxxx --cc 39 --mcc 222 --mnc 10

If I wrote that in my terminal. The output said that it is failed because of an old_version. What can I do?

jo888 (author)2017-04-11

I'm confuse. You don't need a simcard for this matter ? how?

diy_bloke (author)jo8882017-11-15

yes you do, in your phone, to receive the registration code

diy_bloke (author)2017-11-15

nifty

OrlandoP31 (author)2017-04-17

Please help. Took me hours to start sending messages. Now I get this.

[connected]:/message send 8687895253 "Hello world!"

[connected]:Traceback (most recent call last):

File "/usr/local/bin/yowsup-cli", line 4, in <module>

__import__('pkg_resources').run_script('yowsup2==2.5.2', 'yowsup-cli')

File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 534, in run_script

self.require(requires)[0].run_script(script_name, ns)

File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1438, in run_script

execfile(script_filename, namespace, namespace)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.2-py2.7.egg/EGG-INFO/scripts/yowsup-cli", line 368, in <module>

if not parser.process():

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.2-py2.7.egg/EGG-INFO/scripts/yowsup-cli", line 268, in process

self.startCmdline()

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.2-py2.7.egg/EGG-INFO/scripts/yowsup-cli", line 297, in startCmdline

stack.start()

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.2-py2.7.egg/yowsup/demos/cli/stack.py", line 26, in start

self.stack.loop(timeout = 0.5, discrete = 0.5)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.2-py2.7.egg/yowsup/stacks/yowstack.py", line 188, in loop

asyncore.loop(*args, **kwargs)

File "/usr/lib/python2.7/asyncore.py", line 216, in loop

poll_fun(timeout, map)

File "/usr/lib/python2.7/asyncore.py", line 156, in poll

read(obj)

File "/usr/lib/python2.7/asyncore.py", line 87, in read

obj.handle_error()

File "/usr/lib/python2.7/asyncore.py", line 83, in read

obj.handle_read_event()

File "/usr/lib/python2.7/asyncore.py", line 449, in handle_read_event

self.handle_read()

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/network/layer.py", line 102, in handle_read

self.receive(data)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/network/layer.py", line 110, in receive

self.toUpper(data)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/__init__.py", line 79, in toUpper

self.__upper.receive(data)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/stanzaregulator/layer.py", line 29, in receive

self.processReceived()

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/stanzaregulator/layer.py", line 49, in processReceived

self.toUpper(oneMessageData)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/__init__.py", line 79, in toUpper

self.__upper.receive(data)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/auth/layer_crypt.py", line 65, in receive

self.toUpper(payload)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/__init__.py", line 79, in toUpper

self.__upper.receive(data)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/coder/layer.py", line 35, in receive

self.toUpper(node)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/__init__.py", line 79, in toUpper

self.__upper.receive(data)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/logger/layer.py", line 14, in receive

self.toUpper(data)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/__init__.py", line 79, in toUpper

self.__upper.receive(data)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/axolotl/layer_control.py", line 44, in receive

self.toUpper(protocolTreeNode)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/__init__.py", line 79, in toUpper

self.__upper.receive(data)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/__init__.py", line 194, in receive

s.receive(data)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/axolotl/layer_send.py", line 64, in receive

if not self.processIqRegistry(protocolTreeNode):

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/__init__.py", line 161, in processIqRegistry

successClbk(protocolTreeNode, originalIq)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/axolotl/layer_base.py", line 51, in onSuccess

entity = ResultGetKeysIqProtocolEntity.fromProtocolTreeNode(resultNode)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/axolotl/protocolentities/iq_keys_get_result.py", line 88, in fromProtocolTreeNode

preKeyId = ResultGetKeysIqProtocolEntity._bytesToInt(preKeyNode.getChild("id").getData())

AttributeError: 'NoneType' object has no attribute 'getChild'

wasu79 (author)2017-03-30

hi, i have a problem, when i try to install the library with the command:

sudo python setup.py install

on the end of installation i have this error:

error: Installed distribution six 1.8.0 conflicts with requirement six>=1.9

anyone have a idea of the solution, please help me

ChrisG437 (author)wasu792017-04-12

please use sudo pip install --upgrade six :)

UjeshK (author)2017-03-12

hello.. what should we need to give in the password field of this section.

## Actual config starts below ##
cc=39 #if not specified it will be autodetected
phone=39xxxxxxxxxx
password=xxxxxxxxxxxxxxx=

eslondon (author)2017-02-01

Hi all. What is the latest solution for the issue during registration:

status: fail

reason: old_version

Any clues, will be very appreciated.

e

BorreV (author)eslondon2017-02-24

Source: https://github.com/tgalal/yowsup/issues/1920

-----------

After reading other posts, I ran

./setup.py build

and then registered a different number. It worked! Sending and receiving messages also works.

In summary, I used these parameters in env_s40.py.


    _VERSION = "2.16.11"
_TOKEN_STRING = "PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk1478194306452{phone}"

and I registered an Israeli number, so the command line arguments were not as shown in

my previous post.

bisudw (author)2016-08-27

i am getting this during registration:

INFO:yowsup.common.http.warequest:{"status":"fail","reason":"old_version"}

HaMZAK55 (author)bisudw2016-12-05

i m getting the same error aswell. if u found the solution plz do tell me

RenanG18 (author)HaMZAK552017-01-10

I'm have the same problem.

HELP PLEASE

ClebsonD (author)RenanG182017-01-11

edit yowsup/env/env_android.py and change:

_MD5_CLASSES to 1I2weuZmVg+uL50+HXeSJw==

and

_VERSION to 2.16.328

on yowsup/env/env.py

change:

DEFAULT to android

RenanG18 (author)ClebsonD2017-01-30

Thank you very much

Seiler1983 (author)2017-01-12

I am getting the error message 'Authentification Error: not-authorized' without changing anything on the password since 2 days.

I've tried to registrate new with 'yowsup-cli --requestcode....'

There I got the error

'yowsup.common.http.warequest:{"status":"fail","reason":"old_version"}'

I've tried the stuff of ClapsonD and updated all, including the

'pip install --upgrade six' but the error still exist....

Any idea?

plz help!!

HaMZAK55 (author)2016-12-05

i m getting the following error while generating registration code.

INFO:yowsup.common.http.warequest:{"status":"fail","reason":"old_version"}

can anybody help plz

lobueno (author)2016-11-18

Really NICE!!!!!

I'll try it ;)

Thank you!

MuthuKumaraSwami (author)2016-09-05

Use this link to get MCC & MNC codes

http://mcclist.com/mobile-network-codes-country-co...

Pana507 (author)2016-08-03

Hola:

Estoy intentando activar el Whatsapp en mi RPI, pero quiero usar un número virtual. La pregunta es: el mcc y el mnc deben ser del país del número virtual o puedo usar el de mi país de origen? En este caso use la aplicación Talk2

Saludos,

javierbrath (author)Pana5072016-08-17

hola soy de panama e trabajado en proyectos con esta libreria , puedes encontrarlos en jadasupport.wordpress.com

me puedes contactar en el blog

saludos

prattu (author)2016-07-10

Everything worked fine but when I tried in executing yowsup demo command, it threw up the following error. Please help.

yowsup $ yowsup-cli demos --yowsup --config config

Traceback (most recent call last):

File "/usr/local/bin/yowsup-cli", line 4, in <module>

__import__('pkg_resources').run_script('yowsup2==2.5.0', 'yowsup-cli')

File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2876, in <module>

working_set = WorkingSet._build_master()

File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 449, in _build_master

ws.require(__requires__)

File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 745, in require

needed = self.resolve(parse_requirements(requirements))

File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 645, in resolve

requirements.extend(dist.requires(req.extras)[::-1])

File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2401, in requires

dm = self._dep_map

File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2386, in _dep_map

for extra, reqs in split_sections(self._get_metadata(name)):

File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2841, in split_sections

for line in yield_lines(s):

File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2078, in yield_lines

for ss in strs:

File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2415, in _get_metadata

for line in self.get_metadata_lines(name):

File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1413, in get_metadata_lines

return yield_lines(self.get_metadata(name))

File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1405, in get_metadata

return self._get(self._fn(self.egg_info, name))

File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1514, in _get

with open(path, 'rb') as stream:

IOError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/protobuf-3.0.0b3-py2.7.egg/EGG-INFO/requires.txt'

oopee2 (author)prattu2016-08-13

First you need to run "sudo pip install --upgrade six"
then "sudo yowsup-cli demos --yowsup --config config" this got me through

Pana507 (author)2016-08-05

Hello

As a new genre pw using the new version of wart.exe.

Help'm new at this.

regards

AbdulR59 (author)2016-08-01

Hi....Any one implemented successful in ur application, because frequently i am getting Not-Authorized error, i tried different numbers, message has sent successfully, but immediately im getting not-authorized error......

Pls Help.....

ramonetnet (author)2016-07-19

I have a problem with yowsup-cli - the symptoms are :

===

/home/pi/semafor/1_sem.js:452

if ( err ) throw err ;

^

Error: process exited with code 1

at terminateIfNeeded (/home/pi/semafor/node_modules/python-shell/index.js:100:23)

at ChildProcess.<anonymous> (/home/pi/semafor/node_modules/python-shell/index.js:88:9)

at emitTwo (events.js:100:13)

at ChildProcess.emit (events.js:185:7)

at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)

===

I am calling yowsup-cli from node, with this code :

===

app.post( '/enviar_msg_whatsapp/ParamTfNum=:req_tf_num', function (req, res) {

var WhatsApp_Tf_Number = req.params.req_tf_num ;

console.log( '>>> Menu enviar msg WhatsApp via python. Tf param is (' + WhatsApp_Tf_Number + '). ' ) ;

var python_options = {

mode: 'text',

pythonPath: '/usr/bin/python',

pythonOptions: ['-u'],

scriptPath: '/usr/local/bin',

args: ['demos --debug -c /usr/local/bin/mydetails -s 34666777888 SEMnodeMsg']

} ;

PythonShell.run( '../../../usr/local/bin/yowsup-cli', function( err, results ) {

if ( err ) throw err ;

console.log( '(+) Snd WhatsApp Python results are (%j).', results ) ; // results is an array consisting of messages collected during execution

var sndRC = String( results ) ;

szResultat = '+++ whatsapp msg sent. RC ('+ sndRC + ').' ;

res.status( 200 ).send( szResultat ) ;

} ) ; // run

} ) ; // enviar mensage whatsapp

===

Thanks for any clue.

SpcCmdrCadonius (author)2016-07-16

I see that it charges 0.89, will it charge every time you send a message, or only once?

PaulM408 (author)2016-06-29

Works great! Be a little patient on Pi1 as building takes 15 min's (walk the dog, grab a coffee) and the console will appear dead (run "top" in a second terminal session to see what's going on and see cc1 eating all the processing capacity).

Had to upgrade six 1.8 on my machine to >= 1.9 by:

sudo apt-get install python-pip (if you're on python 2.7)
sudo pip install --upgrade six
...which upgrades six to 1.10. Ran installer again, now without complaints.

JosuaR (author)2016-06-24

Hello Guys,

i want to use yowsup to answer with a fixed type of text when a fixed message gets in.

For example: I send "Hello" to yowsup and it responds with "Hello You".

The Problem is that it should only response by "Hello" and not when "Hello" is written in a long text.

Can you give me a example?

I have no experience with python...

RoyL33 (author)2016-06-22

Hi, I manage to send a message over. Before typing the message send command, I first had to type "/L" without quotes to login, and then type the message send command to send it to your friend's number. I did it through bash command line.

RoyL33 (author)RoyL332016-06-23

I did not use RPI. Just ran an instance of yowsup client via Git Bash CLI.

BhanuR9 (author)2016-06-09

Hi ,

I am having a problem while requesting code, after requesting for code it says status:fail

retry_after: 3600

reason: no_routes

RoyL33 (author)BhanuR92016-06-22

did u input the correct mcc and mnc values from your country and telecom service provider?

BhanuR9 (author)RoyL332016-06-22

Yes those are correct but not sure because of some issue it didnt worked out for me. But I am able to test my account using below link https://api.telegram.org/bot123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11/getMe which has to be replaced with your own token

RoyL33 (author)BhanuR92016-06-22

u need to add a config file in yowsup directory. that file contains the pwd generated from the previous command.

RoyL33 (author)BhanuR92016-06-22

i didnt use rpi. i just use git bash command line. i only can send message to 1 of my friend, but unable to broadcast to many friends.

BjörnK10 (author)2016-05-18

Hello, i have a problem, please help me:

sudo yowsup-cli demos --yowsup --config config

yowsup-cli v2.0.15

yowsup v2.4.103

Copyright (c) 2012-2016 Tarek Galal

http://www.openwhatsapp.org

This software is provided free of charge. Copying and redistribution is

encouraged.

If you appreciate this software and you would like to support future

development please consider donating:

http://openwhatsapp.org/yowsup/donate

Yowsup Cli client

==================

Type /help for available commands

[offline]:/L

Auth: Logged in!

[connected]:Traceback (most recent call last):

File "/usr/local/bin/yowsup-cli", line 5, in <module>

pkg_resources.run_script('yowsup2==2.4.103', 'yowsup-cli')

File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 499, in run_script

self.require(requires)[0].run_script(script_name, ns)

File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1235, in run_script

execfile(script_filename, namespace, namespace)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.103-py2.7.egg/EGG-INFO/scripts/yowsup-cli", line 368, in <module>

if not parser.process():

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.103-py2.7.egg/EGG-INFO/scripts/yowsup-cli", line 268, in process

self.startCmdline()

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.103-py2.7.egg/EGG-INFO/scripts/yowsup-cli", line 297, in startCmdline

stack.start()

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.103-py2.7.egg/yowsup/demos/cli/stack.py", line 25, in start

self.stack.loop(timeout = 0.5, discrete = 0.5)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.103-py2.7.egg/yowsup/stacks/yowstack.py", line 187, in loop

asyncore.loop(*args, **kwargs)

File "/usr/lib/python2.7/asyncore.py", line 216, in loop

poll_fun(timeout, map)

File "/usr/lib/python2.7/asyncore.py", line 201, in poll2

readwrite(obj, flags)

File "/usr/lib/python2.7/asyncore.py", line 123, in readwrite

obj.handle_error()

File "/usr/lib/python2.7/asyncore.py", line 108, in readwrite

obj.handle_read_event()

File "/usr/lib/python2.7/asyncore.py", line 449, in handle_read_event

self.handle_read()

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.103-py2.7.egg/yowsup/layers/network/layer.py", line 88, in handle_read

self.receive(data)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.103-py2.7.egg/yowsup/layers/network/layer.py", line 96, in receive

self.toUpper(data)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.103-py2.7.egg/yowsup/layers/__init__.py", line 75, in toUpper

self.__upper.receive(data)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.103-py2.7.egg/yowsup/layers/stanzaregulator/layer.py", line 29, in receive

self.processReceived()

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.103-py2.7.egg/yowsup/layers/stanzaregulator/layer.py", line 49, in processReceived

self.toUpper(oneMessageData)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.103-py2.7.egg/yowsup/layers/__init__.py", line 75, in toUpper

self.__upper.receive(data)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.103-py2.7.egg/yowsup/layers/auth/layer_crypt.py", line 65, in receive

self.toUpper(payload)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.103-py2.7.egg/yowsup/layers/__init__.py", line 75, in toUpper

self.__upper.receive(data)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.103-py2.7.egg/yowsup/layers/coder/layer.py", line 35, in receive

self.toUpper(node)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.103-py2.7.egg/yowsup/layers/__init__.py", line 75, in toUpper

self.__upper.receive(data)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.103-py2.7.egg/yowsup/layers/logger/layer.py", line 14, in receive

self.toUpper(data)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.103-py2.7.egg/yowsup/layers/__init__.py", line 75, in toUpper

self.__upper.receive(data)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.103-py2.7.egg/yowsup/layers/axolotl/layer.py", line 124, in receive

self.onMessage(protocolTreeNode)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.103-py2.7.egg/yowsup/layers/axolotl/layer.py", line 146, in onMessage

self.handleEncMessage(protocolTreeNode)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.103-py2.7.egg/yowsup/layers/axolotl/layer.py", line 231, in handleEncMessage

self.handleWhisperMessage(node)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.103-py2.7.egg/yowsup/layers/axolotl/layer.py", line 277, in handleWhisperMessage

encMessageProtocolEntity = EncryptedMessageProtocolEntity.fromProtocolTreeNode(node)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.103-py2.7.egg/yowsup/layers/axolotl/protocolentities/message_encrypted.py", line 53, in fromProtocolTreeNode

encNode.data.encode('latin-1') if sys.version_info >= (3,0) else encNode.data)

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.103-py2.7.egg/yowsup/layers/axolotl/protocolentities/message_encrypted.py", line 24, in setEncProps

assert encType in "pkmsg", "msg"

AssertionError: msg

Do you have an idea?

YasbethP (author)2016-04-06

whatsapp messages are already encrypted and does not work :(

CesarM26 (author)YasbethP2016-04-22

Continuas con el problema? He intentado todo pero sigue sin funcionar. Creo que si tiene que ver con la encriptacion. Has podido realizar algo? esto me tiene loco

YasbethP (author)CesarM262016-04-22

Lo que hice fue regresarme a una versión anterior de whatsapp y si me funciono suerte.

CesarM26 (author)YasbethP2016-04-23

Te regresaste a la version anterior en el cel? a que version regresaste. no he podido en serio. Me podrias colaborar. lo agradeceria mucho

AngelMusic (author)CesarM262016-04-25

¿Cual es el error que te marca CesarM26? Yo lo instalé y todo muy bien, solo tenía un problema pero lo solucioné, así que si es el mismo problema yo te puedo ayudar. Saludos.

CesarM26 (author)AngelMusic2016-04-28

Ya funciona. Solo volvi a instalar y listo. lo que si me sucedio es que lo intente usar al tiempo en dos Raspberry y whatsapp lo bloqueo. al parecer. solo se debera usar en uno solo al tiempo y cuando quiera cambiarlo, toca volver a solicitar el registro para que whatsapp no muestre actividad sospechosa y lo bloquee. es bueno para que lo tengan en cuenta.

YasbethP (author)CesarM262016-04-28

Hola amigo no tuviste problemas con la encriptacion de los mensajes? Es que a mi lo que me paso fue eso de que whatsapp actualizo y ya sus mensajes esta encriptados y tuve que poner una versión antigua de whatsapp en mi android para que volviera a reconocer los comandos.

CesarM26 (author)YasbethP2016-04-28

No tuve inconveniente con la encriptacion. Luego de reinstalar, en la raspberry funciono sin problemas. no requiero de un dispositivo movil para usarlo. Ahora el inconveniente que tengo es poder enviar imagenes.

CesarM26 (author)2016-04-28

Requiero ayuda con lo siguiente. Necesito crear una alerta por medio de una imagen. En estos momentos puedo hacer el envio de mensajes dentro de la consola. cuando ingreso a: "yowsup-cli demos -c config -y" utilizando /image send <numero><ruta_imagen>.

Pero quisiera que se pudiera enviar la imagen por medio de una sola instruccion como se hace con los mensajes: "yowsup-cli demos -c config -s 57xxxxxxxxxx <mensaje>"

Alguien que me pueda dar una luz. la verdad por mas que intento mirar el codigo, no se como podria hacer.

ErrikS (author)2015-09-13

can't connect after login

[offline]:/L

general: Login Failed, reason: not-authorized

Auth Error, reason not-authorized

use WART.exe https://github.com/mgp25/WART/blob/master/WART.exe
register again! get the second password ;)
(update your password in zap.conf)

yowsup-cli demos --yowsup --config zap.conf

About This Instructable

244,891views

253favorites

License:

More by emmeshop:Roast Coffee With Artisan and PhidgetsRaspberry datalogger with Mysql Highcharts Remote control with Raspberry Pi and Phidget WebService
Add instructable to: