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

Moderator: leecollings

User avatar
mlamie
Posts: 122
Joined: Friday 25 October 2013 17:12
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: The Netherlands
Contact:

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

Post 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
Raspberry Pi 3, RaZberry, RFXtrx433
Various Z-Wave devices, KlikAanKlikUit devices, ESP8266 NodeMCU, Sonoff POW and a Essent E-thermostaat
IP camera: Dahua 4MP IPC-HDBW4421R-AS, Vivotek FD8134V
CaesarPL
Posts: 104
Joined: Tuesday 08 November 2016 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Poland
Contact:

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

Post 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?
HW:Raspberry PiB+,Pi3,PiB,RFLink,FA20RF,DCS-930L,DCS-935L,Clarus switches,RF Temp sensors,Owl Micro+,Mi Flora,Kerui,Yeelight,Xiaomi,Broadlink RMM3,Alexa
SF:Jessie,Dmtcz 3.8153,Logitech Media srv,PiCorePlayers,Dashticz,Max2Play,InfluxDB,Grafana,HABridge
User avatar
mlamie
Posts: 122
Joined: Friday 25 October 2013 17:12
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: The Netherlands
Contact:

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

Post 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.
Raspberry Pi 3, RaZberry, RFXtrx433
Various Z-Wave devices, KlikAanKlikUit devices, ESP8266 NodeMCU, Sonoff POW and a Essent E-thermostaat
IP camera: Dahua 4MP IPC-HDBW4421R-AS, Vivotek FD8134V
CaesarPL
Posts: 104
Joined: Tuesday 08 November 2016 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Poland
Contact:

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

Post 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
HW:Raspberry PiB+,Pi3,PiB,RFLink,FA20RF,DCS-930L,DCS-935L,Clarus switches,RF Temp sensors,Owl Micro+,Mi Flora,Kerui,Yeelight,Xiaomi,Broadlink RMM3,Alexa
SF:Jessie,Dmtcz 3.8153,Logitech Media srv,PiCorePlayers,Dashticz,Max2Play,InfluxDB,Grafana,HABridge
CaesarPL
Posts: 104
Joined: Tuesday 08 November 2016 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Poland
Contact:

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

Post 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
HW:Raspberry PiB+,Pi3,PiB,RFLink,FA20RF,DCS-930L,DCS-935L,Clarus switches,RF Temp sensors,Owl Micro+,Mi Flora,Kerui,Yeelight,Xiaomi,Broadlink RMM3,Alexa
SF:Jessie,Dmtcz 3.8153,Logitech Media srv,PiCorePlayers,Dashticz,Max2Play,InfluxDB,Grafana,HABridge
User avatar
mlamie
Posts: 122
Joined: Friday 25 October 2013 17:12
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: The Netherlands
Contact:

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

Post 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?
Raspberry Pi 3, RaZberry, RFXtrx433
Various Z-Wave devices, KlikAanKlikUit devices, ESP8266 NodeMCU, Sonoff POW and a Essent E-thermostaat
IP camera: Dahua 4MP IPC-HDBW4421R-AS, Vivotek FD8134V
CaesarPL
Posts: 104
Joined: Tuesday 08 November 2016 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Poland
Contact:

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

Post 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.
HW:Raspberry PiB+,Pi3,PiB,RFLink,FA20RF,DCS-930L,DCS-935L,Clarus switches,RF Temp sensors,Owl Micro+,Mi Flora,Kerui,Yeelight,Xiaomi,Broadlink RMM3,Alexa
SF:Jessie,Dmtcz 3.8153,Logitech Media srv,PiCorePlayers,Dashticz,Max2Play,InfluxDB,Grafana,HABridge
User avatar
mlamie
Posts: 122
Joined: Friday 25 October 2013 17:12
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: The Netherlands
Contact:

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

Post by mlamie »

I think you can incase you make English primary and Polish secondary.
Raspberry Pi 3, RaZberry, RFXtrx433
Various Z-Wave devices, KlikAanKlikUit devices, ESP8266 NodeMCU, Sonoff POW and a Essent E-thermostaat
IP camera: Dahua 4MP IPC-HDBW4421R-AS, Vivotek FD8134V
dalecooper
Posts: 4
Joined: Wednesday 21 December 2016 9:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post 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!
Last edited by dalecooper on Wednesday 21 December 2016 11:05, edited 1 time in total.
User avatar
mlamie
Posts: 122
Joined: Friday 25 October 2013 17:12
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: The Netherlands
Contact:

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

Post 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.
Raspberry Pi 3, RaZberry, RFXtrx433
Various Z-Wave devices, KlikAanKlikUit devices, ESP8266 NodeMCU, Sonoff POW and a Essent E-thermostaat
IP camera: Dahua 4MP IPC-HDBW4421R-AS, Vivotek FD8134V
dalecooper
Posts: 4
Joined: Wednesday 21 December 2016 9:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by dalecooper »

Ah, just edited my previous message. It works after a phone reboot.
User avatar
mlamie
Posts: 122
Joined: Friday 25 October 2013 17:12
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: The Netherlands
Contact:

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

Post 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.
Raspberry Pi 3, RaZberry, RFXtrx433
Various Z-Wave devices, KlikAanKlikUit devices, ESP8266 NodeMCU, Sonoff POW and a Essent E-thermostaat
IP camera: Dahua 4MP IPC-HDBW4421R-AS, Vivotek FD8134V
User avatar
sincze
Posts: 1300
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

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

Post 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??
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
User avatar
mlamie
Posts: 122
Joined: Friday 25 October 2013 17:12
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: The Netherlands
Contact:

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

Post 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?
Raspberry Pi 3, RaZberry, RFXtrx433
Various Z-Wave devices, KlikAanKlikUit devices, ESP8266 NodeMCU, Sonoff POW and a Essent E-thermostaat
IP camera: Dahua 4MP IPC-HDBW4421R-AS, Vivotek FD8134V
User avatar
sincze
Posts: 1300
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

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

Post 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 21083 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
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
User avatar
Phantom
Posts: 87
Joined: Saturday 31 December 2016 14:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11652
Location: The Netherlands
Contact:

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

Post 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 :)
dressie
Posts: 156
Joined: Monday 25 May 2015 22:44
Target OS: Raspberry Pi / ODroid
Domoticz version: V2020.2
Location: Netherlands
Contact:

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

Post 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
RayAmsterdam
Posts: 115
Joined: Sunday 11 January 2015 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post 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.
User avatar
mlamie
Posts: 122
Joined: Friday 25 October 2013 17:12
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: The Netherlands
Contact:

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

Post 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!
Raspberry Pi 3, RaZberry, RFXtrx433
Various Z-Wave devices, KlikAanKlikUit devices, ESP8266 NodeMCU, Sonoff POW and a Essent E-thermostaat
IP camera: Dahua 4MP IPC-HDBW4421R-AS, Vivotek FD8134V
Cubes
Posts: 23
Joined: Wednesday 04 March 2015 16:45
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Belgium
Contact:

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

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests