WhatsApp integration share some experience

I just wanted to share my experience with the whatsApp-Integration made by Guiseppe Castaldo (big thanks bro!!!).

So why should I prefer Guiseppes WA-Integration or CallMeBot?
CallMeBot is good to send Messages at predefined numbers. New Numbers needs register for the service and needs to be registered everytime in the configarion.yaml WA-Integration can address new numbers on the fly and can also address groups.

So why should I use WA-Integration instead of Green-API or other WhatsApp-Services? These services use basically the official WhatsApp-API for Business. If you want to use this, you give basically full control over your WhatsApp account to thirdParty service. Whereas the WA-Integration is basically a remotecontrol of the WhatsApp for Web Interface. So basically you can do the same as you can in the WhatsApp for Web GUI. But both of them are able to address GroupChats.

  • Installation works perfectly as described in the readme.
  • For the easiest examples check the How to use which worked perfectly out of the box!

So no lets get a little deeper…

  • I intended to send some URL into a chat. But the Interface is breaking always, once the message text contains any URL (tested different ones, always same behaviour).
  • If you want to use functions not documented in the HowTo, it helps to unterstand, that Guiseppe made use of the Baileys-Framework (Big thanks to these guys!)
  • originally I wanted to send a GMAPS-Link(URL). But as this was buggy, so I checked up the Bailey documentation which was really helpful.

In the message-section you find all sorts of messages with descriptions of its parameters.

So I also found out e.g., that I can send a location with only the address name:

  - data:
      clientId: default
      to: [email protected]
      body:
        location:
          address: "Madison square New York"
    action: whatsapp.send_message

Hope, I could help some user of that Add-On to spare some time. And hopefully someone more experienced than me, can fix that issue with the broken URL-sending out of this fabulous Add-On.

1 Like

I am using this integration since some months and I really like it, thanks Giuseppe!
I registered on Whatsapp a spare SIM I had naming it Home Assistant and with HA Logo as picture so when I receive messages from the integration it is looking like HA is writing me :smiley:

1 Like

Thanks for this integration, it works well in a script. I use NODE-RED and I can’t get it to work:
Node Node-RED indicates that the message has left but it never arrives:
I use an action with “whatsapp.send_message” with the following sequence:

{
    "clientId": "default",
    "to": "[email protected]",
    "body": "test whatsapp"
}

thank for your helps

1 Like

Happy New Year for all.
Thank’s for the integration.
I try to send a message to a group. I don’t find the group number.
I found the GKIAjSfhOczA570iyUsfaY suffix for send a link in WhatsApp app but using [email protected] doesn’t work
Can somebody help me.
Thank’s
Found:
2. The following is valid for Chrome. Log in in WhatsApp web on a computer and open the group chat by clicking it on the left navigation table to see it on the right side. Open the development tools and move to the tab called “Elements”. Use CTRL+F to open search. Enter “g.us ”. Now you should find the groupId.
you fill find something “[email protected]_[followed by some other thing, which looks like another id, but is unrelevant]”.

1 Like

Hello from South America… I am not a programmer or coder, is the following format in JSON correct for me.:

{“clientId":"[email protected]”,“to”:"[email protected]",
“body”: {“text”: “Test from Node-RED”}
}

Hello, I was using the fantastic WhatsApp addon by Giuseppe Castaldo in my Home Assistant.
When the session initially configured with my WA instance disconnected, I was not able to create a new session.
In detail, also uninstalling and reinstalling the addon, I never get a new QR code to scan in Whatsapp.
Hao can I do to get a new QR code and, so, a new session?

Hello rbernard, not sure if you got it to work. If you go to the whatsapp addon, on the top there should be a tab named “configuration”. You can delete all your “clients”. Then to add a client, you just type in the name you want to give to the client. Lets say you go with “HAWhatsapp”, you type that in and hit save. Once click save it will prompt you to restart the addon. Once you restart it, you will get a notification via HomeAssistant telling you that you have to scan the QR code to link a device.

As of Monday August 11th, my whatsapp addon stopped working. I am a bit surprised that I haven’t been able to find anyone else posting about the same issue. I doubt it is an issue only affecting me.

In my setup, HA would only send whatsapp messages to one group I’ve created. Last message I got was Monday. After I started troubleshooting I found something very odd.

When I follow the instructions to send to a specific number, a message does go out but not as intended. Lets say I have phone number X registered on the addon. If I try to send a message to phone Y I ended up getting the message on phone X as if it was sent from phone Y. It is as if the from/to get inverted.

So when I get message on phone X supposedly from phone Y, when I reply, the reply doesn’t really make it to phone Y, it only shows one check mark.

When I try to send messages to a group, nothing happens.

Anyone else ran into this issue? If so where you able to fix it?

So I seemed to found half a solution. I got messages to single persons to work, but still can’t get groups to work.

I live in Mexico, country code is 52… then my phone number is 998XXXXXXX, to send a message to my number the format listed on the istructions is " [email protected]" and that doesn’t work anymore, what seems to work now is “[email protected]” and this works as well “[email protected]”

I was going to try the greenapi approach and when I got contacts I noticed they had the “1” between country code and phone number, so gave that a try and it worked. The groups IDs look the same on the greenAPI so not sure why they are not working

Hallo there is anyone who is experiencing this error message sending to groups?
[ERROR] default - Cannot read properties of undefined (reading ‘payload’)

I have already tried to reinstall component but nothing change, even recreating group

Same error i am getting.