Community Hass.io Add-on: Google Assistant Webserver (broadcast messages without interrupting music)

if I use the command above if I write
turn on living room light … it will just shout “turn on living room light” but not actually executing the command

Correct?

I would use two boxes then: one for intercom, the other for giving commands

@AndBobsYourUncle
broadcast_message is working but google_command is not

AM I doing something wrong?

notify:
  - name: Google Assistant
    platform: rest
    resource: http://192.168.1.12:5000/broadcast_message  
  - name: Google Assistant Command
    platform: rest
    resource: http://192.168.1.12:5000/command?message=google_command
script:
  send_broadcast:
    sequence:
      - service: notify.google_assistant
        data_template:
          message: '{{ states.input_text.broadcast_message.state }}'
      - service: input_text.set_value
        data:
          entity_id: input_text.broadcast_message
          value: ''
  send_google_command:
    sequence:
      - service: notify.google_assistant_command
        data_template:
          message: '{{ states.input_text.google_command.state }}'
      - service: input_text.set_value
        data:
          entity_id: input_text.google_command
          value: ''
automation:
 - alias: Broadcast message
    trigger:
      platform: state
      entity_id: input_text.broadcast_message
    condition:
      condition: template
      value_template: '{{ (states.input_text.broadcast_message.state | length) > 0 }}'
    action:
      - service: script.send_broadcast
  - alias: Send Google command
    trigger:
      platform: state
      entity_id: input_text.google_command
    condition:
      condition: template
      value_template: '{{ (states.input_text.google_command.state | length) > 0 }}'
    action:
      - service: script.send_google_command

after update to 0.0.3 the service is not starting

Newbie question, can I use this without hass.io and docker ?
This is exactly what I’m looking for, trigger google assistant with text input. Actually, I’m already able to do that with an old Nexus 7 + Tasker and HTTP server but this is far from ideal.

I agree this could be expanded with more webhooks, I use this for example to trigger Netflix or Spotify on chromecast.

Tip for my french fellows: as you may know the broadcast functionality is not yet available in France. But if the text based google assistant is setup in english and the google home in french, you can still broadcast messages in french. I guess this should also work for the other languages where the broadcast is not yet available.

@anon35356645

What do you mean by the service is not starting after upgrade? I just tried updating my own copy to 0.0.3 and I can use both /broadcast_message and /command.

/command passes through the text as-is to the Google Assistant. So, if you are sending “this is a test” to /command it will not play anything. You need to send “broadcast this is a test” to /command to broadcast if you’d like, but it is not necessary if you’re using /broadcast_message for notifications.

The /command endpoint is for users that want to send other things to Google Assistant besides broadcast messages.

@chocomega

I’m assuming it is possible to get this installed on a computer without using Docker, but it’d be a bit difficult.

You’d have to essentially follow the commands in the Dockerfile to get it working, like installing the Python packages and so on.

now it starts, but the broadcast or command is not executed. I made some changes in my ssl, proxy, tls, certificate whatever shit, and now is not working.

i HOPE THEY COME WITH A UNIFIIED SOLUTION FOR THIS HTTP HTTPS BUZZ, EVERYTIME i TRY SOMETHING THERE IS A PROBLEM LIKE THIS

@anon35356645

Huh, then I’m assuming it is some sort of networking issue then. Have you tried to open http://[HASSIO LOCAL IP]:5000/broadcast_message?message=test in a browser?

yes tried, is not working.

BTW I have two HASSIO, one on pi3 and I updated your addon fine (but not working), and HASSIO on a Intel-NUC, and there it does not start

What is the Hass.io log look like for the add-on?

in the Intel-NUC HASSIO (which does not start is this)
Error grabbing logs: EOF

Ah, then Hass.io itself isn’t starting?

HASSIO on the Intel-NUC is starting fine (your addon not starting)

HASSIO on the pi3 is starting fine (your addon starting, this is the log
[Info] Install/Update service client_secrets file
[Info] Start WebUI for handling oauth2
[03/Jan/2018:18:37:49] ENGINE Listening for SIGTERM.
[03/Jan/2018:18:37:49] ENGINE Listening for SIGHUP.
[03/Jan/2018:18:37:49] ENGINE Listening for SIGUSR1.
[03/Jan/2018:18:37:49] ENGINE Bus STARTING
CherryPy Checker:
The Application mounted at ‘’ has an empty config.
[03/Jan/2018:18:37:49] ENGINE Started monitor thread ‘Autoreloader’.
[03/Jan/2018:18:37:50] ENGINE Serving on http://0.0.0.0:9324
[03/Jan/2018:18:37:50] ENGINE Bus STARTED

@anon35356645

That message Serving on http://0.0.0.0:9324 is the message you get if you have to go to that URL to authenticate with Google.

You might have lost your credentials somehow. So, after you go to that URL to re-authenticate, it should work again.

It’s weird, because when I just upgraded my version on my own Hass.io to 0.0.3, I didn’t have to re-authenticate.

So, http://[HASSIO LOCAL IP]:9324 is the URL to go to to re-authenticate.

yes I had to reauthenticate.

Which is the command for turn on a light in the broswer?

http://192.168.1.12:5000/command?message='turn on light’ …or?

@anon35356645

It’s basically just a Google Assistant. So, whatever you could normally tell Google Assistant to do, you can use /command to do it.

If you have the Google Assistant app on your phone, for instance, you can try out a variety of commands to see which ones do what you’d like.

this is working soits a progress, but in the UI frontend no

http://192.168.1.12:5000/command?message=turn+on+light

From a browser

the above works too.

Now I have the problem in my Intel-NUC HASSIO, in which your addon is not starting. Any clue?

Can I request that the api endpoint port becomes a configurable option. Running all this on my synology which uses port 5000 already for its web ui. I’ve hardcoded a change to 5100 for now in my own clone.