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

<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:57 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/103 "2018-12-23T20:57:21Z")

</div>

With NodeRED you can "ping" devices in the network. If you get a "false" answer, the device is off, right? Please ignore or improve if this is wrong ...

---

<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:59 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/104 "2018-12-23T20:59:53Z")

</div>

There is definitely a ping node, and I tried that approach but unfortunately wasn't successful. It's probably possible and I likely borked the config in some way. If the approach I'm going for now doesn't happen to work I'll circle back to it.

---

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

</div>

Starting to get the hang of this now

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

Now it doesn't matter whether the TV is turned on by physical remote or by Google, I'll be able to turn it on or off regardless at all times since Nora will always be in sync. All I had to do was pass that "playing" state to the switch and direct accordingly. The same tactic worked for my Fire TV.

---

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

</div>

@andrei-tatar I was setting up some virtual switches to control a group of lights and realized the on a light node only takes 0-100 and won't accept On/Off if "Allow Brightness Control" is checked and "Send/receive complete state" is not checked. Is this by design or a bug?

---

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

</div>

Isn't 0 = Off?

---

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

</div>

Yes it is. It was more that I got confused between complete state vs non-complete and if you could send/receive an explicit off/on command. In retrospect the switch is working as designed of sending/receiving raw brightness #'s with the "Send/receive complete state" off.

My mistake.

---

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

</div>

Just sharing.

For anyone who is using lights that use 0,255,brightness as the inputs/outputs and want to use "Send/receive complete state" set to on, here are subflows I put together to convert between a complete state object and a 0,255,brightness level depending on if Off/On/Change in Brightness is received from NORA (or vice versa on the input).

Here is a post-NORA node ( **Note:** my interface to HomeSeer requires strings so if you need numbers you might need to make a change to the change nodes to use numbers and not strings) :

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

```
[{"id":"d6132d2d.a892c","type":"subflow","name":"NORA - Post","info":"","category":"","in":[{"x":80,"y":180,"wires":[{"id":"116868a0.ec08b7"}]}],"out":[{"x":780,"y":180,"wires":[{"id":"19aaafe8.1c9cc","port":0},{"id":"2af74ff0.26cc9","port":0},{"id":"4f2a09b0.731858","port":0}]}]},{"id":"116868a0.ec08b7","type":"switch","z":"d6132d2d.a892c","name":"On/Off","property":"payload.on","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":210,"y":180,"wires":[["faafcfc6.f2528"],["4f2a09b0.731858"]]},{"id":"4f2a09b0.731858","type":"change","z":"d6132d2d.a892c","name":"Off","rules":[{"t":"set","p":"onPrevious","pt":"flow","to":"payload.on","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"0","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":220,"wires":[[]]},{"id":"faafcfc6.f2528","type":"switch","z":"d6132d2d.a892c","name":"onPrevious","property":"onPrevious","propertyType":"flow","rules":[{"t":"true"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":390,"y":160,"wires":[["19aaafe8.1c9cc"],["2af74ff0.26cc9"]]},{"id":"2af74ff0.26cc9","type":"change","z":"d6132d2d.a892c","name":"Last","rules":[{"t":"set","p":"onPrevious","pt":"flow","to":"payload.on","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"255","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":180,"wires":[[]]},{"id":"19aaafe8.1c9cc","type":"change","z":"d6132d2d.a892c","name":"Brightness","rules":[{"t":"set","p":"onPrevious","pt":"flow","to":"payload.on","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"payload.brightness","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":570,"y":140,"wires":[[]]}]

```

Here is a pre-NORA node ( **Note:** The function is in there to convert the string I get to a number for NORA):

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

