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

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

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

Postby mlamie » Tuesday 20 December 2016 15:04

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
Gateway: Raspberry Pi 3, RaZberry, RFXtrx433
Parts: Vision ZD 2102, Vision ZM 1601, Greenwave Smart plug 6, KlikAanKlikUit ACDB-7000BC, APIR-2150, AWMR-230, ESP8266 NodeMCU and a Essent E-thermostaat
IP camera: Dahua 4MP IPC-HDBW4421R-AS, Vivotek FD8134V

CaesarPL
Posts: 23
Joined: Tuesday 08 November 2016 15:03
Target OS: Raspberry Pi
Domoticz version:
Location: Poland
Contact:

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

Postby CaesarPL » Tuesday 20 December 2016 17:05

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?
Hardware: Raspberry Pi B+, Pi 3, 2x Pi B, RFLink, FA20RF Smoke detectors, DCS-930L, Clarus switches, Eurochron, Alecto Temp
Software: Raspbian Jessie, Domoticz 3.5877, Geofence, Logitech Media server, PiCorePlayers

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

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

Postby mlamie » Tuesday 20 December 2016 17:09

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.
Gateway: Raspberry Pi 3, RaZberry, RFXtrx433
Parts: Vision ZD 2102, Vision ZM 1601, Greenwave Smart plug 6, KlikAanKlikUit ACDB-7000BC, APIR-2150, AWMR-230, ESP8266 NodeMCU and a Essent E-thermostaat
IP camera: Dahua 4MP IPC-HDBW4421R-AS, Vivotek FD8134V

CaesarPL
Posts: 23
Joined: Tuesday 08 November 2016 15:03
Target OS: Raspberry Pi
Domoticz version:
Location: Poland
Contact:

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

Postby CaesarPL » Tuesday 20 December 2016 19:55

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
Hardware: Raspberry Pi B+, Pi 3, 2x Pi B, RFLink, FA20RF Smoke detectors, DCS-930L, Clarus switches, Eurochron, Alecto Temp
Software: Raspbian Jessie, Domoticz 3.5877, Geofence, Logitech Media server, PiCorePlayers

CaesarPL
Posts: 23
Joined: Tuesday 08 November 2016 15:03
Target OS: Raspberry Pi
Domoticz version:
Location: Poland
Contact:

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

Postby CaesarPL » Tuesday 20 December 2016 20:05

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
Hardware: Raspberry Pi B+, Pi 3, 2x Pi B, RFLink, FA20RF Smoke detectors, DCS-930L, Clarus switches, Eurochron, Alecto Temp
Software: Raspbian Jessie, Domoticz 3.5877, Geofence, Logitech Media server, PiCorePlayers

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

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

Postby mlamie » Tuesday 20 December 2016 21:38

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?
Gateway: Raspberry Pi 3, RaZberry, RFXtrx433
Parts: Vision ZD 2102, Vision ZM 1601, Greenwave Smart plug 6, KlikAanKlikUit ACDB-7000BC, APIR-2150, AWMR-230, ESP8266 NodeMCU and a Essent E-thermostaat
IP camera: Dahua 4MP IPC-HDBW4421R-AS, Vivotek FD8134V

CaesarPL
Posts: 23
Joined: Tuesday 08 November 2016 15:03
Target OS: Raspberry Pi
Domoticz version:
Location: Poland
Contact:

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

Postby CaesarPL » Tuesday 20 December 2016 22:31

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.
Hardware: Raspberry Pi B+, Pi 3, 2x Pi B, RFLink, FA20RF Smoke detectors, DCS-930L, Clarus switches, Eurochron, Alecto Temp
Software: Raspbian Jessie, Domoticz 3.5877, Geofence, Logitech Media server, PiCorePlayers

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

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

Postby mlamie » Tuesday 20 December 2016 22:34

