Google Assistant SDK : notify doesn't work

Hello,

I installed the google assistant SDK integration.

I tested this with success :

service: google_assistant_sdk.send_text_command
data:
  command: Streaming aan

But this doesn’t work :

service: notify.google_assistant_sdk
data:
  message: Dit is een test
  target:
    - Living Room

What is the target I have to set here ?
It’s also not clear to me, cause I have several chromecast in my living room and only want the notifcation on one speaker…

image

1 Like

Chromecasts don’t and never have received Broadcasts - so that’s not a worry.
As per the docs, the target should be a room in Google Assistant - which is obviously the case (though you might want to try it in lowercase because Home Assistant likes things in lower case).

The reality though, like many of us, is that you probably have IPv6 on your router, and broadcasts don’t work from the SDK if you have IPv6 (for silly security reasons).

You will probably find that if you go into your Google Assistant activity log - it will say that “something was broadcast” - from the Google Assistant in the cloud point of view, the command was received and was successful - but the SDK has a limitation that it will only broadcast to local speakers on the same network that it is attached to. And IPv6 makes the SDK believe that the speakers and the SDK are NOT on the same network.

I indeed find the info in het Google Assistant activity log, so that part is OK.

And what about this IPv6, what should I change (sorry, not my kind of stuff…) ? I see this in my router :

And a simpel question : if I have 2 speakers in the same room and only want to broadcast to one, I will have to put them in a separate room (for Home Assistant) ?

I honestly wouldn’t recommend that you mess about disabling IPv6 - if everything else on your network is already working. This is a Google problem (that has been going on for a long time) and it’s down to Google to find a way to fix it - especially given how vocal Google have been about the world adopting IPv6 in the first place.

Yes, your speakers would need to be in different rooms in Google Assistant. I honestly didn’t know until this announcement that you could now target broadcasts to specific rooms, my previous broadcasts have always been to all speakers attached to my account.

I’m staying to think my own way around this IPv6 issue - is going to be to have an old Android phone near a Google speaker, running the Home Assistant app - and I’ll just have to send TTS notifications to the old phone basically saying: “hey Google, broadcast [ my message ]” and then the speaker will hear it and broadcast the message.

Edit:
For what it’s worth, I tried disabling IPv6 on the Home Assistant machine itself so I know it only has an IPv4 address, but Google Assistant SDK still won’t broadcast to the speakers

In summary : that Google Assistant SDK integration is only useful for the service “google_assistant_sdk.send_text_command” (for which I currently have no application) ?

2 Likes

Yup. Though it will work fine for people without IPv6 on their network too - for doing broadcasts. I used to use Google Assistant Relay and POST stuff to broadcast to it. But it like all the other projects using Google Assistant SDK stopped working for broadcasts, when Google made the change - to prevent someone from being able to issue broadcasts when they were outside of the network - for security reasons.

Greetings Christian and Andrew,

I went through and setup the SDK as instructed by the release doc. I am able to get the Integration added within HA no problem and I am able to create the API and credentials on Google Cloud without an issue. (i have do it before when integrating my nest thermostats). However, for some odd reason, with them both being setup I am unable to get any service commands to go through.

The HA logs show no activity and neither does the Google Cloud Log Explorer.

Any thoughts?

Did you checked the “Publishing status” is not set on “testing” (I had that problem :wink:) ?

I will continue with “tts.google_say”, this works fine for me.

Hey Christian,

It is certainly worth checking. I will report back soon with my findings.

It appears to be in production mode.

I wonder if this is an issue regarding me using duckdns for remote access.

I did setup this Google ask integration using my local IP address (193.168.xx.xxx)

Hmm… :thinking:

Great news!

I did absolutely nothing but login and take that screenshot for you moments ago.

I just decided to try the broadcast and message functions once again and they are all working 100% with a fast response time. (for now) My assumption is that the Google servers were just on the fritz yesterday. :man_shrugging:

Attached to this post and screenshots of three successful attempts:

  • Broadcast all
  • Broadcast to a specific speaker
  • Send a command to my Google Home

Screenshot_2023-01-07-09-47-26-44_c3a231c25ed346e59462e84656a70e50
Screenshot_2023-01-07-09-46-15-33_c3a231c25ed346e59462e84656a70e50
Screenshot_2023-01-07-09-45-19-51_c3a231c25ed346e59462e84656a70e50

Interestingly.
I just gave it a go, and I can now make Broadcasts too!
I changed absolutely nothing on my end.

Do you actually hear something ?

I don’t…

In the activity log I see this :

You asked the Assistant to broadcast a message.

Alright.
Broadcasting to “Living Room”

So it seems to work, but I don’t hear anything :face_with_raised_eyebrow:

1 Like

Hey Christian,

I can confirm that when the integration was functioning for me on 01/07/23, the broadcast functions were fully functioning. I tested them while playing music and with speakers idle, in both cases the speaker played a prompt sound, then said “incoming broadcast” and then read the broadcast out loud.

That all said, today (01/09/23) none of the functions of the SDK are working for me.

  • No broadcast all (notify.google_assistant_sdk)
  • No broadcast target speaker(s) (notify.google_assistant_sdk)
  • No send text commands to google home. (google_assistant_sdk.send_text_command)

Since I have not changed anything in my integration configs or Google Home setup, I suspect the issues are on the Google Server side of things.

How about today Andrew?

I will use you as my “canary in the coalmine” :slightly_smiling_face:

Hold on I’ll test -

Yup - it’s working today.

Andy

Well darn… :confused:

Just a quick update, even though absolutely nothing was changed - the broadcast did not work tonight.

Here as stated in my first post…

And by the way, even the part that works has a long response time…unusable !