```
[{"id":"6ee85fdd.12c49","type":"subflow","name":"NORA - Pre","info":"","category":"","in":[{"x":80,"y":100,"wires":[{"id":"23f7c1.3972f84"}]}],"out":[{"x":700,"y":100,"wires":[{"id":"43c4e555.32564c","port":0},{"id":"3a7f55a3.65e3da","port":0},{"id":"cc707d6c.fbe7e","port":0}]}]},{"id":"385c570d.c4a378","type":"switch","z":"6ee85fdd.12c49","name":"Status","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"str"},{"t":"eq","v":"255","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":370,"y":100,"wires":[["43c4e555.32564c"],["3a7f55a3.65e3da"],["cc707d6c.fbe7e"]]},{"id":"43c4e555.32564c","type":"change","z":"6ee85fdd.12c49","name":"Off","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload.on","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":530,"y":60,"wires":[[]]},{"id":"3a7f55a3.65e3da","type":"change","z":"6ee85fdd.12c49","name":"On","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload.on","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":530,"y":100,"wires":[[]]},{"id":"cc707d6c.fbe7e","type":"change","z":"6ee85fdd.12c49","name":"Brightness","rules":[{"t":"set","p":"brightnessPrevious","pt":"flow","to":"payload","tot":"msg"},{"t":"move","p":"payload","pt":"msg","to":"payload.brightness","tot":"msg"},{"t":"set","p":"payload.on","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":140,"wires":[[]]},{"id":"23f7c1.3972f84","type":"function","z":"6ee85fdd.12c49","name":"toNumber","func":"msg.payload = parseInt(msg.payload,10);\nreturn msg;","outputs":1,"noerr":0,"x":200,"y":100,"wires":[["385c570d.c4a378"]]}]

```

Edit: Note that you might need to set an initial brightness from your device for the input flow to work correctly.

Edit: Updated the Pre-subnode to remove the Brightness setting for on/off status..

---

<div class="post-metadata">

