# 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:** 4

<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:** [15 December 2018 09:08 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/63 "2018-12-15T09:08:55Z")

</div>

I wasn't expecting a pass-through from input to output, but I did expect that the node would output its change of status, in pretty much the same way as it does after receiving a voice command, so that the flow can instruct the MQTT relay board accordingly.

> [@rgerrans](#):
>
> ...(or a physical change in Google Home) you'll then see the output from the NORA node.

Yes exactly. By injecting `msg.payload.on` = true, I am causing a change in Google Home, but I don't see a corresponding output from the NORA node.

The user case is controlling lighting via timers (inject nodes feeding into NORA) and being able to override via voice.

Paul

---

<div class="post-metadata">

**Author:** ![fightforlife](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fightforlife/32/4527_2.png) [@fightforlife](https://discourse.nodered.org/u/fightforlife)\
**Post date:** [15 December 2018 14:26 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/64 "2018-12-15T14:26:07Z")

</div>

Hey,  
this exactly what I am looking for!  
Sadly I can not write you a PM. Can I somehow give you mail mail adress for the Testuser list.  
I am already verified and have my nodered up and running.

Just as a question: what is needed to selfhost the backend part? (I have a VPS, which is not used at the moment) A docker image for the backend part would be really cool!

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![rgerrans](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@rgerrans](https://discourse.nodered.org/u/rgerrans)\
**Post date:** [15 December 2018 15:19 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/65 "2018-12-15T15:19:44Z")

</div>

> [@Paul-Reed](#):
>
> I wasn't expecting a pass-through from input to output, but I did expect that the node would output its change of status,

If it did, you would be at risk of circular logic loop with out putting in place an RBE node.i.e. you manually update your device, MQTT sends a notice to NORA, NORA sends an update to MQTT which tells your device to change, MQTT then sends an update to NORA..... I started building the loop blocker until I realized it didn't do it so was safe.

> [@Paul-Reed](#):
>
> The user case is controlling lighting via timers (inject nodes feeding into NORA) and being able to override via voice.

I would suggest just sending your on command in parallel to your update to NORA. Think of NORA more as a control dashboard that you are updating status to / receiving commands from. Here's a quick mockup of what I'm suggesting:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/c/c6688a4fc4a38f83735a834b44552af3221d7999.png)

Or if you want it more robust (I believe you were using MQTT) and since you can only have one NORA node per Google Home device, I would do like I'm doing and just setup stand alone status / control flows and do your on timer independent of NORA. Like this (obvious with change nodes if needed if you are doing full object based control vs. just #'s):

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/0/04aef859f5224f0ed5c8ab13a8b56ee9571c9a4d.png)

Then when your timer tells your light to turn on, it will notify NORA/Google Home that it's on. Then if you send an overriding voice command then it will change the light to that output.

Let me know if that makes sense.

---

<div class="post-metadata">

**Author:** ![fightforlife](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fightforlife/32/4527_2.png) [@fightforlife](https://discourse.nodered.org/u/fightforlife)\
**Post date:** [15 December 2018 16:40 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/66 "2018-12-15T16:40:48Z")

</div>

I solved this problem with a little loop for every device.  
So I can feed the command into the fuction und get the command back. In the mean time Google is kept in sync. This also works with voice comands.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/2/230e83b9eb73664ed7914b2c04f0db7a00a6350b.png)

---

<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:** [15 December 2018 16:59 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/67 "2018-12-15T16:59:26Z")

</div>

Can you share what you have in the function node please.

Paul

---

<div class="post-metadata">

**Author:** ![fightforlife](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fightforlife/32/4527_2.png) [@fightforlife](https://discourse.nodered.org/u/fightforlife)\
**Post date:** [15 December 2018 17:04 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/68 "2018-12-15T17:04:45Z")

</div>

It is just the normal function node.  
`return msg;`  
Just to pass a message through.

Edit:  
This way it imitates the expected behavior of Input-\>Output.

---

<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:** [15 December 2018 17:06 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/69 "2018-12-15T17:06:41Z")

</div>

I could an an extra config checkbox for all the nodes (Pass-through the input messages), like the dashboard nodes, if you guys find it useful.

---

<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:** [15 December 2018 17:07 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/70 "2018-12-15T17:07:56Z")

</div>

> [@fightforlife](#):
>
> Sadly I can not write you a PM. Can I somehow give you mail mail adress for the Testuser list.  
> I am already verified and have my nodered up and running.

I sent you a PM.

> [@fightforlife](#):
>
> Just as a question: what is needed to selfhost the backend part? (I have a VPS, which is not used at the moment) A docker image for the backend part would be really cool!

If you want to selfhost, you can check this npm package [node-red-contrib-google-smarthome - npm](https://www.npmjs.com/package/node-red-contrib-google-smarthome).

---

<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:** [15 December 2018 17:13 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/71 "2018-12-15T17:13:17Z")

</div>

> [@andrei-tatar](#):
>
> I could an an extra config checkbox for all the nodes (Pass-through the input messages), like the dashboard nodes, if you guys find it useful.

I think would be helpful, for both the Switch and Light node.

---

<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:** [15 December 2018 17:35 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/72 "2018-12-15T17:35:37Z")

</div>

> [@karacho](#):
>
> Is it still the case, that you need to manually add email addresses to the "[test] NORA" group? If so, would you mind sending me a PM, as I can't seem to intiate PMs? Otherwise I would greatly appreciate any help on what configuration step I might have missed.

Yes, it is. Sent you a PM.

> [@Paul-Reed](#):
>
> I think would be helpful, for both the Switch and Light node.

Just published 0.0.18

---

<div class="post-metadata">

**Author:** ![jaytea33](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@jaytea33](https://discourse.nodered.org/u/jaytea33)\
**Post date:** [15 December 2018 17:57 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/73 "2018-12-15T17:57:00Z")

</div>

Any chance you could PM me as well so I could have my email added? Ever since Google Home killed my emulated hue setup I've been looking for a new solution without having to forward ports and this finally seems like what I've been looking for!

---

<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:** [15 December 2018 18:47 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/74 "2018-12-15T18:47:31Z")

</div>

> [@andrei-tatar](#):
>
> Just published 0.0.18

That works fine now, and has somewhat simplified the flow.

![nora](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/b/bb6d9dec9f6147c06eb5f422ed2532b71b67d993.png)

---

<div class="post-metadata">

**Author:** ![fightforlife](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fightforlife/32/4527_2.png) [@fightforlife](https://discourse.nodered.org/u/fightforlife)\
**Post date:** [16 December 2018 22:52 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/75 "2018-12-16T22:52:15Z")

</div>

Do you think it would be possible to add a thermostat node?  
[https://developers.google.com/actions/smarthome/guides/thermostat](https://developers.google.com/actions/smarthome/guides/thermostat)  
There are these cheap Bluetooth thermostats, which already got decoded by someone.

This would be a cool way to integrate them into the Google system.

The WiFi thermostats are still kind of expensive.

---

<div class="post-metadata">

**Author:** ![emmanuel-W](https://avatars.discourse-cdn.com/v4/letter/e/df705f/32.png) [@emmanuel-W](https://discourse.nodered.org/u/emmanuel-W)\
**Post date:** [17 December 2018 09:29 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/76 "2018-12-17T09:29:33Z")

</div>

Hi there ! I'm a French new user on this forum, so my apologies for my relative bad english..

Thank you for assuming this interesting project ! I was looking for a solution like this from a while..

So I tried it but I've got a problem setting up the NORA service...😕 It doesn't appear in my "add service" list.  
Can anyone help me please ?

Thank you !

Emmanuel W.

---

<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:** [17 December 2018 09:53 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/77 "2018-12-17T09:53:06Z")

</div>

> [@fightforlife](#):
>
> Do you think it would be possible to add a thermostat node?

It's on the list...

> [@emmanuel-W](#):
>
> So I tried it but I've got a problem setting up the NORA service...😕 It doesn't appear in my "add service" list.  
> Can anyone help me please ?

Send me a PM with the gmail address you use with your Google Home. For the moment I need to manually add users as "testers" in order for them to see the action.

---

<div class="post-metadata">

**Author:** ![emmanuel-W](https://avatars.discourse-cdn.com/v4/letter/e/df705f/32.png) [@emmanuel-W](https://discourse.nodered.org/u/emmanuel-W)\
**Post date:** [17 December 2018 10:08 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/78 "2018-12-17T10:08:30Z")

</div>

Thank you for your reply !  
I'm looking for the way to send you a PM but I don't find it.. 🤨

---

<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:** [17 December 2018 11:24 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/79 "2018-12-17T11:24:31Z")

</div>

Sent you a PM

---

<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:** [17 December 2018 20:24 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/80 "2018-12-17T20:24:11Z")

</div>

Any thoughts about integrating data stored/generated locally from node-RED into a response?

_Example;_  
"What is the **patio temperature**?"  
"The **patio temperature** is {{13}} degrees"

I realise that this can be achieved using a 'test app' approach (node-red-contrib-google-action), and maybe it's outside of the scope of NORA, but thought I'd ask anyway!!

Paul

---

<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:** [18 December 2018 10:02 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/81 "2018-12-18T10:02:39Z")

</div>

I don't plan on adding support for custom actions any time soon.  
Currently only what smart home supports. There are some open issues regarding reading sensor values so maybe this will turn to something useful:

> <https://github.com/actions-on-google/smart-home-nodejs/issues/227>

  

> <https://github.com/actions-on-google/smart-home-nodejs/issues/135>

---

<div class="post-metadata">

**Author:** ![VolKah](https://avatars.discourse-cdn.com/v4/letter/v/b19c9b/32.png) [@VolKah](https://discourse.nodered.org/u/VolKah)\
**Post date:** [18 December 2018 14:12 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/82 "2018-12-18T14:12:16Z")

</div>

Hello and thank you again Andrei\_Tatar.

I have on my RaspberryPi [Hass.io](http://Hass.io) as the operating system [[https://www.home-assistant.io/](https://www.home-assistant.io/)] and the Node-RED addon installed, the whole looks like this:

 ![1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/5/5faa3055fc0e0c7fcee1be3232e9235206801cc2.png)

If you now open Node-RED, here is a "node" of "Home Assistant" available:

 ![2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/0/05fa1bb839c386f503441b83aaf5c8d6855ffaca.png)

Here I have the "nora" "node" installed:

 ![3](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/7/7dd881cf94144da5e515131c2264155f814f5b78.png)

Now I say to the Google Assistant: "Schalte die Batterie ein". The nora link to the Google Account now starts the existing flow. In the flow, the corresponding switch is then assigned with "Call a service" in Home Assistant.

Oh yes, the whole thing works as a "status query" with audio output on Google Home ...

But still this "node" is necessary, if not yet available: [[https://flows.nodered.org/node/node-red-contrib-cast](https://flows.nodered.org/node/node-red-contrib-cast)]

 ![4](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/1/1089d82d3192ced1db64c8a240858cd596bfd9ce.png)

Greetings

Volker

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

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