I think you can incase you make English primary and Polish secondary.
Gateway: Raspberry Pi 3, RaZberry, RFXtrx433
Parts: Vision ZD 2102, Vision ZM 1601, Greenwave Smart plug 6, KlikAanKlikUit ACDB-7000BC, APIR-2150, AWMR-230, ESP8266 NodeMCU and a Essent E-thermostaat
IP camera: Dahua 4MP IPC-HDBW4421R-AS, Vivotek FD8134V

dalecooper
Posts: 3
Joined: Wednesday 21 December 2016 10:39
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Postby dalecooper » Wednesday 21 December 2016 11:31

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 12:05, edited 1 time in total.

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

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

Postby mlamie » Wednesday 21 December 2016 11:59

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.
Gateway: Raspberry Pi 3, RaZberry, RFXtrx433
Parts: Vision ZD 2102, Vision ZM 1601, Greenwave Smart plug 6, KlikAanKlikUit ACDB-7000BC, APIR-2150, AWMR-230, ESP8266 NodeMCU and a Essent E-thermostaat
IP camera: Dahua 4MP IPC-HDBW4421R-AS, Vivotek FD8134V

dalecooper
Posts: 3
Joined: Wednesday 21 December 2016 10:39
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Postby dalecooper » Wednesday 21 December 2016 12:05

Ah, just edited my previous message. It works after a phone reboot.

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

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

Postby mlamie » Thursday 22 December 2016 15:54

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.
Gateway: Raspberry Pi 3, RaZberry, RFXtrx433
Parts: Vision ZD 2102, Vision ZM 1601, Greenwave Smart plug 6, KlikAanKlikUit ACDB-7000BC, APIR-2150, AWMR-230, ESP8266 NodeMCU and a Essent E-thermostaat
IP camera: Dahua 4MP IPC-HDBW4421R-AS, Vivotek FD8134V

sincze
Posts: 556
Joined: Monday 02 June 2014 22:46
Target OS: Linux
Domoticz version: 3.6179
Location: Netherlands
Contact:

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

Postby sincze » Saturday 31 December 2016 0:35

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??

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

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

Postby mlamie » Saturday 31 December 2016 9:08

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?
Gateway: Raspberry Pi 3, RaZberry, RFXtrx433
Parts: Vision ZD 2102, Vision ZM 1601, Greenwave Smart plug 6, KlikAanKlikUit ACDB-7000BC, APIR-2150, AWMR-230, ESP8266 NodeMCU and a Essent E-thermostaat
IP camera: Dahua 4MP IPC-HDBW4421R-AS, Vivotek FD8134V

sincze
Posts: 556
Joined: Monday 02 June 2014 22:46
Target OS: Linux
Domoticz version: 3.6179
Location: Netherlands
Contact:

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

Postby sincze » Saturday 31 December 2016 12:00

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 1391 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.

Sent from my SM-G925F using Tapatalk

User avatar
Phantom
Posts: 1
Joined: Saturday 31 December 2016 15:47
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Postby Phantom » Saturday 31 December 2016 15:58

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: 73
Joined: Monday 25 May 2015 22:44
Target OS: Raspberry Pi
Domoticz version:
Location: Netherlands
Contact:

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

Postby dressie » Sunday 01 January 2017 19:49

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: 132
Joined: Sunday 11 January 2015 17:40
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Postby RayAmsterdam » Sunday 01 January 2017 19:51

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: 102
Joined: Friday 25 October 2013 17:12
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: The Netherlands
Contact:

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

Postby mlamie » Tuesday 10 January 2017 16:59

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!
Gateway: Raspberry Pi 3, RaZberry, RFXtrx433
Parts: Vision ZD 2102, Vision ZM 1601, Greenwave Smart plug 6, KlikAanKlikUit ACDB-7000BC, APIR-2150, AWMR-230, ESP8266 NodeMCU and a Essent E-thermostaat
IP camera: Dahua 4MP IPC-HDBW4421R-AS, Vivotek FD8134V

Cubes
Posts: 25
Joined: Wednesday 04 March 2015 17:45
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Belgium
Contact:

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

Postby Cubes » Wednesday 11 January 2017 11:03

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.


Return to “Android”

Who is online

Users browsing this forum: No registered users and 1 guest