**Author:** ![jonnyburns](https://avatars.discourse-cdn.com/v4/letter/j/85f322/32.png) [@jonnyburns](https://discourse.nodered.org/u/jonnyburns)\
**Post date:** [1 January 2019 16:39 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/110 "2019-01-01T16:39:51Z")

</div>

Hi Andrei,

Sorry - trying to PM you but can't seem to find how, are you able to add my gmail to your testers list?

Many thanks

Jonny

---

<div class="post-metadata">

**Author:** ![ilbressa](https://avatars.discourse-cdn.com/v4/letter/i/e19adc/32.png) [@ilbressa](https://discourse.nodered.org/u/ilbressa)\
**Post date:** [1 January 2019 17:37 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/111 "2019-01-01T17:37:03Z")

</div>

Hi Andrei, I would love your amazing job.  
Can you add me to the testers?

Kind Regards.

Marco

---

<div class="post-metadata">

**Author:** ![srgi79](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/srgi79/32/4856_2.png) [@srgi79](https://discourse.nodered.org/u/srgi79)\
**Post date:** [1 January 2019 22:12 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/112 "2019-01-01T22:12:13Z")

</div>

Hi everyone, happy new year to all.  
Andrei, can you make me a tester? I can't send you a PM.  
Thanks

---

<div class="post-metadata">

**Author:** ![bloody2k](https://avatars.discourse-cdn.com/v4/letter/b/ecb155/32.png) [@bloody2k](https://discourse.nodered.org/u/bloody2k)\
**Post date:** [2 January 2019 11:56 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/113 "2019-01-02T11:56:11Z")

</div>

Hi Andrei-tatar

Seems it's not possible to PM you, can you add me to the testing crew?

My mail is my username @gmail.com

Thanks

/bloody2k

---

<div class="post-metadata">

**Author:** ![jonnyburns](https://avatars.discourse-cdn.com/v4/letter/j/85f322/32.png) [@jonnyburns](https://discourse.nodered.org/u/jonnyburns)\
**Post date:** [3 January 2019 00:09 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/114 "2019-01-03T00:09:35Z")

</div>

I wonder if anyone can help me - i'm now having an amazing time with Node-RED, thanks to Andrei.

I'm trying to get a switch in Google to send a TCP command. I'm clearly missing something, as sending the HEX command 02 88 00 01 1b 83 00 01 00 00 00 00 00 00 01 8a 03 in Packet Sender activates my device function however my current setup in Node-Red doesn't.  
 ![53](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/2/24edb152ab7490fad10b3f24ab59bb5d73412832.png)

 ![22](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/2/26c0333ee129a1e0223956e52fa696c464496e14.png)  
 ![37](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/c/c1940cc28c05b891e0bc01b765f7f4046d701d61.png)

Is there a particular way to send TCP commands?

---

<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:** [3 January 2019 01:58 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/115 "2019-01-03T01:58:17Z")

</div>

The on output seems to be set to send a string not a binary buffer

---

<div class="post-metadata">

**Author:** ![lephil](https://avatars.discourse-cdn.com/v4/letter/l/d26b3c/32.png) [@lephil](https://discourse.nodered.org/u/lephil)\
**Post date:** [3 January 2019 14:52 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/118 "2019-01-03T14:52:09Z")

</div>

Hi Andrei, could you send me your e-mail adress because I don't know how to send you a PM.

Thanks a lot.

Best regards,

---

<div class="post-metadata">

**Author:** ![PRO2XY](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pro2xy/32/4885_2.png) [@PRO2XY](https://discourse.nodered.org/u/PRO2XY)\
**Post date:** [3 January 2019 15:06 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/119 "2019-01-03T15:06:52Z")

</div>

Hi  
It seems new users or users with no previous posts are not allowed to PM other forum members.  
I would be interested in testing NORA as well.  
Please add me to the testers list.

Regards

---

<div class="post-metadata">

**Author:** ![PRO2XY](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pro2xy/32/4885_2.png) [@PRO2XY](https://discourse.nodered.org/u/PRO2XY)\
**Post date:** [3 January 2019 15:12 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/120 "2019-01-03T15:12:23Z")

</div>

It is perhaps an anti spamming feature for the forum.  
Maybe a google form or something could be used to directly add users to the testers list, now that the userbase is expanding 🙂

 ![Greetings message on joining the forum](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/4/4e5181285821af3f2b57062e71f04c70d4cd9b1a.png)

---

<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:** [3 January 2019 15:39 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/121 "2019-01-03T15:39:34Z")

</div>

I guess it won't be long till NORA is publicly accessible.

---

<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:** [3 January 2019 15:48 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/122 "2019-01-03T15:48:04Z")

</div>

I finally came around trying this plugin but i get stuck trying to link the service to my account. I have activated Actions on Google through their console. I have logged in to Nora, retrieved my access token and pasted it in a dummy light device I set up in my node-red installation. Then, when i open the Home app I can see the [test] NORA service, I can click it and log in, then eventually it redirects back to the "Configure" page in Home. If I open the service list again, NORA is not under linked services. It's listed where I add new services. When I go back to my devices I don't see the ones I have through NORA.

Also, when I try to send something to the NORA node there's an error dialog popping up saying "node is not deployed". However, I have deployed the entire flow.

What am I doing wrong?

---

<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:** [3 January 2019 16:00 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/123 "2019-01-03T16:00:59Z")

</div>

Make sure you have the latest `node-red-contrib-nora` installed and the flow is deployed. In the logs you should see something like `Node-RED[318]: 3 Jan 13:30:44 - [info] nora: sync 10 devices` if the devices were synced. Only after the devices are synced successfully link the service in your Google Home.

---

<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:** [3 January 2019 16:03 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/124 "2019-01-03T16:03:03Z")

</div>

Nevermind, it seems to be I have much bigger issues with the entire node-red instance atm. I'll report back when I've figured this out.

edit/ Almost too embarrassing to even tell, but the Flow I was using was apparently in "Disabled" state so it was never deployed. Now that I've actually deployed it, Home app immediately picked up the devices, didn't have to re-link. Seems very promising so far, well done!

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

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