# Node-RED google home integration

**URL:** <https://discourse.nodered.org/t/node-red-google-home-integration/4829>\
**Category:** Share Your Projects\
**Created:** [13 November 2018 09:25 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829 "2018-11-13T09:25:31Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrei-tatar](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei-tatar/32/3780_2.png) [@andrei-tatar](https://discourse.nodered.org/u/andrei-tatar)\
**Post date:** [13 November 2018 09:25 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/1 "2018-11-13T09:25:31Z")

</div>

Hi all,

I am in the process of writing a node-red google home integration service. [https://developers.google.com/actions/smarthome/guides/](https://developers.google.com/actions/smarthome/guides/)

Something were you can add nodes (light/switch/thermostat/etc.) that appear in your google home application and integrate with the assistant. Similar to how the dashboard works, if you would add a light node, a new light would appear in your linked google home application.  
So when you would ask google to turn on the lights or make the room warmer, etc., the node(s) in node-red will emit new values and so forth.  
However, because the service needs a permanent connection with each node-red client, I would have to pay hosting for it, so after a free trial I was thinking of ~ 2$/month per user...

Would this be of interest?

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [13 November 2018 11:17 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/2 "2018-11-13T11:17:29Z")

</div>

not to me.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [13 November 2018 14:37 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/3 "2018-11-13T14:37:07Z")

</div>

The idea is interesting & the price may be good.

But personally, I wouldn't want an external service to be involved with my home automation system so I wouldn't use it I'm afraid.

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [13 November 2018 15:36 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/4 "2018-11-13T15:36:53Z")

</div>

Sorry Andrei, I would not use it, for the same reasons as the post above.

---

<div class="post-metadata">

**Author:** ![michaelblight](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/michaelblight/32/445_2.png) [@michaelblight](https://discourse.nodered.org/u/michaelblight)\
**Post date:** [14 November 2018 05:21 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/5 "2018-11-14T05:21:30Z")

</div>

I have interest. While I try to keep everything local, with Google Home (or Alexa or Cortana), you've got no choice. I'm currently using Google Home -\> IFTTT -\> Node-Red on Bluemix -\> MQTT -\> Node-Red at home. When this works, it works well and without too much lag. However, Bluemix only stays up for a few days and then crashes for a couple, so it has been a big disappointment. I plan on replacing it with another Node-Red instance at home in a DMZ, so a component like this could also cut out IFTTT, and maybe even the second Node-Red instance itself.

I'm using Node-Red as a Home Assistant add-on. There is a Google Home add-on there ([https://www.home-assistant.io/components/google\_assistant/](https://www.home-assistant.io/components/google_assistant/)), but I couldn't get it working in my environment. I think the problem was related to either Docker and/or VirtualBox and all the virtual networks involved. It also requires external access to my Home Assistant, and I don't really want to bother with the risks. Exposing just Node-Red is a much smaller attack surface, particularly if it's a port dedicated to this capability.

Some of the benefits of IFTTT that I would not want to lose are:

- The flexibility with lots of different phrases for the same thing (eg. change the lounge lights to 50%, make the lights 50%, turn the lights on to 50%)
- Phrases that do a number of actions (eg. I'm going to bed). This should be a no-brainer with a Node-Red component.
- It's incredibly easy to set up. I had a bit of a play with setting up a Google Project, and it was a pain, so I gave up.

---

<div class="post-metadata">

**Author:** ![andrei-tatar](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei-tatar/32/3780_2.png) [@andrei-tatar](https://discourse.nodered.org/u/andrei-tatar)\
**Post date:** [14 November 2018 08:22 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/6 "2018-11-14T08:22:30Z")

</div>

Yeah, well the idea is for integration and while I also don't like 3rd party services, I think google is here to stay and I really like to say "Ok google, make the room warmer", and everything just works, like magic. 🙂

OK, so there is some interest. Unfortunately not enough yet to justify the effort.

@michaelblight

- The google home actions have lots of flexibility in the way you spell the commands. You can also say "make the room brighter", "turn on all the lights", "turn off the kitchen lights", etc. They also released a new google home hub that allows both visual and conversation interaction:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/3/3b2c29b9db199a5d0701ee705245842c338b5cc8.jpeg)
- I guess this can be integrated with `scenes` [https://developers.google.com/actions/smarthome/traits/scene](https://developers.google.com/actions/smarthome/traits/scene) so that you can do whatever you want when a scene gets activated
- The way I thought of it, should be as easy as selecting google home, add devices, select node red home automation provider, enter your user and password. In node-red, you would just set the access token you get when signing up, in some configuration node.

---

<div class="post-metadata">

**Author:** ![Flixm](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/flixm/32/17122_2.png) [@Flixm](https://discourse.nodered.org/u/Flixm)\
**Post date:** [15 November 2018 22:05 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/7 "2018-11-15T22:05:37Z")

</div>

The idea is great but I also don't like to trust a server which I don't know.  
The easiest way should be a solution how we can pull an URL locally with a Google assistant like Google home.  
Then it's easy.  
I played a few times with Google actions butt it's not easy to get a reaction into the local Network without hardware inside home and inside the private network without open port etc

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [16 November 2018 00:34 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/8 "2018-11-16T00:34:05Z")

</div>

Wouldn't you be able to do this and deliver it as a Docker Container (for instance) - this then means updates are easy if done correctly and each person would control their own system and could run it at home or on a Hosted environment of their choice ?

You could then have a subscription fee for the updates etc but would not have to hassle with purchasing a hosted server

Craig

---

<div class="post-metadata">

**Author:** ![Deon](https://avatars.discourse-cdn.com/v4/letter/d/67e7ee/32.png) [@Deon](https://discourse.nodered.org/u/Deon)\
**Post date:** [16 November 2018 01:30 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/9 "2018-11-16T01:30:40Z")

</div>

I use HomeAutio.Mqtt.GoogleHome ([https://github.com/i8beef/HomeAutio.Mqtt.GoogleHome](https://github.com/i8beef/HomeAutio.Mqtt.GoogleHome)) which is running in docker which Google Home can interface with 'directly'.  
It integrates with MQTT, not with NodeRed but is simple to use via NodeRed.  
It's not easy to set up, but works brilliantly once its up and running.

---

<div class="post-metadata">

**Author:** ![andrei-tatar](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei-tatar/32/3780_2.png) [@andrei-tatar](https://discourse.nodered.org/u/andrei-tatar)\
**Post date:** [16 November 2018 08:34 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/10 "2018-11-16T08:34:13Z")

</div>

Well, it can be made entirely as a node red plugin, so no need for docker but that would mean exposing it to the internet, a domain, a signed certificate, setting up a Google home action, etc. I was thinking to do something as painless as possible...

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [16 November 2018 22:29 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/11 "2018-11-16T22:29:01Z")

</div>

Thats the point of doing it in docker - you provide the docker compose file - it can pull down a couple of Images, Nginx, Letsencrypt etc and can script whatever customisation is required.

Craig

---

<div class="post-metadata">

**Author:** ![i8beef](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/i8beef/32/3161_2.png) [@i8beef](https://discourse.nodered.org/u/i8beef)\
**Post date:** [17 November 2018 21:45 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/12 "2018-11-17T21:45:26Z")

</div>

> It's not easy to set up, but works brilliantly once its up and running.

Just a heads up, if you happen to be good at writing documentation or have suggestions on how to improve what I have, etc. I welcome that. The process is a little inherently complicated, but Google doesn't do us many favors with the complexity of their solution... and I admittedly am not the best at documentation 🙂

---

<div class="post-metadata">

**Author:** ![mikejac](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mikejac/32/3891_2.png) [@mikejac](https://discourse.nodered.org/u/mikejac)\
**Post date:** [20 November 2018 10:28 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/13 "2018-11-20T10:28:32Z")

</div>

If anyone is up to it, you can give this one a try:

```
 https://www.npmjs.com/package/node-red-contrib-google-smarthome

```

/michael

---

<div class="post-metadata">

**Author:** ![andrei-tatar](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei-tatar/32/3780_2.png) [@andrei-tatar](https://discourse.nodered.org/u/andrei-tatar)\
**Post date:** [29 November 2018 14:01 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/14 "2018-11-29T14:01:58Z")

</div>

I created a first alpha version for integration ([https://www.npmjs.com/package/node-red-contrib-nora](https://www.npmjs.com/package/node-red-contrib-nora)). For now only a switch node is available, more coming soon (light, outlet, thermostat, etc.). It's very similar to the dashboard switch. The backend service is not open source (yet...?) and is hosted on a free heroku dyno in the Europe region.

If anyone wants to test it, send me a private message to provide a user/pass (I will also need the email address you use with your google home, in order to add you to the google action test users since it's not published yet).

The process is pretty simple:

1. go to [https://node-red-google-home.herokuapp.com/](https://node-red-google-home.herokuapp.com/) and login
2. copy the access token
3. go to node-red and install `node-red-contrib-nora`
4. create a nora-config node with the access token you just copied
5. add the switch nodes and deploy the flow
6. go to google home and link the account (add/setup device/have something set up/select NORA/enter user-pass)

Steps 1,2,3,6 - need to be done only once. Make sure you have some nodes before linking the accounts.

When the nodes change, they automatically get synced (including request sync to google [https://developers.google.com/actions/smarthome/request-sync](https://developers.google.com/actions/smarthome/request-sync)) so they should automatically update in your Google Home app. Report state is also implemented ([https://developers.google.com/actions/smarthome/report-state](https://developers.google.com/actions/smarthome/report-state)) so the latency should be small enough. The data between node-red and nora is passed via [socket.io](http://socket.io) (websocket ideally). Once the connection is closed, Google Home is informed that all the last known devices went offline.

Keep in mind this is a very early version so it might be unstable in some situations. Also it's hosted on a free dyno and it has a limited number of up time hours in a month and maybe some other limitations.

Once it's stable enough, I will upgrade it to a hobby dyno and leave it for free to everyone (what registration methods do you prefer?).

---

<div class="post-metadata">

**Author:** ![pakerfeldt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pakerfeldt/32/3101_2.png) [@pakerfeldt](https://discourse.nodered.org/u/pakerfeldt)\
**Post date:** [29 November 2018 14:36 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/15 "2018-11-29T14:36:19Z")

</div>

I would love to try this out but I'm unable to find how to send private messages?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [29 November 2018 16:06 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/16 "2018-11-29T16:06:03Z")

</div>

Click on Andreis icon above (hopefully gives you a message link)

---

<div class="post-metadata">

**Author:** ![pakerfeldt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pakerfeldt/32/3101_2.png) [@pakerfeldt](https://discourse.nodered.org/u/pakerfeldt)\
**Post date:** [29 November 2018 17:02 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/17 "2018-11-29T17:02:00Z")

</div>

That's the thing. I don't see anything. Maybe I haven't been active enough to be trusted with PM capabilities.

---

<div class="post-metadata">

**Author:** ![andrei-tatar](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei-tatar/32/3780_2.png) [@andrei-tatar](https://discourse.nodered.org/u/andrei-tatar)\
**Post date:** [30 November 2018 07:01 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/18 "2018-11-30T07:01:47Z")

</div>

I did send you a message, did you receive it?  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/6/6241ffd1751d24ce7197ae69a0e75e0b5b8931cc.png)

---

<div class="post-metadata">

**Author:** ![pakerfeldt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pakerfeldt/32/3101_2.png) [@pakerfeldt](https://discourse.nodered.org/u/pakerfeldt)\
**Post date:** [30 November 2018 08:16 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/19 "2018-11-30T08:16:26Z")

</div>

I did, thanks. But I still seem unable to initiate a new PM thread myself.

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [1 December 2018 10:26 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/20 "2018-12-01T10:26:23Z")

</div>

> [@andrei-tatar](#):
>
> 1. go to google home and link the account (add/setup device/have something set up/select NORA/enter user-pass)

Got this working now after a few trips & falls!  
To expand upon para 6, I found that the following worked well for me;

1. Open the Google Home app ![Google Home app](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/b/b56c5a4fcb9e9bf471fb57861089537fb8bd5b2a.png).
2. In the bottom right corner of the Home screen, tap **Account**![](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/9/944ac727badb193d2bf9c14f592ca30af1717a85.png).
3. Make sure that the Google Account listed is the one linked to your device. To switch accounts, click the down arrow ![](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/9/9967a26594ad14e09ad6cbbeef2754676ae66acd.png).
4. Tap **Settings**.
5. Tap **ASSISTANT** tab ![and then](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/d/dfa7ac83cbd7d0076ef2dcc830cc7f58d4141c98.png) **Home Control.**
6. To add Nora, Tap **+** in the bottom right corner, and search/select **[test]NORA**

Paul

[Next page](https://discourse.nodered.org/t/node-red-google-home-integration/4829.md?page=2)
