Whatsapp aka. yowsup helper functions

thanks!

Same error - could be my formatting of the json, although the log looks okay… but if you could kindly post an example rule that would help eliminate this as a problem…

2018-12-30 15:21:10.652 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.whatsapp.handler.WhatsAppHandler@6d3583d1': javax.json.spi.JsonProvider: Provider org.glassfish.json.JsonProviderImpl not a subtype

which OH version are you running?

try this build - I switch to an older version of the JSON partner (used by the homekit binding)
https://github.com/markus7017/org.openhab.binding.whatsapp/blob/beta1/target/org.openhab.binding.whatsapp-2.4.0-SNAPSHOT.jar

thanks for persevering - but still doesn’t work…

I’m using the 2.4.0 release build

try this build - I fixed a type in the package file: x
https://github.com/markus7017/org.openhab.binding.whatsapp/blob/master/target/org.openhab.binding.whatsapp-2.4.0-SNAPSHOT.jar

I copied this build on my prod-Pi and it works fine.

that works - thank you!

So text sending/receiving and image sending works fine. Video sending does not work (but I don’t care!)

uff, good news :wink:

Could you send video, audio, document on the CLI level?

In general receiving media files doesn’t work. yowsup shows only encrypted files and I didn’t get through how to decrypt them. I’m wondering, because I saw posts wehere people are doing this with the same fork.

Most important for now is to create a proper tutorial how to setup yowsup. Could you please review the README and add things from your experience As you wrote you did the setup several times. Maybe we could create a script, which simplifies the process (apt-gets, some checks etc.)

@dan12345, do you know of any good docker image which encapsulates the yowsup script? That would make deployment even easier, I guess.

1 Like

sorry, know nothing about docker.

The most annoying complication with yowsup: you have to uninstall pyOpenSSL (the python 3 openssl library). The problem is that I use certbot to automatically renew my https certificate with letsencrypt, and certbot requires pyOpenSSL.

So my https renewing script now has to install pyOpenSSL, run the rest of the script, remove pyOpenSSL and then restart the whatsapp binding.

No doubt other people will run into similar problems…

o.k., in that case, I will try to come up with a docker image, and then later on add this information to the README.

For now, I am still waiting for O2 / Telefonica to send me my fresh SIM so I won’t accidentally kill my main WhatsApp account :stuck_out_tongue:

note it’s not just that it could accidentally kill your main whatsapp account - once yowsup is running then you can’t use that number for whatsapp on a mobile phone (or other device).

A docker image is a good idea, this allows to put yowsup on top of an existing installation and simplifies the setup (in fact that’s the only hurdle, the binding is very easy to install). However, the README should give also guidance to users not using Docker (like me :slight_smile: ).

Be aware to follow the “make the SIM ready-to-use” advise. Don’t try to register with yowsup first and start sending SMS, this will block your number. Start “regular usage” in a phone, send messages to all contact numbers you want to notify later before moving to the yowsup installation. I “burned” the first SIM, but the 2nd try went fine with some patience and is now working for weeks (which doesn’t means that WA could change theire detection strategy on any day).

HappyMessaging :slight_smile:

Still very interested in the Whatsapp thing, which SIM did you guys buy?

the type of SIM doesn’t matter. You could use any prepaid SIM. This has to be installed in a phone and registered by the WhatsApp app. After using it a while you could register the MSISDN for yowsup and don’t need the SIM anymore. However, you can’t use this number in parallel to yowsup!

1 Like

I splittedthe README into

Please make sure to read also the yowsup installation guideline,

1 Like

Are you planning to make a official market binding?
The question is basically if whatsapp doesn’t want inofficial repos like this …

I already thought about that. I general your are right, but there are various yowsup repos etc.
Not sure what would happen if this goes to the Eclipse market place, so for know I keep it shared in the community only.

fyi: While updating the README I was wondering why I defined a separate channel for inbound and outbound messages. I think the 2x2 channels could be merged to 2x1, so this might change in an upcoming version.

Other ideas / things you like to see?

Please contribute to the README while making your own experiences or solving installation problems etc. I’m happy to merge them into the repo.

I’d probably prefer to keep the two channels separate…

one feature that would be handy is a channel showing if there is a live connection to whatsapp, i.e. to trigger an alert if the connection breaks.

Living in Germany, I bought a pre-paid SIM from O2 / Telefonica.

Just buy any SIM that has no monthly charges, and since you will be using in only where you already have internet connection, the SIM should work indefinetely :smile:

I’m coming from germany too, how much did you pay? :slight_smile:
Perfectly fine, solange man damit nicht auf dem Land rumrennt, eine Datenautomatik bekommt oder den Service kontaktieren muss hehe :stuck_out_tongue_winking_eye:

Thought about contacting some maintaners to ask for advice?
There are lot of people requesting this solution, would be worth a try …