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

Wob76
Posts: 55
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 » Monday 21 August 2017 23:38

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: 248
Joined: Friday 03 April 2015 20:44
Target OS: Raspberry Pi
Domoticz version:
Location: Germany (near dutch border)
Contact:

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

Post by DutchHans » Tuesday 22 August 2017 8:36

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: 55
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 » Tuesday 22 August 2017 8:45

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: 248
Joined: Friday 03 April 2015 20:44
Target OS: Raspberry Pi
Domoticz version:
Location: Germany (near dutch border)
Contact:

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

Post by DutchHans » Tuesday 22 August 2017 8:52

I'd rather have the notifications on my phone.. I have them everywhere, garden, upstairs, even when I am not at home.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests