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

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

</div>

So you are making the request via NORA, but replying by casting the node-RED response.

You could create a custom Routine in Google Home to run the command 'Schalte die Batterie ein' and call it 'was ist die terrassentemperatur'.

---

<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 19:53 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/84 "2018-12-18T19:53:07Z")

</div>

Hello Paul, thanks for your tutorial. Do you know the Home Assistant? I love it!!! The first 3 pictures are a "flow". Here's an example to start a "Call Service" action. Figure 4 shows a "flow" to query a status "current state". Sorry, if I did not disconnect it. Yes, the Google Assistant Routine is a very good thing, but they have nothing directly to do with the "flow" in Node-RED, because you are free-configured and only a trigger for the "flow".

---

<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:** [19 December 2018 08:35 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/85 "2018-12-19T08:35:01Z")

</div>

> [@VolKah](#):
>
> Yes, the Google Assistant Routine is a very good thing, but they have nothing directly to do with the "flow" in Node-RED, because you are free-configured and only a trigger for the "flow".

I think @Paul-Reed was suggesting to use a `scene` to activate the flow. You can customize a routine to activate a scene when it's triggered.

---

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

</div>

I needed to do some refactoring in the interaction between Google and NORA (I wasn't using proper refresh tokens).

## You will need to unlink and link again NORA in Google Home in order for it to work again.

---

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

</div>

The re-link went OK, but I'm seeing these warnings in the node-RED log;

```auto
19 Dec 13:19:33 - [warn] nora (OYkDk): disconnected (transport close)
19 Dec 14:20:49 - [warn] nora (OYkDk): disconnected (transport close)
19 Dec 15:01:56 - [warn] nora (OYkDk): disconnected (transport close)
19 Dec 22:01:08 - [warn] nora (OYkDk): disconnected (transport close)

```

Anything to worry about?

---

<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:** [20 December 2018 08:34 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/88 "2018-12-20T08:34:26Z")

</div>

No, it restarts when I push changes (also working on the thermostat node) and after 24 hours of activity...

---

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

</div>

After around 5 day of use I have to say: This is just perfect!  
Very easy and straightforward to implement. Also it is quite stable and very fast!

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

</div>

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

Got a chance to test with the refactoring you did this week, and unfortunately all the devices came through without the room names. Istill think it's the fact I have multiple homes available in Google Home. I'll spend some time skimming the documentation to see if I can learn anything.

---

<div class="post-metadata">

**Author:** ![jairo1](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@jairo1](https://discourse.nodered.org/u/jairo1)\
**Post date:** [21 December 2018 16:18 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/91 "2018-12-21T16:18:08Z")

</div>

Hi Andrei,  
I would like to try your service, can you send me a private message? I do not see how to do 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:** [22 December 2018 15:12 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/92 "2018-12-22T15:12:01Z")

</div>

Not sure if you noticed but I sent you a PM

---

<div class="post-metadata">

**Author:** ![BadMud](https://avatars.discourse-cdn.com/v4/letter/b/57b2e6/32.png) [@BadMud](https://discourse.nodered.org/u/BadMud)\
**Post date:** [22 December 2018 17:23 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/93 "2018-12-22T17:23:17Z")

</div>

Hi, i also can't finde way to send You PM, pleas could You add my email adress

[viobama@gmail.com](mailto:viobama@gmail.com)

Regards  
BG

---

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

</div>

If you double click on the name **andrei-tatar** next to his avatar in any of his posts, you should see a popup like this appear -

 ![andrei](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/6/63f96960a32134d213e11d8c53af22d245bd88ee.png)

Then click on Message, and rest is self explanatory.

Paul

---

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

</div>

I've been trying to figure out this puzzle for a while now and hitting a brick wall. I can use the nora "Switch" node and turn my TV On/Off fine via WOL and the "Call Service" Home Assistant node. However, the problem is that I usually use my FireTV remote to turn on the TV, so the state of the Nora Switch doesn't change since I never turned it on that way. This wouldn't be an issue, except for the fact that I can't "Turn Off" something that Google/Nora already thinks is off.

I spent a lot of time trying combinations with input\_boolean and even noticed an "input\_boolean.toggle" but I couldn't manage to make that work either. This seems like it would be a common problem, but the only thread I can find on it is here:

> **[Performing switch/input\_boolean "off action" when hass thinks it is already off....](https://community.home-assistant.io/t/performing-switch-input-boolean-off-action-when-hass-thinks-it-is-already-off-broadlink/41616/17?fbclid=IwAR0mEpIzBEoA2HSd9BJLztu1daN1b6xEcV_z7t5sw03NfppT0_eSzZjXyL4)**
>
> I have the same problem…best would be to have a way in the config to force to trigger the event…

Any suggestions on how I can make this work with Nora would be greatly appreciated! If any additional information is needed, I'd be happy to provide that as well.

Happy Holidays!

---

<div class="post-metadata">

**Author:** ![Axedem](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/axedem/32/4678_2.png) [@Axedem](https://discourse.nodered.org/u/Axedem)\
**Post date:** [23 December 2018 19:58 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/96 "2018-12-23T19:58:11Z")

</div>

Hi, i can't send You PM, not have the PM button, please could You add my email adress too

[vposterv@gmail.com](mailto:vposterv@gmail.com)

Thank you.

---

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

</div>

I saw the same problem when controlling some lights by both voice (NORA) and also a timer, which resulted in the timer switching the lights off, whilst NORA thought the lights were still on.

The way I resolved this was to rework the timers, and direct all commands - both voice AND timers through NORA, so it was always in sync.

You would need to somehow get the change in status from your TV fed into node-RED, to indicate that the TV was now switched off, and then use that to update Google via NORA.  
Is your TV a 'smart' tv? does it have an api? where maybe you could get this info.

---

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

</div>

If you [check this post](https://discourse.nodered.org/t/node-red-google-home-integration/4829/94), what is stopping you from sending a PM?  
You are not the first to have problems with PM's, and it would be good to know why.

---

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

</div>

I was thinking along the same lines, but ran into troubles fetching the current state. I tried using the "Current State" node for Home Assistant, then directing that to the Nora Switch node, but it doesn't seem to change the Nora Switch state. I'm unsure if I can use "Current State" to invoke the flow since it has an input option or if I need some type of Inject node.

The TV is an webOS LG Smart TV, I'm using the media\_player component to interact with it in Home Assistant

> **[LG webOS Smart TV](https://www.home-assistant.io/components/media_player.webostv/)**
>
> Instructions on how to integrate a LG webOS Smart TV within Home Assistant.

---

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

</div>

My NORA node is configured like this;

![nora1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/8/8dd2e661eac64fc20301b87574c0f0cc12887ca2.png)

...and if I inject into NORA a string "on" or "off", then Google is updated accordingly.  
Note that I'm injecting the same message "on", as is entered in NORA config. (it could be boolean, a number etc - so long as the injected msg & NORA config are the same)

---

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

</div>

Hello, one possibility might be a w-lan outlet with fuel gauge. If it is possible to query the power consumption in Home Assistant, would you know if the TV is on or off? That's just an idea, I do not have it myself.

greetings

Volker

---

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

</div>

Thanks, I think I may have got it, as the string values you posted pointed me in the right direction. I just have to wait until my roommate is done watching football in order to test.

I'm now using the "State" Home Assistant node and this whole time I was going by the "Service" options like "turn\_on" or "turn\_off" but I noticed the status was "Playing" in node-red and once I put that in the "On Payload" field, the nora node will now sync

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

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

If I turn the nora Switch node off, as long as the TV is playing, it will sync and switch to On as well. I'm 'assuming' this will also switch to Off when the TV's status goes from "Playing" to state "Off" and if this is the case, this setup will work. I'll confirm once I'm able to test and connect that last node.

UPDATE: It works! The Nora Switch node now syncs perfectly with the state of the TV. It takes a moment for Home Assistant to detect that the TV is "Playing", clocked it at 24 seconds, but since I'm not planning on rapidly turning on or off my TV this will work nicely.

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

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