core: notify.google_assistant_sdk not working with IPv6

The problem

According to the docs, a notify.google_assistant_sdk command should look like this:

service: notify.google_assistant_sdk
data:
  command: time for dinner

But this doesn’t work, because the notify.something command requires the message parameter. So when you try to execute the code above, it returns the error message:

Failed to call service notify.google_assistant_sdk. extra keys not allowed @ data['command']. Got None required key not provided @ data['message']. Got None

What version of Home Assistant Core has the issue?

core-2023.1.0b0

What was the last working version of Home Assistant Core?

never

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Google Assistant SDK

Link to integration documentation on our website

https://rc.home-assistant.io/integrations/google_assistant_sdk#service-notifygoogle_assistant_sdk

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 71 (27 by maintainers)

Most upvoted comments

The issue with notifications not working if IPv6 is enabled is a known issue. Each and every project based around the Assistant SDK has this same issue. Disabling IPv6 is imo a very bad idea in 2023. The Assistant SDK is a pretty old project not seen a lot of updates lately and I doubt if this particular issue is going to be fixed. Just to set some expectations here.

Also note that issuing a service call:

service: notify.google_assistant_sdk
data:
  message: time for dinner

Results in nothing occurring either.

Thanks for figuring out the incompatibility with IPv6. I’ve updated the documentation that you need to disable IPv6 for this to work. Unfortunately nothing more I can do. I’m closing this.

Well, sure but I have to warn you that is already the workaround for the last 5 years or so…

@home-assistant rename notify.google_assistant_sdk not working with IPv6

Could it be that these Google Cloud integrations don’t work with Workspace accounts, i.e. you need to use consumer accounts (gmail.com domain)? That was certainly the case when I setup the new Nest integration once Allan Porter made it available to HA.

I’m using a regular @gmail account

On 2023.01 text commands working broadcast via text command or the notify isn’t working nothing happens no errors etc.

I just turned off IPV6 at the router and it started to work immediately.

Sounds like YMMV

I think this is a general behavior that everyone has. It’s the same for me - all commands work except for the notification ones. From assistant directly (from phone or tablet) it works Google Console shows all requests without errors (even the notification/broadcast ones). I wish I could sniff the actual requests that google receives to find any differences…

The sad part is that the command properly reaches Google servers as I can see in “Activity” that it responds “Ok, broadcasting now” but nothing happens.

I fear Google is ignoring the request because it has “something” different than what it’s expecting and eats the error in the process. Is there a Python script I can run manually from the HA host machine to test this ?

You can activate debug from UI : CleanShot 2023-01-02 at 12 12 15

I just did some tests :

1. From Home Assistant

It doesn’t work.

Service call

service: google_assistant_sdk.send_text_command
data:
  command: "Annonce dans la cuisine: La fenêtre est ouverte" # Broadcast in the kitchen: The window is open

Logs

2023-01-02 10:18:03.350 DEBUG (MainThread) [homeassistant.components.google_assistant_sdk.helpers] command: Annonce dans la cuisine: La fenêtre est ouverte
response: OK. Je transmets ça à "Enceinte Cuisine". 

Translation of the response : "OK. I will broadcast this to “Kitchen Speaker”.

2. From my phone using Google Home App

It works with the same text.

Speaker broadcast

Annonce de Paul : La fenêtre est ouverte. (Translation : Paul's broastcast: the window is open).

Maybe the name of the sender is missing when using HA service?

Instead of following the previous instructions, if you update to 2023.1.0b4 and enable debug logging for the integration, you can inspect the debug log for the command and response.

if I do

service: notify.google_assistant_sdk
data:
  message: dit is een test
Scherm­afbeelding 2022-12-29 om 15 18 54

it works for all of my Google devices but the Google hub

click button

huge lag

green button

silly sound “incoming broadcast, it says:”

dit is een test

In this case it looks like the docs table suggests that message needs to be used but the example below the table shows command.

image

Also looks like even if message is used the service call does not work. https://discord.com/channels/330944238910963714/427516175237382144/1057752230457004053