Page 1 of 3

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

Posted: Tuesday 20 December 2016 14:04
by mlamie
Image

I have made a tutorial how to setup voice control like "Google Home" on your android device. The best thing is that it is free and you can use all the languages which are supported by Google Now (even dutch).

https://mysmarthomeathome.blogspot.nl/2 ... oogle.html

It is really simple and works great! I will impress my family during the christmas holiday :lol:

Image

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

Posted: Tuesday 20 December 2016 16:05
by CaesarPL
Hi, I've just seen your post, thank you very much.

I've tried and followed your suggestions, build flow, command is 100% fine (as I've tested it in the browser, then put in http request, log shows that it is running, voice is recognized), but finally command is not run in domoticz. Any suggestions?

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

Posted: Tuesday 20 December 2016 16:09
by mlamie
CaesarPL wrote:Hi, I've just seen your post, thank you very much.

I've tried and followed your suggestions, build flow, command is 100% fine (as I've tested it in the browser, then put in http request, log shows that it is running, voice is recognized), but finally command is not run in domoticz. Any suggestions?
Hi can you advise the URL which you used? If you can see the HTTP request as indicated in my video (4:03) the voice is recognized, but probably the URL used is incorrect.

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

Posted: Tuesday 20 December 2016 18:55
by CaesarPL
Url is exactly as in your example (of course ip is different). It works under browser and switches my lights on, but not in Automate

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

Posted: Tuesday 20 December 2016 19:05
by CaesarPL
CaesarPL wrote:Url is exactly as in your example (of course ip is different). It works under browser and switches my lights on, but not in Automate
Excuse me... My fault! I forgot that I have authentication on. When provided - works perfectly! Thank you very much!

One and only drawback is that my language (Polish) is not supported everywhere in Android, only on Google Home

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

Posted: Tuesday 20 December 2016 20:38
by mlamie
Good to hear that it does work. I have included the comment of authentication in my blog post. P.s. I see Polish is supported in Google Now, so what do you mean?

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

Posted: Tuesday 20 December 2016 21:31
by CaesarPL
Yes, it is supported, however I can't turn 'From any screen' on. Just from the Google app. But this is mine, country specific, issue. I can always switch to English, I think.

Thank you very much for your help.

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

Posted: Tuesday 20 December 2016 21:34
by mlamie
I think you can incase you make English primary and Polish secondary.

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

Posted: Wednesday 21 December 2016 10:31
by dalecooper
Hm, tried this but google doesn't seem to redirect to the automate app but just returns some search results in the google now box instead of being picked up by the automate app...

EDIT: works after a reboot, neat!

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

Posted: Wednesday 21 December 2016 10:59
by mlamie
dalecooper wrote:Hm, tried this but google doesn't seem to redirect to the automate app but just returns some search results in the google now box instead of being picked up by the automate app...
Hi Dale, I updated the Automate flow a bit on my blog page (a small update). I included a "Toast show" box at the end of flow. This will give you a sreen popoup when HTTP request is ok.

If it does not work can you check the Automate log where it stops? It should show you:

Code: Select all

2016-12-20 14:14:33.717 INFO 12@1: Flow beginning
2016-12-20 14:14:33.718 INFO 12@2: Google Now voice command
2016-12-20 14:14:47.027 INFO 12@3: Expression true?
2016-12-20 14:14:47.028 INFO 12@2: Google Now voice command

2016-12-20 17:56:35.555 INFO 12@3: Expression true?
2016-12-20 17:56:35.563 INFO 12@4: HTTP request
2016-12-20 17:56:35.639 INFO 12@2: Google Now voice command
The fist section @ 14:14 does not show HTTP request so that failed.
The second section @ 17:56 does show the HTTP request so that did work.

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

Posted: Wednesday 21 December 2016 11:05
by dalecooper
Ah, just edited my previous message. It works after a phone reboot.

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

Posted: Thursday 22 December 2016 14:54
by mlamie
Good to hear that, I updated my blog post and I included a Interact box which will perform a tap back button so the Google Now search results will not be displayed. If someone has great examples or have any further improvements please advise.

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

Posted: Friday 30 December 2016 23:35
by sincze
A great post.

I tried "variable" -> livingroomon with "living room on" as text for google voice.
Even with the flash and back blox in place google directs me to the results of "living room on". in the automate log it does not say it executed the http command. What can I do to provide additional feedback to see where I went wrong??

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

Posted: Saturday 31 December 2016 8:08
by mlamie
sincze wrote:A great post.

I tried "variable" -> livingroomon with "living room on" as text for google voice.
Even with the flash and back blox in place google directs me to the results of "living room on". in the automate log it does not say it executed the http command. What can I do to provide additional feedback to see where I went wrong??
Can you give some more exact details? Like a snapshot of your flow and the url used?

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

Posted: Saturday 31 December 2016 11:00
by sincze
mlamie wrote:
sincze wrote:A great post.

I tried "variable" -> livingroomon with "living room on" as text for google voice.
Even with the flash and back blox in place google directs me to the results of "living room on". in the automate log it does not say it executed the http command. What can I do to provide additional feedback to see where I went wrong??
Can you give some more exact details? Like a snapshot of your flow and the url used?
Screenshot_20161231-105620.jpg
Screenshot_20161231-105620.jpg (23.7 KiB) Viewed 21325 times
This is the flow. Plain URL is working in a browser. I don't use authentication on my internal lan.

http://192.168.2.10:8080/json.htm?type= ... tchcmd=Off

I must have done something wrong in the flow. Image

Sent from my SM-G925F using Tapatalk

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

Posted: Saturday 31 December 2016 14:58
by Phantom
Thanks this works great.
I have also added speak at the bottom of the flow that will say the command with google TTS so i don't have to look at my tablet to see if the command was processed or not :)

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

Posted: Sunday 01 January 2017 18:49
by dressie
Great work! Tutorial is clear too. I just got one problem, it won't start the HTTP line. So far everything is exactly as in your screenshot and I tried the url in a browers directly on my phone and it works. I also tried different words, but it simply won't start the command. My phone is set for Dutch with primary language English (US). Any ideas?
Screenshot_20170101-185007.png
Screenshot_20170101-184950.png

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

Posted: Sunday 01 January 2017 18:51
by RayAmsterdam
Works perfect for me! I changed switchcmd to Toggle, so I only have to say the switch name to switch on or off.

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

Posted: Tuesday 10 January 2017 15:59
by mlamie
sincze wrote:
dressie wrote:
I do not see any issue in the setup you have created within Automate app. Maybe you can check the all the permissions as mentioned in the first part of my blog (for example did you configure "Android Settings -> Accessibility" correctly).

As alternative can you remove the "Google Now voice command" and "Expression true?" blocks (2 and 3) and connect "Flow beginning" (block 1) towards "HTTP request" (block 4). In the flow start block you can press Install homescreen shortcut. My question is will that shortcut launch the url and turn it on/off? A small waring, please check you did not create a loop otherwise it will keep pushing the url. Now please check the logging of the flow in the Automate app and advise.
Phantom wrote:
Great suggestion!

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

Posted: Wednesday 11 January 2017 10:03
by Cubes
I must say this is working quite well. Thanks for the tip!

Only silly issue I'm having is that I end up with loads of chrome browser tabs where I've searched for 'Outside lights'. The interact-back command works fine for getting rid of the window but they're all still there (1 per command) when I switch to another tab.