Android voice control "Ok Google" like "Google Home" for free!

Moderator: leecollings

Wob76
Posts: 110
Joined: Wednesday 19 April 2017 6:31
Target OS: Linux
Domoticz version:
Contact:

Re: Android voice control "Ok Google" like "Google Home" for free!

Post by Wob76 »

Hi Han,

Thanks for the reply, I have managed to get Google Assistant to Domotizs to work, using similar steps to you. But I thought you were able to get a response to a request for temperature.

At the moment the part really missing is "Ok Google, What is the temperature in the room?" I have read this may be possible with Google Translate and using the Chromecast function of the Home, but it will require some middleware to work.

Wob

Sent from my SM-G935F using Tapatalk

DutchHans
Posts: 229
Joined: Friday 03 April 2015 20:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Germany (near dutch border)
Contact:

Re: Android voice control "Ok Google" like "Google Home" for free!

Post by DutchHans »

Hi Wob,

Here is what I did.
I created a dummy switch, for example SpeakLivingroomTemp.
To get notifications on my Android device I installed AutoRemote.
Than I created a very little script like this:

Code: Select all

commandArray = {}
 
LivingroomTemp = otherdevices_svalues['Temperature Livingroom']:match("([^;]+)")
LivingroomTemp = tonumber(LivingroomTemp)

LivingroomTempText = "The temperature in the livingroom is " .. LivingroomTemp .." degrees Celcius."
LivingroomTempURLtext = string.gsub( LivingroomTempText, " ", "%%20")

if devicechanged[' SpeakLivingroomTemp'] == 'On' then
   
  commandArray['OpenURL']='https://autoremotejoaomgcd.appspot.com/sendnotification?key=XXXXXXXXXXXXXXXXXXXX&title=Message%20of%20the%20house&text='..LivingroomTempURLtext..'&url=xxxxxxxxxxx.myfritz.net:8080'
  commandArray[' SpeakLivingroomTemp']='Off'

end 

return commandArray
In IFTTT I've made an applet as described in my previous post.
So now I can switch the dummy(SpeakLivingroomTemp) to On with my voice which results in a notification on my phone.
Than to let it speak the notification I installed Voice Notify on my phone. A free Android app that is highly configurable and speaks the notifications out loud the moment they arrive. I only let it speak the message, not the title...

Result:
OK Google
[bleep]
What is the livingroom temperature?
Hold on, I will check
The temperature in the livingroom is 21 degrees Celcius.


That is all.
Cheers, Hans
Wob76
Posts: 110
Joined: Wednesday 19 April 2017 6:31
Target OS: Linux
Domoticz version:
Contact:

Re: Android voice control "Ok Google" like "Google Home" for free!

Post by Wob76 »

Thanks for the info Han,

I might look at a combination of what you have done for phones and look into using Google Translate\Chromecast to make the Google Home speak.

It would be nice if IFTTT could read web responses back, it has "This" support for webhooks, but no "That" support for google assistant.

Hopefully Domoticz might get more inbuilt Google Assistant support in the future.

Wob
DutchHans
Posts: 229
Joined: Friday 03 April 2015 20:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Germany (near dutch border)
Contact:

Re: Android voice control "Ok Google" like "Google Home" for free!

Post by DutchHans »

I'd rather have the notifications on my phone.. I have them everywhere, garden, upstairs, even when I am not at home.
Kruu
Posts: 49
Joined: Tuesday 17 January 2017 20:27
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Contact:

Re: Android voice control "Ok Google" like "Google Home" for free!

Post by Kruu »

Cant get it to work, the link is OK, work in a browser. But when activate "OK Google" it say that there are no devices added to google home.
megamarco83
Posts: 108
Joined: Friday 21 September 2018 15:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Android voice control "Ok Google" like "Google Home" for free!

Post by megamarco83 »

mlamie wrote: Tuesday 20 December 2016 14:04

It is really simple and works great! I will impress my family during the christmas holiday :lol:
hi, i'm using automate app as sugested in first post, and all woks very good.
now i would like to implement a new command:
"set blind one at 6%"
how i can use automate app to recognize the "double command"? (i mean percentage associate to a blind)

for eample:
i say OK Goole
then the command: set blind one at 6%
automate should reconize the command and send this json:
192.168.0.105:8080/json.htm?type=command&param=switchlight&idx=70&switchcmd=Set%20Level&level=6

(id=70 is my adress of blind one)

how i can use block inside automate app to recognize that?
thanks
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests