mikejac / node-red-contrib-google-smarthome

A collection of Node-RED nodes to control your smart home devices via Google Assistant.
GNU General Public License v3.0
116 stars 36 forks source link

Trigger a conversation/challenge (Programmatically) #451

Closed coxifred closed 9 months ago

coxifred commented 9 months ago

Trigger a conversation/challenge (Programmatically)

Hi, thanks for the awesome job ! I'm looking for a way to trigger a conversation programmatically (Google Home will be the first to talk).

Use case:

Someting is detected at my door. Nodered detect it and trigger the conversation in Google Home.

1) GoogleHome >: Hey Fred, something is detected at your door ! Do you want to do something ? 2) Fred >: (without saying Hey Google, because a conversation has been initiated) : Yes, light on the porch !

Is anybody succeed to do this ?

The alternative is to cast a message to googlegome, but, after that, i would have to say : Hey Google, Light on the porch.

Thanks

Caprico85 commented 9 months ago

Hi,

this is not possible with node-red-contrib-google-smarthome.

You can let your speaker play a message that somebody is on your door using spoken notifications as documented on https://github.com/mikejac/node-red-contrib-google-smarthome#sending-spoken-notifications. But these notifications are predefined by Google. You can not define your own messages. And there is no way to initiate a conversation or follow-up actions from there. Google's smart home API does not support that.

I don't know if it's still possible to build custom conversations at all. There were conversational actions, but they were deprecated a while ago (https://developers.google.com/assistant/conversational/overview?hl=en). I have no idea if there are alternatives and if these alternatives can be used to programmatically trigger a conversation.

coxifred commented 9 months ago

Hi Thanks for the response Caprico, finally all theses smarthome objects needs more time to progress.

i'll use cast notifications.

Fred