Google home - Using routines for custom commands and getting a response

I'm using a number of routines in google assistant so I can operate things n hubitat like my blinds up (it's classed as a switch which triggers my servo motor and esp8266).

What I have noticed is that Google assistant doesn't give a verbal response but the voice command works.

Am I overlooking something obvious to have google assistant to talk back a custom response when I give a custom command (in routines)?

How are you triggering the custom command to run? Are you using Google Assistant Relay?

I was enabling the particular switches in the google home section of the apps page. Then creating a routine in Google assistant setup that send the command "certain switch On".

I thought the google assistant relay was for the other way, sending a switch state change from hubitat to google assistant, rather than google assistant to turn a switch state on in hubitat.

Maybe I should read a little more about the relay.

Okay...I was confused with which direction you were going. If you are trying to control something in HE from Google Assistant, then what you laid out may or may not work.

First, how are your Blinds being controlled in HE? Are the using Hubduino? If so, then you don't need virtual devices. These operate just like Dimmers so you can link them to Google Home. You can then control by using the "On", "Off", or "Dim to level" commands available in Google Assistant.

If your are using some other way to connect your blind to HE, then it would depend on the driver that you are using. If you give some more details I'm sure we can get something working for you.

Yes I'm usung hubduino.

I have commercial roller blinds that only work through ifttt and I have modified my Venetian Blinds with hubduino.

Reason I am using switches is that one switch (or dimmer) can change my roller blinds through ifttt (detect switch change) and my Venetian Blinds through hubduino.

At the moment I have a virtual dimmer which I slide on the dashboard that modifies 3x virtual switches to trigger three states. I make the switches available to google assistant only as the dinner was detected as a light so didn't want that turning off with light commands.

The lower values of the dimmer (I do this in the dashboard) fully close the blinds (activates the close switch using rules) , half way only opens Blockout roller blinds and opens the Venetians to a steep angle to keep privacy (activates privacy switch) , and slid most of the way up opens all blinds fully (activates the open switch). When each switch is turned on, it turns the others off.

I then use Google assistant routines to change the states of the switches. So "blinds open" triggers a routine action of "privacy blind switch on", "all blinds open" triggers google routine "open blind switch on" etc.

Maybe I have over complicated it, but it seems to work well other than not getting a response from google assistant.

Why are you controlling a virtual switch through a routine in Google Home? Why not just sync the virtual switch to Google Home? If you are trying to use custom phrases, check out IFTTT's channel for the google assistant instead. It is much more intuitive. You can specify the phrase you want to saw and how you want GA to respond to you and then when you create the action, you can control the virtual Switches directly with IFTTT. Personally, I would just control them through the virtual switch paired to Gooogle home to say "Turn on Blinds Closed" and have the virtual switch called "blinds closed".

1 Like

I use quite a few virtual switches in Google routines to trigger rules and I give them all custom responses. At the bottom of the list of Popular Actions in the Google routines is Custom responses "Say something". You can tell it how you want to respond as an action.

1 Like

That works too. Will it only respond on the one google home that you have issued the Routine through? It's not a broadcast to all of them?

Yes, just on the one I gave the command to. I've never really had any use case for a broadcast, so I'm not sure if that's possible in this way.

The routine is more for custom words. To say blind on or blind off doesn't make sense to me, so I use routines to add custom commands that then make the unusual action words of blind on or blind off.

I used to use ifttt for this and use Webhooks (my tasker automation) but iftt is slow and doesn't like some people's voice. So I stopped using it as it got problematic for all people to use voice automation I found.

I mustn't have scrolled far enough as I was was hoping there was something below.. But obviously didn't make it that far. I saw the play media of the routine but it seemed all music with no voice. Seems this custom response is in a different section outside the creation of the routine. I'll look at this when I get home but it sounds useful.

Well there you go. Right at the bottom under all the other things. Thanks for pointing that out. Custom responses work well and quickly.

1 Like