[Release] Assistant Relay V3.3 Beta

What application type did you select in the Google project? Needs to be TV and limited input device

Ah ok, that’s where I screwed up. Thanks, I’ll delete the project and try again.

Is anyone having issues where the text response is blank? For example, I ask what the time is, I get no text response, but I do get an audio response.
If this is you, please could you go to this issue, give it a +1 and comment on it. https://github.com/googlesamples/assistant-sdk-nodejs/issues/13

I’ve reached out to Google but they’re unable to find the issue so far. The more users we get +1’ing that issue, the better

What questions should it give a text response? I saw it really rarely, I thought that is an SDK limitation.

Not really, most things it should give a text response. What’s the weather? What’s the time?

They should give text responses

Ok, I see. I used before, is the garage door open, and that’s what I’ve got:

No text response given, click play to hear the audio

But I see, what is the time gives zero text response, not even the one above.

I tried one of the examples from the issue, but that actually works.

Who is the president of the united states
United States, President: Donald Trump.

Hmm, im not sure for you, unless its intermittent. For me, nothing gives a proper response :frowning:

I did a fresh installation yesterday (July 11) and everything worked fine. After seeing your comment and try it again, I am having the same problem now.

Then I try removing user then adding it back, it starts working again for an about hour. Then stops working.

Are you running in a Docker container?

I am not running docker.

What “stops working” exactly?

1 Like

In /bin/config.json

Can you screenshot just the responses section and edit your comment here: https://github.com/googlesamples/assistant-sdk-nodejs/issues/13

Just add a comment with the image to say that sometime you get no response, sometimes you get an actual response, and then sometimes you get a space as the response

1 Like

I came here to ask another question, and saw your comments so I tried some jokes from mine. All responded.

{
  "command": "Tell me a joke",
  "response": "Did you hear about the two antennas that got married?\nThe ceremony was okay, but the reception was great! 📺 ❤️",
  "timestamp": 1594854059912
},
{
  "command": "Tell me a joke",
  "response": "Why can't a bicycle stand on its own?\nIt's two tired 😴 🚲",
  "timestamp": 1594854753123
},
{
  "command": "Tell me a joke",
  "response": "What do cats eat for breakfast?\nMice crispies",
  "timestamp": 1594854768629
},
{
  "command": "Tell me a joke",
  "response": "Why does a duck have tail feathers?\nTo cover its butt quack",
  "timestamp": 1594854809478

As far as a question goes, is there anyway to send more than one command to google assistant in a piston? I’ve been trying to figure it out, but it seems like you can only use variables on the web request and the only variable that works is command. Is that correct?

1 Like

I think I’ve figured out how to have multiple commands for GAR in one piston. The command variable can use an expression which can use another variable that changes based on what I need it to change. That way I only have one command variable but the content changes depending on what the variable it’s calling in the expression calls for.

2 Likes

Something to note, I’m getting responses from jokes, but not my commands.

  "responses": [
    {
      "command": "Set living room tv to hdmi 1",
      "response": "",
      "timestamp": 1595048147938
    },
    {
      "command": "Turn on the xbox",
      "response": "",
      "timestamp": 1595062801045
    },
    {
      "command": "Set living room tv to hdmi 1",
      "response": "",
      "timestamp": 1595062813748
    },
    {
      "command": "broadcast Broadcasts delayed for 1 hour",
      "response": "",
      "timestamp": 1595097657781
    },
    {
      "command": "Tell me a joke",
      "response": "Why shouldn't you write with a broken pencil?\nBecause it’s pointless! ✏️",
      "timestamp": 1595130980168

That’s correct. You only get responses from questions etc, not commands

Ah, good to know, thought I had joined the bug club.

For those of you who want to use this in a docker container, i have been using this succesfully for a while;

This is my dockerfile:

FROM node:lts-stretch-slim
ENV LANG C.UTF-8

#--------------------------------------------------------------------------------
# Add depdencies
#--------------------------------------------------------------------------------
RUN apt-get update && \
	apt-get install -y unzip && \
	apt-get clean

#--------------------------------------------------------------------------------
# Set destination directory
#--------------------------------------------------------------------------------
WORKDIR /assistant-relay

#--------------------------------------------------------------------------------
# Download release
#--------------------------------------------------------------------------------
ADD https://github.com/greghesp/assistant-relay/releases/download/v3.3.2b/release.zip release.zip

#--------------------------------------------------------------------------------
# Extract and delete zip
#--------------------------------------------------------------------------------
RUN unzip release.zip && \
	rm release.zip

#--------------------------------------------------------------------------------
# Prepare for docker volume "/config"
#--------------------------------------------------------------------------------
RUN sed -i -e 's#config.json#/config/config.json#g' /assistant-relay/bin/registerDevice.js && \
	sed -i -e 's#./bin/config.json#/config/config.json#g' /assistant-relay/bin/www && \
	sed -i -e 's#./bin/config.json#/config/config.json#g' /assistant-relay/helpers/assistant.js && \
	sed -i -e 's#./bin/config.json#/config/config.json#g' /assistant-relay/helpers/auth.js && \
	sed -i -e 's#./bin/config.json#/config/config.json#g' /assistant-relay/helpers/cast.js && \
	sed -i -e 's#./bin/config.json#/config/config.json#g' /assistant-relay/helpers/server.js && \
	sed -i -e 's#./bin/config.json#/config/config.json#g' /assistant-relay/routes/cast.js && \
	sed -i -e 's#./bin/config.json#/config/config.json#g' /assistant-relay/routes/index.js && \
	sed -i -e 's#./bin/config.json#/config/config.json#g' /assistant-relay/routes/server.js

#--------------------------------------------------------------------------------
# Prepare for docker volume "/audio"
#--------------------------------------------------------------------------------
RUN sed -i -e 's#../bin/audio-responses/#/audio/#g' /assistant-relay/helpers/server.js && \
	sed -i -e 's#bin/audio-responses/#/audio/#g' /assistant-relay/helpers/server.js && \
	sed -i -e 's#../bin/audio-responses/#/audio/#g' /assistant-relay/routes/server.js

#--------------------------------------------------------------------------------
# Install depdendencies
#--------------------------------------------------------------------------------
RUN npm run setup

#--------------------------------------------------------------------------------
# Finish up
#--------------------------------------------------------------------------------
EXPOSE 3000

CMD ["npm", "run", "start"]

You build it with:

docker build -t <org>/google-assistant-relay:v3.3.2b  .

And use it like this in your compose file (this is just an excerpt of my own dockerfile, might not be complete but you get the idea):

version: '3.7'

services:
  ha-google-assistant-relay:
    image: <org>/google-assistant-relay:v3.3.2b
    container_name: ha-google-assistant-relay
    restart: unless-stopped
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Amsterdam
    ports:
      - 3000:3000
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ha-google-assistant-relay-audio:/audio
      - ha-google-assistant-relay-config:/config

volumes:
  ha-google-assistant-relay-config:
    external: true
  ha-google-assistant-relay-audio:
    external: true

I have created the 2 volumes on my NAS so i can store the config and audio externally from the image.

Hope this helps somebody (i don’t own a SmartThings hub so i won’t be here a lot) but wanted to give some credits to @ghesp

How does GAR differ from BigTalker2 and CastWebAPI?