Page 1 of 1

trigger Google Assistant with domoticz via "text query" : Google home is a bridge for domoticz

Posted: Tuesday 21 August 2018 15:58
by fpatou
Hello,

Currently it is rather "simple" (and free) to use the voice to trigger domoticz scenes via:
Google Assistant => IFTT => domoticz.

But is it possible to do the opposite via google assistant text query ? :

domoticz => Google Assistant=>Google Home to trigger a scene

I explain myself ,I try to drive the scenes of the broadlink rm mini 3 via domoticz without any local installation of RM bridge.
I was able to "plug" those scenes with google home and use them with the voice via a google assistant whit google home mini: it works ! meaning Google home plays the role of a bridge for broadlink.

If we go further we can imagine that google home could even be a "global bridge" for all that is compatible with google home.(Philips HUE,Samsung SmartThings etc...etc....)

But how to call google Assistant requests from domoticz?

After multiple search I managed to run a python script with query_text parameter on domoticz calling google assistant!

So I tried to trigger a scene of Broadlink rm mini 3 and .... bingo! it works

tested with domoticz PI3 and Windows with an on/off button calling python script : no problems !

to do it :

follow the step by step from google here "Embed the Google Assistant":
https://developers.google.com/assistant ... ce/python/

Then test with this script:
https://github.com/googlesamples/assist ... xtinput.py
Script that I have updated to add parameter like 'activate light in living room'.

I can now trigger all the google home devices without any local software bridge installation for domoticz : google home is The bridge !
Meaning as soon as google home have devices compatible...this is compatible with domoticz !!!!!!
Meaning google home via google assistant become a secured bridge hosted in the cloud for domoticz!

of course without network....you will have to walk to the button :D

If we go again further....just imagine : query to google assistant give answer in the script, that can be parsed ....

if you are interested to get more detail let me know.

find files and other details (in french) for pi installation at the end of that post :
https://easydomoticz.com/forum/viewtopi ... 814#p57814

Thank you

Re: trigger Google Assistant with domoticz via "text query" : Google home is a bridge for domoticz

Posted: Monday 24 December 2018 13:28
by Pixal
I don't understand why you have no responses to this but I'm interested and will try this out sometime. I'm up to another (above my paygrade) challenge.

I want Google Home to initiate the conversation and talk to me instead of the other way around. For example, I've got tons of situations where I would like Google Home to talk to me. When the Alarm goes off i want Google to say "get out of here, an alarm has been triggered" or, "say the secret passcode within 30 seconds to stop the alarm".

But I also would like Google to talk to me and ask if it's ok to turn off the lights and heater. I've got a few motion detectors in the living room so I had set them to switch off lights and heat when there's no motion for one hour. But sometimes I'm sitting very silently for hours and everything suddenly shuts down around me, it would be good to get a heads up from Google, "turning off lights in 10 minutes".

Am I the only one who wants to explore these kind of things? I have played around with Home Assistant once and noticed I could send texts to Google Home and she would say them but haven't found it in Domoticz yet.

Re: trigger Google Assistant with domoticz via "text query" : Google home is a bridge for domoticz

Posted: Wednesday 26 December 2018 11:06
by fpatou
Pixal wrote: Monday 24 December 2018 13:28 Am I the only one who wants to explore these kind of things? I have played around with Home Assistant once and noticed I could send texts to Google Home and she would say them but haven't found it in Domoticz yet.
Hello...

With the google assistant installed in Domoticz as mention in this thread, you can send "text query" to google home from domoticz...
The google home "broadcast" feature is THE answer (https://github.com/endoplasmic/google-a ... /issues/52), if this would
be possible of course all 3 tier framework (stream2chromecast for instance) would be useless but for time being i did not succeed to make it work, but for sure i will dig it cause as you, i need to have voice acknowledge for some actions.

Today the only "simple" option to make Goole home talking from assistant text query from domoticz is tu use IFTTT :
domoticz =>Google Assistant=>IFTTT=>Google Assistant.

Regards

Re: trigger Google Assistant with domoticz via "text query" : Google home is a bridge for domoticz

Posted: Thursday 10 January 2019 20:34
by puls8
fpatou wrote: Wednesday 26 December 2018 11:06 Today the only "simple" option to make Goole home talking from assistant text query from domoticz is tu use IFTTT :
domoticz =>Google Assistant=>IFTTT=>Google Assistant.
Hmm, how do you setup the first step? (domoticz =>Google Assistant)

Re: trigger Google Assistant with domoticz via "text query" : Google home is a bridge for domoticz

Posted: Friday 11 January 2019 2:13
by Dnpwwo
@fpatou and @Pixal,

Getting you home to "say something" from Domoticz when an event happens is possible today via https://github.com/dnpwwo/Domoticz-Goog ... /README.md.

This is still version 1 because it does not pause existing media and restart it afterwards but it is a start.

Re: trigger Google Assistant with domoticz via "text query" : Google home is a bridge for domoticz

Posted: Saturday 13 April 2019 0:33
by maximaxi
It is possible to have some examples to know how to use the routine
Thank you

Re: trigger Google Assistant with domoticz via "text query" : Google home is a bridge for domoticz

Posted: Saturday 13 April 2019 17:38
by fpatou
Hello once the script is saved use something like this :
ex: command ON un a switch :

script:///home/pi/env/bin/python3 /home/pi/script/gass5.pyw --device-model-id <your model id> --device-id <your device id> --query_txt "turn on the tv"

Then if your tv is compliant or if there is a Chromecast on it...domoticz trigger the event for instance if you come back home. Can be the same to switch off the lights on a dedicated schedule...

Regards

Re: trigger Google Assistant with domoticz via "text query" : Google home is a bridge for domoticz

Posted: Thursday 16 May 2019 14:13
by maximaxi
I ask if possible a step by step guide for how to use it within domoticz Thank you

Re: trigger Google Assistant with domoticz via "text query" : Google home is a bridge for domoticz

Posted: Thursday 16 May 2019 19:26
by freijn
Interesting !

Re: trigger Google Assistant with domoticz via "text query" : Google home is a bridge for domoticz

Posted: Thursday 16 May 2019 23:17
by maximaxi
Someone would be kind enough to give me a hand
for example to send a message when I press an iterrutore
and how to set up the script
Thank youImage



to do tests I could write it directly here

Image

if instead I have to call an example script in python it is possible to have an example
thank you

Re: trigger Google Assistant with domoticz via "text query" : Google home is a bridge for domoticz

Posted: Friday 26 June 2020 16:38
by arma_esiea
Hi,

This is already functional

Re: trigger Google Assistant with domoticz via "text query" : Google home is a bridge for domoticz

Posted: Wednesday 25 November 2020 17:24
by rezzalex
Hello @fpatou,

Very interesting, even more with the recent change of business model of IFTTT...
My Goal would be to pass a querry to Google Home that can "Arm" my wireless cam (already working with voice command, thanks to the manufacturer and Google), triggered from the DZ home presence that I have set-up.

I am using DZ in a container and :
- don't want to mess-up with what is working smoothly (and don't succeed in creating a python virtual env)
- don't want to reinstall everything (SDK) at every container update.

Also, I tried to use an existing Projet in Google Console but impossible to find the way to Register a device here, so I have created a new project in google console...

is it possible to separate the Script part (python, SDK, Script, token...) in a container and make DZ still able to call it ?