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

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

</div>

> [@andrei-tatar](#):
>
> This new version brings the fix for the light node (with custom override)

Great, thanks. I'll run some quick tests tonight.

---

<div class="post-metadata">

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

</div>

I think a number of people will be interested in the ESP8266 facility as we use WeMos D1 Minis.

---

<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:** [13 December 2018 00:40 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/44 "2018-12-13T00:40:07Z")

</div>

> [@rgerrans](#):
>
> Great, thanks. I'll run some quick tests tonight.

That works great, thanks!!

---

<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:** [13 December 2018 01:51 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/45 "2018-12-13T01:51:39Z")

</div>

> [@andrei-tatar](#):
>
> The room hint is forwarded to google home. It uses it to assign the devices to rooms. Otherwise you will need to manually assign them in google home and in case of unlink/link account again, that information is lost.

This piece isn't working for me. It might be because I have two homes setup in Google Home?

---

<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:** [13 December 2018 02:22 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/46 "2018-12-13T02:22:38Z")

</div>

@andrei-tatar Another idea to simplify would be to combine the Node Name with the device name so I'm not having to put the same name in both. That seems to be how other Nodes I use approach this situation.

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

Though I just had a situation where I considered using different ones. Maybe a default state if the device name is left blank it inherits the Node name.

Since I can't post 3 consecutive messages, will add on here:

> [@andrei-tatar](#):
>
> Do you want any other device support?

Would you mind adding Fans as a device node type?

Thanks

---

<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 December 2018 06:48 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/47 "2018-12-13T06:48:22Z")

</div>

Room hint will work only on the initial sync (when the device is first sent to google - first deploy). Once rooms are assigned in google home, google home will not update the room anymore from the room hint. You need to reassign to different rooms from there.

The Device name is mandatory (first input). It's the one that is sent to google home. The node name (last input) is not mandatory and if it's not set, the device name is used as a label for a node. So you don't need to set a node name, only if you want to name the node differently.

---

<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 December 2018 13:00 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/48 "2018-12-13T13:00:12Z")

</div>

**There was an error in the light node**. Just published node-red-contrib-nora@0.0.17 that addresses it. Make sure to update if you were using that version.

---

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

</div>

> [@andrei-tatar](#):
>
> **There was an error in the light node**.

Do you think that's what is creating the room issue not syncing issue? I'm definitely setting information ahead of the initial sync.

> [@andrei-tatar](#):
>
> The Device name is mandatory (first input). It's the one that is sent to google home. The node name (last input) is not mandatory and if it's not set, the device name is used as a label for a node. So you don't need to set a node name, only if you want to name the node differently.

I totally get that. What I'm proposing is to put logic in the node such that if you fill in the Node name and leave the Device name blank, the Node name will be synced as the Device name. Just looking for simple ways to ease deployments. If I get a chance tonight I can look to see with my limited programing skills if I can create a branch to demonstrate what I'm suggesting.

Thanks again for all the hard work.

---

<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 December 2018 15:56 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/51 "2018-12-13T15:56:03Z")

</div>

> [@rgerrans](#):
>
> Do you think that's what is creating the room issue not syncing issue? I'm definitely setting information ahead of the initial sync.

Could be... Althogh if the device was already synced, the room is not updated any more. That's because google home ignores it. It's important only for the 1st sync.

> [@rgerrans](#):
>
> I totally get that. What I'm proposing is to put logic in the node such that if you fill in the Node name and leave the Device name blank, the Node name will be synced as the Device name. Just looking for simple ways to ease deployments. If I get a chance tonight I can look to see with my limited programing skills if I can create a branch to demonstrate what I'm suggesting.

I don't really see the point since you can already leave the name blank and just complete the device name. But it's a small change, either way. If you create a github issue, I'll remember to also change this on the next batch of changes.

---

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

</div>

The default for all core nodes is the way you have it now... the Name field is an optional override for the flow author. This should remain as-is.

---

<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:** [14 December 2018 05:55 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/53 "2018-12-14T05:55:47Z")

</div>

> [@andrei-tatar](#):
>
> Could be... Althogh if the device was already synced, the room is not updated any more. That's because google home ignores it. It's important only for the 1st sync.

Just tested with v.17 and adding a new light with a room hint filled out and it still put it in "not in rooms" bucket in Google Home. See the same thing with outlets as well.

---

<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 December 2018 06:08 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/54 "2018-12-14T06:08:46Z")

</div>

That's strange. Does anyone else experience this issue? I just tested on my setup and it works fine (both with light and outlet). What if you unlink and link NORA again, does it recognize all the rooms?

---

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

</div>

Just tried it again, and still working fine for me - v0.0.17

@rgerrans Are you using any unusual characters in your room name, what if you tried 'Rons Study', does that work (works fine here).

 ![ron](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/e/e449d8abe227b7f373653d82658679bf49847d0f.png)

---

<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:** [14 December 2018 12:30 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/56 "2018-12-14T12:30:19Z")

</div>

> [@Paul-Reed](#):
>
> Are you using any unusual characters in your room name, what if you tried 'Rons Study', does that work (works fine here)

No unusual characters in the majority of the room name (I do use apostrophes in a couple). I suspect that it has to do with having two homes setup in Google Home. I'll see if I can find any related documents this weekend or remove the second home and test.

> [@andrei-tatar](#):
>
> What if you unlink and link NORA again, does it recognize all the rooms?

I'll test that as well this weekend. Thanks

---

<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:** [14 December 2018 19:12 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/57 "2018-12-14T19:12:38Z")

</div>

Why doesn't the below example change the state of the 'Light node'.  
I've tried both boolean states, and also `brightness: 50` - same result.

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

The input into the Light node is;

![output](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/f/fd14822393732fc6da523a81e20f840a044c2ddf.png)

I get the error;

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

```auto
[{"id":"cc08d885.e4aa98","type":"nora-light","z":"c53060.842a0fa","devicename":"Test light","brightnesscontrol":true,"statepayload":true,"brightnessoverride":"","roomhint":"Garden","name":"","nora":"6155c6f5.a27978","topic":"","onvalue":"on","onvalueType":"str","offvalue":"off","offvalueType":"str","x":300,"y":1100,"wires":[[]]},{"id":"41e51f9c.d6183","type":"inject","z":"c53060.842a0fa","name":"","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":1050,"wires":[["fb583666.39a9b8"]]},{"id":"fb583666.39a9b8","type":"change","z":"c53060.842a0fa","name":"","rules":[{"t":"set","p":"on","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":280,"y":1050,"wires":[["65783ecd.60868","cc08d885.e4aa98"]]},{"id":"65783ecd.60868","type":"debug","z":"c53060.842a0fa","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":490,"y":1050,"wires":[]},{"id":"6155c6f5.a27978","type":"nora-config","z":"","name":"Home config"}]

```

---

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

</div>

> [@Paul-Reed](#):
>
> Why doesn't the below example change the state of the 'Light node'.

I'm not home so can't load the flow. In your change node, are you changing it to True/False (boolean not string value)? ALso make sure you are setting `msg.payload.on` It looks from your object output that you might just be setting `msg.on`

---

<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:** [14 December 2018 22:00 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/59 "2018-12-14T22:00:48Z")

</div>

Yes, it was the format that was wrong!

Injecting the number 50 to a change node formatted as;

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

works OK, as does injecting boolean state to `msg.payload.on`

Thanks Ron

---

<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:** [14 December 2018 23:19 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/60 "2018-12-14T23:19:47Z")

</div>

Hhmm, I'm moving in the right direction, but still not working.  
In the video below, I'm injecting `msg.payload.on` with true/false, and as can be seen, although the node.status correctly changes, there is no output from the nora Light node to pass to MQTT.

Issuing a voice command, the node.status changes, and also produces a debug & MQTT msg.

---

<div class="post-metadata">

**Author:** ![karacho](https://avatars.discourse-cdn.com/v4/letter/k/45deac/32.png) [@karacho](https://discourse.nodered.org/u/karacho)\
**Post date:** [14 December 2018 23:28 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/61 "2018-12-14T23:28:20Z")

</div>

Hello Andrei,

Thanks a lot for your work! I'm still very new to Node-RED and just tried to setup NORA (0.0.17). Unfortunately, I can't seem to find the "[test] NORA" service in the Google Home app. I did log-in on [https://node-red-google-home.herokuapp.com](https://node-red-google-home.herokuapp.com) using my Google account and, using the access token, my Google Home nodes show as "connected".

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.

Thank you!

---

<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 00:46 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/62 "2018-12-15T00:46:21Z")

</div>

> [@Paul-Reed](#):
>
> I'm moving in the right direction, but still not working.

I think I see the disconnect. The Nora nodes do not pass through the input to ouput. The way I understand them is:

- the input is to send a status update to Google Home. So when you send an On to the input side then Google Home will show your light on.
- the output side is to take a Google Home command and send it to your device. So when you issue a voice command (or a physical change in Google Home) you'll then see the output from the NORA node.

Took me a couple of passes before I realized this (was actually building in an RBE loop because I was afraid of circular logic when I realized my messages weren't passing through). Most contrib nodes I've seen are like the MQTT which has separate input and output nodes. But I do like not having to deal with multiple nodes and I don't know if you could since each node is a new device in Google Home.

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

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