I got a Google Home for Christmas that I’m finding it very interesting. Setting it up with a stock Sonoff Basic was pretty easy and amazingly enough it works well. Now I want to take it to the next level and integrate it into my Node-Red instance but that seems to be quite difficult (for me).
Here is a a diagram of what I’d like to do, https://imgur.com/a/nVaRJ.
There are a number of Google Assistnat to Node -Red solutions out there but almost all of them rely on IFTTT, another non-local cloud provider, that is kinda kludge,
Below is some information that might get me to my final goal but it is a little beyond my capability.
node-red-contrib-google-action
https://www.npmjs.com/package/node-red-contrib-google-action
krvarma/sonoff-mqtt: A simple proof of concept home automation using Sonoff WiFi Switch, MQTT and Google Assistant platform.
https://github.com/krvarma/sonoff-mqtt
Has anyone here done such a thing who can help me out?
Rui,
There seem to be lots of people wanting to integrate their Home Automation systems with Google Home so it might be an excellent topic for RNT or RNTLab.
Thx,
TekMason
Hi TekMason,
Thanks for providing the diagram, so it’s clear what you’re trying to do.
I’ve been wanting to get my hands on the Alexa Echo Dot or Google Home, but unfortunately they don’t ship them to anyone living in most countries outside US, UK, Canada, etc…
I live in Portugal, so I didn’t have a chance to order one, yet.
Since I’m not able to get one, I’ve actually never researched a lot about that subject and I don’t know the best way of integrating Node-RED with Google Home.
Have you tried to install the “node-red-contrib-google-action” in your Node-RED installation?
After installing it, can you import the flow example that they provide at the end of that page and see their example?
[{"id":"b2b4dadb.71afd8","type":"google-action in","z":"8b42e25d.61776","name":"Action Request","topic":"action","port":"8081","url":"/","key":"/home/sysadmin/.node-red/server.key","cert":"/home/sysadmin/.node-red/server.crt","x":80,"y":820,"wires":[["3f0e417b.e29d6e","1e01ff5f.77f521"]]}, {"id":"3f0e417b.e29d6e","type":"debug","z":"8b42e25d.61776","name":"","active":true,"console":"false","complete":"true","x":1190,"y":820,"wires":[]}, {"id":"c462a768.4c61f","type":"google-action response","z":"8b42e25d.61776","name":"","x":1180,"y":920,"wires":[]},{"id":"db864196.41ad8","type":"change","z":"8b42e25d.61776","name":"Goodbye","rules":[{"t":"set","p":"payload","pt":"msg","to":"See ya later","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":1100,"wires":[["3f0e417b.e29d6e","c462a768.4c61f"]]}, {"id":"7b742f05.1d0c4","type":"switch","z":"8b42e25d.61776","name":"Question","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"number","vt":"str"},{"t":"cont","v":"fancy","vt":"str"}, {"t":"else"}],"checkall":"true","outputs":3,"x":460,"y":940,"wires":[["33f26106.6bc0ae"],["c1d5744e.f73348"],["c8441356.d887e"]],"outputLabels":["number","","don't understand"]},{"id":"94fc2fff.44668","type":"change","z":"8b42e25d.61776","name":"Number","rules":[{"t":"set","p":"closeConversation","pt":"msg","to":"false","tot":"bool"}, {"t":"set","p":"payload","pt":"msg","to":"\"My number is \" & $floor($random() * 10)\t","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":900,"wires":[["3f0e417b.e29d6e","c462a768.4c61f"]]},{"id":"c8441356.d887e","type":"change","z":"8b42e25d.61776","name":"Don't understand","rules":[{"t":"set","p":"closeConversation","pt":"msg","to":"false","tot":"bool"}, {"t":"set","p":"payload","pt":"msg","to":"I'm sorry, I don't understand","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":690,"y":1020,"wires":[["3f0e417b.e29d6e","c462a768.4c61f"]]},{"id":"a9d8b420.a680f8","type":"change","z":"8b42e25d.61776","name":"","rules":[{"t":"set","p":"closeConversation","pt":"msg","to":"false","tot":"bool"}, {"t":"set","p":"payload","pt":"msg","to":"This is Node Red","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":860,"wires":[["3f0e417b.e29d6e","c462a768.4c61f"]]},{"id":"1e01ff5f.77f521","type":"switch","z":"8b42e25d.61776","name":"Intent","property":"intent","propertyType":"msg","rules":[{"t":"eq","v":"actions.intent.MAIN","vt":"str"},{"t":"eq","v":"actions.intent.TEXT","vt":"str"}, {"t":"eq","v":"actions.intent.CANCEL","vt":"str"}],"checkall":"true","outputs":3,"x":250,"y":920,"wires":[["a9d8b420.a680f8"],["7b742f05.1d0c4"],["db864196.41ad8"]],"outputLabels":["MAIN","TEXT","CANCEL"]},{"id":"33f26106.6bc0ae","type":"random","z":"8b42e25d.61776","name":"","low":"1","high":"10","inte":"true","x":620,"y":920,"wires":[["94fc2fff.44668"]]}, {"id":"c1d5744e.f73348","type":"change","z":"8b42e25d.61776","name":"Fancy","rules":[{"t":"set","p":"closeConversation","pt":"msg","to":"false","tot":"bool"}, {"t":"set","p":"payload","pt":"msg","to":"<speak> Here are <say-as interpret-as=\"characters\">SSML</say-as> samples. I can pause <break time=\"3s\"/>. I can play a sound <audio src=\"http://www.sample-videos.com/audio/mp3/crowd-cheering.mp3\">didn't get your MP3 audio file</audio>. I can speak in cardinals. Your number is <say-as interpret-as=\"cardinal\">10</say-as>. Or I can speak in ordinals. You are <say-as interpret-as=\"ordinal\">10</say-as> in line. Or I can even speak in digits. The digits for ten are <say-as interpret-as=\"characters\">10</say-as>. I can also substitute phrases, like the <sub alias=\"World Wide Web Consortium\">W3C</sub>. Finally, I can speak a paragraph with two sentences. <p><s>This is sentence one.</s><s>This is sentence two.</s></p> </speak>","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":960,"wires":[["3f0e417b.e29d6e","c462a768.4c61f"]]}]