Google Home
Moderator: leecollings
Re: Google Home
Hi Bryan241,
The limiting factor is IFTTT, it does support secure connections, but only using basic auth, and does require you putting a username\path into the URL on IFTTT, now my reading tells me that IFTTT stores these in a secure manner, sharing of "recipes" is no longer supported, but take that with a grain of salt. To reduce my risk I created a special IFTTT user so as to limit access.
The url will look something like https://ifttt_username:ifttt_password@SERVER_IP:443/json.htm?type=command¶m=updateuservariable&vname=GH_Request&vtype=2&vvalue={{TextField}}
I have further developed my flow, it now supports Actions for configured devices as well as an "Advanced" function, but that only includes a built response for my AC, any Advanced function would require the user to build the response. Actions work with switches and Thermostats, I did build in Selector Switches before I realised IFTTT will not let me send 2 Text Fields, so it doesn't work at the moment.
If there is any interest I will post an update, including how IFTTT needs to be configured with the new flow.
Wob
The limiting factor is IFTTT, it does support secure connections, but only using basic auth, and does require you putting a username\path into the URL on IFTTT, now my reading tells me that IFTTT stores these in a secure manner, sharing of "recipes" is no longer supported, but take that with a grain of salt. To reduce my risk I created a special IFTTT user so as to limit access.
The url will look something like https://ifttt_username:ifttt_password@SERVER_IP:443/json.htm?type=command¶m=updateuservariable&vname=GH_Request&vtype=2&vvalue={{TextField}}
I have further developed my flow, it now supports Actions for configured devices as well as an "Advanced" function, but that only includes a built response for my AC, any Advanced function would require the user to build the response. Actions work with switches and Thermostats, I did build in Selector Switches before I realised IFTTT will not let me send 2 Text Fields, so it doesn't work at the moment.
If there is any interest I will post an update, including how IFTTT needs to be configured with the new flow.
Wob
-
- Posts: 113
- Joined: Sunday 14 July 2013 22:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: NL
- Contact:
Re: Google Home
Yes pleaseWob76 wrote: ↑Tuesday 03 October 2017 23:54 Hi Bryan241,
The limiting factor is IFTTT, it does support secure connections, but only using basic auth, and does require you putting a username\path into the URL on IFTTT, now my reading tells me that IFTTT stores these in a secure manner, sharing of "recipes" is no longer supported, but take that with a grain of salt. To reduce my risk I created a special IFTTT user so as to limit access.
The url will look something like https://ifttt_username:ifttt_password@SERVER_IP:443/json.htm?type=command¶m=updateuservariable&vname=GH_Request&vtype=2&vvalue={{TextField}}
I have further developed my flow, it now supports Actions for configured devices as well as an "Advanced" function, but that only includes a built response for my AC, any Advanced function would require the user to build the response. Actions work with switches and Thermostats, I did build in Selector Switches before I realised IFTTT will not let me send 2 Text Fields, so it doesn't work at the moment.
If there is any interest I will post an update, including how IFTTT needs to be configured with the new flow.
Wob
-
- Posts: 113
- Joined: Sunday 14 July 2013 22:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: NL
- Contact:
Re: Google Home
Same issue, request at my side, somebody can advice?bryan241 wrote: ↑Tuesday 03 October 2017 12:40 This IFTTT solution looks nice, but what I don't like is to open up unsecured connections to domoticz.
From what I understand is that you need to use unsecured http url's to connect to domoticz.
Is there a way to make the communication secure?
I'm currently using ha bridge locally, but it only supports ON/OFF/DIM commands (as stated before).
I would like to be able to send custom commands, but it must be secure.
-
- Posts: 113
- Joined: Sunday 14 July 2013 22:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: NL
- Contact:
Re: Google Home
Ok got it, sorry. I'll try to set it up this afternoon, thanks!
Re: Google Home
I will post an update for action control in my flow, but you can get responses using the previous flow, and as I mention using basic auth with IFTTT.
-
- Posts: 5
- Joined: Sunday 08 October 2017 12:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Google Home
I am really looking forward on an update on this. I've followed Bradds and then Wob76 instructions, but I haven't got a response yet from Google Home. The value of the user variable is changing, but from there I am lost in how to debug what's going wrong.
Could you please explain in a bit more detail how to define the Regex expressions? And in which step of the process are they used? I clearly miss something here, probably because Node Red is also completely new to me. Perhaps a small flowchart would help to explain it?
Another question, how can I see what exactly happens in Node Red? I'd like to debug what's going on in there when IFTTT sends the webhook to domoticz.
Anothing thing that perhaps influences why it doesn't work for me is that I use the Google assistant on my NVidia Shield. This option has recently become available, so there is not much information about it yet,
I am really looking forward to get this working on my side. Many thanks in all the efforts that both of you have already put into this.
Re: Google Home
Hmm, When I try to update a variable with https and basic auth, I get the forbidden page.
But when I update a switch, it works.
Example update variable (not working):
https: //test:test@externaliptodomoticz/json.htm?type=command¶m=updateuservariable&vname=Status&vtype=2&vvalue=test
Example toggle switch (working):
https: //test:test@externaliptodomoticz/json.htm?type=command¶m=switchlight&idx=1&switchcmd=Toggle
The space after https is intentional. Otherwise the url got abbreviated.
But when I update a switch, it works.
Example update variable (not working):
https: //test:test@externaliptodomoticz/json.htm?type=command¶m=updateuservariable&vname=Status&vtype=2&vvalue=test
Example toggle switch (working):
https: //test:test@externaliptodomoticz/json.htm?type=command¶m=switchlight&idx=1&switchcmd=Toggle
The space after https is intentional. Otherwise the url got abbreviated.
-
- Posts: 101
- Joined: Wednesday 25 March 2015 10:46
- Target OS: Linux
- Domoticz version: v4.11307
- Location: France
- Contact:
Re: Google Home
Can you try to change your IFTTT user to admin user and try again ?bryan241 wrote: ↑Monday 09 October 2017 21:34 Hmm, When I try to update a variable with https and basic auth, I get the forbidden page.
But when I update a switch, it works.
Example update variable (not working):
https: //test:test@externaliptodomoticz/json.htm?type=command¶m=updateuservariable&vname=Status&vtype=2&vvalue=test
Example toggle switch (working):
https: //test:test@externaliptodomoticz/json.htm?type=command¶m=switchlight&idx=1&switchcmd=Toggle
The space after https is intentional. Otherwise the url got abbreviated.
I think only the admin user can update variable.
Re: Google Home
I've tried to update a variable using an admin user, but that also does not work.chatainsim wrote: ↑Tuesday 10 October 2017 22:36Can you try to change your IFTTT user to admin user and try again ?bryan241 wrote: ↑Monday 09 October 2017 21:34 Hmm, When I try to update a variable with https and basic auth, I get the forbidden page.
But when I update a switch, it works.
Example update variable (not working):
https: //test:test@externaliptodomoticz/json.htm?type=command¶m=updateuservariable&vname=Status&vtype=2&vvalue=test
Example toggle switch (working):
https: //test:test@externaliptodomoticz/json.htm?type=command¶m=switchlight&idx=1&switchcmd=Toggle
The space after https is intentional. Otherwise the url got abbreviated.
I think only the admin user can update variable.
I'm going to try the reverse proxy method using nginx, but any tips to do this without nginx are welcome
Re: Google Home
This is the URL taken from my Applet, no issues with updating the variable, using HTTPS and my ifttt user, which currently has admin access. Note I am using a non standard SSL port of 1443, but that should have little effect, my Variable has been changed from "Status" to "GH_Request" but it worked with both.
https: //ifttt:[email protected]:1443/json.htm?type=command¶m=updateuservariable&vname=GH_Request&vtype=2&vvalue={{TextField}}
No reverse proxy here, have you tried just using your browser to do the update, do you see any json response?
https: //ifttt:[email protected]:1443/json.htm?type=command¶m=updateuservariable&vname=GH_Request&vtype=2&vvalue={{TextField}}
No reverse proxy here, have you tried just using your browser to do the update, do you see any json response?
-
- Posts: 23
- Joined: Wednesday 22 March 2017 22:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Google Home
Hi msvds.msvds wrote: ↑Sunday 08 October 2017 12:13I am really looking forward on an update on this. I've followed Bradds and then Wob76 instructions, but I haven't got a response yet from Google Home. The value of the user variable is changing, but from there I am lost in how to debug what's going wrong.
Could you please explain in a bit more detail how to define the Regex expressions? And in which step of the process are they used? I clearly miss something here, probably because Node Red is also completely new to me. Perhaps a small flowchart would help to explain it?
Another question, how can I see what exactly happens in Node Red? I'd like to debug what's going on in there when IFTTT sends the webhook to domoticz.
Anothing thing that perhaps influences why it doesn't work for me is that I use the Google assistant on my NVidia Shield. This option has recently become available, so there is not much information about it yet,
I am really looking forward to get this working on my side. Many thanks in all the efforts that both of you have already put into this.
First of all, you need an actual google home device and a raspberry pi for any of this to work in relation to google home speaking out status commands etc. It should work for switching stuff in domoticz but you wont get any feedback from your Nvidia shield device. (unless someone creates a node for this) I don't have a Nvidia shield device so cannot comment.
Assuming you have a raspberry pi, If you followed my instructions and are getting google assistant to update the uservariable, but are not getting anything in node red, then the problem is most likely with your domoticz to node-red link via MQTT.
Basically, what happens when you update the "Status" uservariable in domoticz, it activates the virtual "Status" switch. This "switch change" is then sent to the MQTT server (mosquitto) and the previously posted flows in node-red then look at the MQTT server for this switch activation, once detected it then requests the uservariable "Status" text from domoticz and compares that text with whatever you have in the filter. For testing purposes you don't need regex expressions in the filter, just whatever matches your uservariable text. Once the match is made, the flow output then continues to whatever action you want it to perform.
Code: Select all
[{"id":"1245edb.3d83f12","type":"mqtt in","z":"113cf1c6.2fcb7e","name":"dom local output","topic":"domoticz/out","qos":"0","broker":"32aa3862.20a188","x":85,"y":1305.781494140625,"wires":[["3657faff.9ce496","1f947d50.047ab3"]]},{"id":"1f947d50.047ab3","type":"debug","z":"113cf1c6.2fcb7e","name":"","active":true,"console":"false","complete":"false","x":265,"y":1305,"wires":[]},{"id":"32aa3862.20a188","type":"mqtt-broker","z":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]
If it does not say connected with the green dot next to it, then this is your problem.
There is already a very good Wiki explaining the dom to node red link and how to set it up here http://www.domoticz.com/wiki/MQTT
To summarize.
When you say "OK, Google, check test status" - The text "check test status" is sent to the IFTTT server and checked against any applets you have created, in this case the applet that you created for "Check $ status". It then substitutes the $ for the text you spoke, ie "test". This text is then added to the end of the json command send back to your domoticz server via the webhooks link which updates the uservariable called "Status" with the word "test"
Once domoticz detects the uservariable has changed, it then turns on the virtual switch called "status" and sends this "On command" to the MQTT server you have setup.
If it is all setup correctly, then Node-red is always looking at the information coming from the MQTT server and filters out the idx associated with the "Status" switch. Once this passes the IDX filter, it then requests the uservariable text from the uservariable "Status" in domoticz, which in this example would be "test"
It then passes the text "test" through a filter to output that command to do whatever you want with it.
There is a wealth of information already out there explaining in detail how to setup the dom to node red link, once you have this working it should then be self explanatory once you import the previously posted flows from either myself or wob.
If you just want to test the link between node red and your google home device. Import this flow and change the IP to that of your google home device.
Code: Select all
[{"id":"e45c4431.1b9408","type":"function","z":"fc663e33.3144c","name":"Change IP to the IP of your google home device","func":"msg.payload = {\n ip: '192.168.1.2',\n url: 'http://translate.google.com/translate_tts?ie=UTF-8&total=1&idx=0&textlen=32&client=tw-ob&q=this is a test message&tl=En-gb',\n contentType: 'audio/mp3',\n};\nreturn msg;","outputs":1,"noerr":0,"x":509,"y":274,"wires":[["3eaf7cdf.8b0e74"]]},{"id":"3eaf7cdf.8b0e74","type":"chromecast-play","z":"fc663e33.3144c","name":"","url":"","contentType":"","ip":"","x":796,"y":274,"wires":[[]]},{"id":"a148fe81.1ec6c","type":"inject","z":"fc663e33.3144c","name":"Test switch","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":224,"y":276,"wires":[["e45c4431.1b9408"]]}]
Code: Select all
[{"id":"7dedf4ad.13adbc","type":"function","z":"1f3a73d7.20eacc","name":"Test message to raspberry pi speakers","func":"msg.payload = 'http://translate.google.com/translate_tts?ie=UTF-8&total=1&idx=0&textlen=32&client=tw-ob&q=this is a test message&tl=En-gb';\nreturn msg;","outputs":1,"noerr":0,"x":533,"y":187,"wires":[["222efc84.909734"]]},{"id":"60e25d54.b12174","type":"inject","z":"1f3a73d7.20eacc","name":"Test Switch","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":288,"y":189,"wires":[["7dedf4ad.13adbc"]]},{"id":"222efc84.909734","type":"audio","z":"1f3a73d7.20eacc","x":782,"y":186,"wires":[]}]
Re: Google Home
I currently only test with the browser.Wob76 wrote: ↑Friday 13 October 2017 3:44 This is the URL taken from my Applet, no issues with updating the variable, using HTTPS and my ifttt user, which currently has admin access. Note I am using a non standard SSL port of 1443, but that should have little effect, my Variable has been changed from "Status" to "GH_Request" but it worked with both.
https: //ifttt:[email protected]:1443/json.htm?type=command¶m=updateuservariable&vname=GH_Request&vtype=2&vvalue={{TextField}}
No reverse proxy here, have you tried just using your browser to do the update, do you see any json response?
When I modify your link to connect to domoticz from a browser I get the 403-forbidden page after the notification that I'm going to login using the ifttt user.
I've installed a fresh domoticz (latest stable and latest beta) on a spare pi with the same security settings.
Tried other browsers, but could not update the variable.
Only when turning the security off, I can change the variable.
Re: Google Home
bloody brilliant! I got it to work reasonably quickly.
how big is the risk using something like http ://user:password@ipaddress:8080/json.htm?type=command¶m=updateuservariable&vname=Status&vtype=2&vvalue={{TextField}}
in my router I've set up port forwarding of that port 8080 to my local IP.
I guess some computer in between IFTTT and my IP can read the password (which is obviously only used for this call and not anywhere else). Using that password some devices could be switched on and off, and data could be read. Not really something I appreciate but I would be more worried about opening the web page of domoticz by port forwarding.
Would using my.domoticz.com be useful or even possible? (so I'm rather clueless with regards to this topic)
update: chaning to ssl port 443 works fine too
how big is the risk using something like http ://user:password@ipaddress:8080/json.htm?type=command¶m=updateuservariable&vname=Status&vtype=2&vvalue={{TextField}}
in my router I've set up port forwarding of that port 8080 to my local IP.
I guess some computer in between IFTTT and my IP can read the password (which is obviously only used for this call and not anywhere else). Using that password some devices could be switched on and off, and data could be read. Not really something I appreciate but I would be more worried about opening the web page of domoticz by port forwarding.
Would using my.domoticz.com be useful or even possible? (so I'm rather clueless with regards to this topic)
update: chaning to ssl port 443 works fine too
-
- Posts: 23
- Joined: Wednesday 22 March 2017 22:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Google Home
There is a new node for sending speech to google home (and other chromecast devices). It works well and even has a search function.
Available here - https://github.com/noelportugal/google-home-notifier
Available here - https://github.com/noelportugal/google-home-notifier
-
- Posts: 15
- Joined: Tuesday 04 October 2016 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Google Home
I was following these nice instructions from Bradds and Wob76, and got things almost working.
What i cannot seems to figure out is device filtering part, how to do this? Output from Google Home is at the moment for my Check $ Status: "The device, $device, has not been configured"
Am i missing a idx setup from some point or what..?
E.g. i have e switch: "Front Door" with idx=3. When i ask google "Check Front door status" uservariable changes to Front door and Status switch gets updated -> activates the Node-red. Node-red flow goes through without errors and Google Home speaks: "The device, $device, has not been configured"
Thank you!
What i cannot seems to figure out is device filtering part, how to do this? Output from Google Home is at the moment for my Check $ Status: "The device, $device, has not been configured"
Am i missing a idx setup from some point or what..?
E.g. i have e switch: "Front Door" with idx=3. When i ask google "Check Front door status" uservariable changes to Front door and Status switch gets updated -> activates the Node-red. Node-red flow goes through without errors and Google Home speaks: "The device, $device, has not been configured"
Thank you!
-
- Posts: 23
- Joined: Wednesday 22 March 2017 22:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Google Home
Hi.
If you are getting that response, you must be using wob's flow.
Check you have included the "GoogleHome: (the )?(front door)" text in the description of your front door switch.
the regex text in the switch description has to match exactly the value in the variable.
If you are getting that response, you must be using wob's flow.
Check you have included the "GoogleHome: (the )?(front door)" text in the description of your front door switch.
the regex text in the switch description has to match exactly the value in the variable.
-
- Posts: 21
- Joined: Thursday 08 September 2016 13:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Google Home
Hi
Since there is an google home API i guess we would be able to build an "hardware plugin" in Domoticz for google assistent? I think that would be awesome if it's possible if some of us were able to do that. Unfortunatly I don't think I have the skills.
https://developers.google.com/actions/tools/
https://developers.google.com/actions/s ... create-app
Since there is an google home API i guess we would be able to build an "hardware plugin" in Domoticz for google assistent? I think that would be awesome if it's possible if some of us were able to do that. Unfortunatly I don't think I have the skills.
https://developers.google.com/actions/tools/
https://developers.google.com/actions/s ... create-app
-
- Posts: 1571
- Joined: Friday 25 March 2016 17:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Google Home
Hi -
i built the Controlicz app for Alexa - and am pleased to announce that i'm extending to include Google (Home and Assistant).
It's currently in beta, but has been submitted for certification.
Functionality (subject to additional testing from users) is:
Discovery of devices
Control of switches (On/Off)
Control of lights (On/Off/Brightness)
Control of Scenes & Groups (On/Off)
Query of devices (is this thing on? What is the temperature of that?)
i built the Controlicz app for Alexa - and am pleased to announce that i'm extending to include Google (Home and Assistant).
It's currently in beta, but has been submitted for certification.
Functionality (subject to additional testing from users) is:
Discovery of devices
Control of switches (On/Off)
Control of lights (On/Off/Brightness)
Control of Scenes & Groups (On/Off)
Query of devices (is this thing on? What is the temperature of that?)
Native Alexa skill and Google app - register at https://www.controlicz.com - https://twitter.com/Controlicz
- Phantom
- Posts: 87
- Joined: Saturday 31 December 2016 14:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.11652
- Location: The Netherlands
- Contact:
Re: Google Home
Hey Madgeni, is your software opensource or in any way to run it on my own system?
Who is online
Users browsing this forum: No registered users and 1 guest