giuseppecastaldo / ha-addons

Home Assistant Whatsapp Add-on
Apache License 2.0
49 stars 18 forks source link

sending message to group #14

Closed Spartacus68 closed 1 year ago

Spartacus68 commented 1 year ago

Hi, the mechanism to send messages to groups is not working, due to the fact, that there is no possibiliy to extract the group-id in the formt 49123456789-1426340220@g.us. All new group ids are in the format: https://chat.whatsapp.com/KOo4uNwF6FT7I4a10XsOj9, where the code after .com / is the new group id and this is currently not working with this version. If there is a workaround, please let me know, or put this into the documetation.

giuseppecastaldo commented 1 year ago

Hi, the mechanism to send messages to groups is not working, due to the fact, that there is no possibiliy to extract the group-id in the formt 49123456789-1426340220@g.us. All new group ids are in the format: https://chat.whatsapp.com/KOo4uNwF6FT7I4a10XsOj9, where the code after .com / is the new group id and this is currently not working with this version. If there is a workaround, please let me know, or put this into the documetation.

The group-id can be found only in the received events.

Spartacus68 commented 1 year ago

Hi,

thank you very much for your reply and sorry to bother you again. But do you have a clue how it can be extracted from the message/event? I found nothing about it! There are different cli-tools available (yowsup-cli) but curretly nothing is working.

I would be vry helpful if you can give some hints! Regards, Spartacus

------ Originalnachricht ------ Von "giuseppecastaldo" @.> An "giuseppecastaldo/ha-addons" @.> Cc "Spartacus68" @.>; "Author" @.> Datum 24.01.2023 19:23:42 Betreff Re: [giuseppecastaldo/ha-addons] sending message to group (Issue

14)

Hi, the mechanism to send messages to groups is not working, due to the fact, that there is no possibiliy to extract the group-id in the formt @.*** All new group ids are in the format: https://chat.whatsapp.com/KOo4uNwF6FT7I4a10XsOj9, where the code after .com / is the new group id and this is currently not working with this version. If there is a workaround, please let me know, or put this into the documetation.

The group-id can be found only in the received events.

— Reply to this email directly, view it on GitHub https://github.com/giuseppecastaldo/ha-addons/issues/14#issuecomment-1402391805, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5CTFHMTWF3FQLXUOMYYXELWUAM25ANCNFSM6AAAAAAUFFLKPI. You are receiving this because you authored the thread.Message ID: @.***>

giuseppecastaldo commented 1 year ago

Hi, thank you very much for your reply and sorry to bother you again. But do you have a clue how it can be extracted from the message/event? I found nothing about it! There are different cli-tools available (yowsup-cli) but curretly nothing is working. I would be vry helpful if you can give some hints! Regards, Spartacus

In the developer tools of Home Assistant listen to event 'new_whatsapp_message' and view key.remoteJid section.

Spartacus68 commented 1 year ago

Hi,

thanks for your great support, theroetically it work :-)

But for your information: The message, sent by your addon is not delivered to the destination group. Instead of the sent message there is a message from whatsapp :

analogous translation from german: " Please wait for the message and make sure that the sender is using the latest version of whatsapp"

It seems to be that whatsapp recognizes that the message is sent by a foreign app. Strangely enough everything works, when addressing a single phonenumber!

I am very happy about the addon and i appreciate your work! If you consider working out a solution for this issue, I will be very happy to support you. Please let me now, how I can help!

Regards, Spartacus.

------ Originalnachricht ------ Von "giuseppecastaldo" @.> An "giuseppecastaldo/ha-addons" @.> Cc "Spartacus68" @.>; "Author" @.> Datum 24.01.2023 20:29:50 Betreff Re: [giuseppecastaldo/ha-addons] sending message to group (Issue

14)

Hi, thank you very much for your reply and sorry to bother you again. But do you have a clue how it can be extracted from the message/event? I found nothing about it! There are different cli-tools available (yowsup-cli) but curretly nothing is working. I would be vry helpful if you can give some hints! Regards, Spartacus … <#>

In the developer tools of Home Assistant listen to event 'new_whatsapp_message' and view key.remoteJid section.

— Reply to this email directly, view it on GitHub https://github.com/giuseppecastaldo/ha-addons/issues/14#issuecomment-1402480308, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5CTFHJWBJ7MGCG2TEYZINDWUAUS5ANCNFSM6AAAAAAUFFLKPI. You are receiving this because you authored the thread.Message ID: @.***>

PSXDupe commented 1 year ago

Is it possible you could explain step by step how to get the group-id.

I have tried to listen to event "new_whatsapp_message", but what do I need to do to trigger a message that will show the group id. I am completely new to this.

Hellis81 commented 1 year ago

new_whatsapp_message

Listen to event and it will look like this:

image

data.key.remoteJid is the string you need to use in the send message:

image