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

<div class="post-metadata">

**Author:** ![pigsy](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@pigsy](https://discourse.nodered.org/u/pigsy)\
**Post date:** [15 April 2019 05:07 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/206 "2019-04-15T05:07:31Z")

</div>

Hi. Very new to Node-Red. I've been using your project in my home for a week or so now and have found it to be working nicely. Haven't needed to comment on here until today because everything working nicely.  
However at the moment I find all the nodes have disconnected. Is it just Heroku out of action or have I missed something? A payment maybe? Would love to keep this service going.

thanks.  
Rob.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 April 2019 06:26 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/207 "2019-04-15T06:26:28Z")

</div>

> [@pigsy](#):
>
> all the nodes have disconnected.

Can you clarify what you mean by that? It seems to suggest all the wires joining the nodes have disappeared but I suspect that is not what you mean.

---

<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 April 2019 07:27 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/208 "2019-04-15T07:27:54Z")

</div>

> [@pigsy](#):
>
> However at the moment I find all the nodes have disconnected. Is it just Heroku out of action or have I missed something? A payment maybe? Would love to keep this service going.

Nope, still free. I didn't experience any issues with the connectivity however they do disconnect once at 24h (not sure the exact hour) because of the dyno restarting and it may take up to a few minutes to connect back.  
Are you still experiencing issues?

---

<div class="post-metadata">

**Author:** ![pigsy](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@pigsy](https://discourse.nodered.org/u/pigsy)\
**Post date:** [15 April 2019 07:34 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/209 "2019-04-15T07:34:49Z")

</div>

Still have the problem. All my lights have a red square with the word disconnected beneath them. Only noticed it today. When I send a command to google home it responds with "It looks like the [device] not available right now.  
To try and fix it I went to the home page logged in and grabbed a new token. That didn't help. I still have disconnected devices.  
Any help welcomed.

---

<div class="post-metadata">

**Author:** ![pigsy](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@pigsy](https://discourse.nodered.org/u/pigsy)\
**Post date:** [15 April 2019 07:37 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/210 "2019-04-15T07:37:21Z")

</div>

Sorry the word beaneth the devices is "not connected".

---

<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 April 2019 07:48 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/211 "2019-04-15T07:48:12Z")

</div>

Have you tried restarting your node-red service? I assume you do have internet connectivity where you run node-red. Is there anything in the logs (reason for disconnecting)?

---

<div class="post-metadata">

**Author:** ![pigsy](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@pigsy](https://discourse.nodered.org/u/pigsy)\
**Post date:** [15 April 2019 08:56 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/212 "2019-04-15T08:56:37Z")

</div>

Rebooted my PI3 server. Restarted Node-Red. Check logs. Attached. Everything looks fine.

# Welcome to Node-RED

15 Apr 18:24:36 - [info] Node-RED version: v0.20.3  
15 Apr 18:24:36 - [info] Node.js version: v10.15.3  
15 Apr 18:24:36 - [info] Linux 4.9.35-v7+ arm LE  
15 Apr 18:24:38 - [info] Loading palette nodes  
15 Apr 18:24:46 - [info] Dashboard version 2.14.0 started at /ui  
15 Apr 18:24:47 - [info] Settings file : /home/pi/.node-red/settings.js  
15 Apr 18:24:47 - [info] Context store : 'default' [module=memory]  
15 Apr 18:24:47 - [info] User directory : /home/pi/.node-red  
15 Apr 18:24:47 - [info] Server now running at [http://127.0.0.1:1880/](http://127.0.0.1:1880/)  
15 Apr 18:24:47 - [info] Active project : Google\_Alexa\_Voice  
15 Apr 18:24:47 - [info] Flows file : /home/pi/.node-red/projects/Google\_Alexa\_Voice/flows\_raspberrypi.json  
15 Apr 18:24:47 - [info] Starting flows  
15 Apr 18:24:48 - [info] nora (ZWV44): connecting  
15 Apr 18:24:48 - [info] Started flows  
15 Apr 18:24:48 - [info] [mqtt-broker:MQTT Broker] Connected to broker: mqtt://192.168.1.110:1883

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/e/eb831dc9acd6b626a4fd4adef7d25135cf933c60.jpeg)

---

<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 April 2019 09:11 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/213 "2019-04-15T09:11:25Z")

</div>

> [@pigsy](#):
>
> 15 Apr 18:24:48 - [info] nora (ZWV44): connecting

I see it's connecting. Wait for a while and see if `nora` adds some other log entries. Again, are you sure the device has internet connectivity. Can you ssh into it and try pinging google or something?

---

<div class="post-metadata">

**Author:** ![pigsy](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@pigsy](https://discourse.nodered.org/u/pigsy)\
**Post date:** [15 April 2019 09:47 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/214 "2019-04-15T09:47:10Z")

</div>

Ok. I can't ping out. I guess that must be it. Although I have no connection problems on my windows machine.

---

<div class="post-metadata">

**Author:** ![pigsy](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@pigsy](https://discourse.nodered.org/u/pigsy)\
**Post date:** [15 April 2019 10:40 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/215 "2019-04-15T10:40:56Z")

</div>

Ok it's fixed now. PI wasn't connecting via Ethernet. Had to connect it wirelessly and now it's working. Thanks for your help.

---

<div class="post-metadata">

**Author:** ![pigsy](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@pigsy](https://discourse.nodered.org/u/pigsy)\
**Post date:** [24 April 2019 03:48 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/216 "2019-04-24T03:48:36Z")

</div>

Continuing with my project. I'm trying to configure my Lounge Blind. My blind works just like a switch in MQTT I'm using a payload of "0" for close and "1" for open.

I'm able to generate the following payloads from your blind node when I say "close lounge blind"  
House/Lounge/Blind : msg.payload : Object  
{ openPercent: 0 }

and "open lounge blind"

House/Lounge/Blind : msg.payload : Object  
{ openPercent: 100 }

My problem arises when configuring the Switch Node with the following:  
Msg.openPercent  
1st value rule == number 100  
2nd value rule == number 0

Then my Function for 1st value rule:  
msg.payload = "1";  
return msg;

Then my Function for 2nd value rule:  
msg.payload = "0";  
return msg;

The debug node only returns values from the blinds node. I can't get anything returned from the switch or function nodes.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/4/40bc9d0d4c57590c7b7126d7777c1fd3e9bc75e4.jpeg)

can you please help.

Thanks.

Updated post (because apparently new users can't make more than 3 posts???)  
All my Nora devices have disconnected. In the debug panel I'm getting a message saying "nora (I1\_ig): socket connection error: user already connected". So I went and logged into the token page. It gave me a new token. I updated it in the config screen, but hasn't fixed the problem. When I look at my google devices I see some old devices that I created previously and subsequently removed. Obviously the new devices haven't updated.  
Please help.  
BTW made a small donation for your effort.

Update Post Edit.  
I found my problem. I had another instance of node-red running on another PI.

thanks.

---

<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:** [24 April 2019 04:59 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/217 "2019-04-24T04:59:49Z")

</div>

You have an object called msg.payload with a value of {open percent:100} then you go and test msg.openPercent.  
Maybe try testing msg.payload["open percent"] instead ?

---

<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:** [3 May 2019 22:21 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/218 "2019-05-03T22:21:52Z")

</div>

Short question:  
Currently the light/outlet/switch nodes don't send out anything when the object is already in the requested state (ex. Off).

Is it possible to always send the requested state even if the device is already in the requested state?

This would really help to synchronise everything. Currently I always have to turn everything on and off again to get it synchronised.

---

<div class="post-metadata">

**Author:** ![nygma2004](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nygma2004/32/1308_2.png) [@nygma2004](https://discourse.nodered.org/u/nygma2004)\
**Post date:** [4 May 2019 14:21 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/219 "2019-05-04T14:21:00Z")

</div>

I have to admit I am way behind reading all the messages in this post, but did you manage to do anything with the screen of the Google Home Hub? I mean it is possible to somehow control the screen? Make it to show a picture, or clip?

---

<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:** [5 May 2019 08:31 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/220 "2019-05-05T08:31:50Z")

</div>

> [@fightforlife](#):
>
> Short question:  
> Currently the light/outlet/switch nodes don't send out anything when the object is already in the requested state (ex. Off).
> 
> Is it possible to always send the requested state even if the device is already in the requested state?
> 
> This would really help to synchronise everything. Currently I always have to turn everything on and off again to get it synchronised.

Not sure if this solves your problem but there is the "pass message through to output" checkbox:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/5/55c07084f284129848d1c149cdec8eafa6ad0299.png)

> [@nygma2004](#):
>
> did you manage to do anything with the screen of the Google Home Hub? I mean it is possible to somehow control the screen? Make it to show a picture, or clip?

Didn't look into that. I don't own a Home Hub and it's not really in the scope of this project...

---

<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:** [5 May 2019 09:41 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/221 "2019-05-05T09:41:37Z")

</div>

Hi Andrei,  
The "pass through output" function does not provide this functionality.

If the device is Off in the Google home app, but in reality is still On. (Maybe because of a flow deployment, or the command was not passed over 433mhz correctly)  
Now it is not possible to use the command "Turn X Off" to turn the device off. Google acknowledges the command correctly but it is not transferred to node red.

Best regards

---

<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:** [5 May 2019 17:50 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/222 "2019-05-05T17:50:35Z")

</div>

The backend currently sends the state only when something changes from the already known state. I would need to change the backend architecture in order to handle the commands in the node-red plugin. The bigger problem is to keep backwards compatibility for the users that don't want to upgrade... I will look into this.

The easiest way would be to make sure that Nora always has the latest state of the devices. This is also helpful when opening the devices in Google Home since it shows the current state of the device.

---

<div class="post-metadata">

**Author:** ![moebius](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/moebius/32/2872_2.png) [@moebius](https://discourse.nodered.org/u/moebius)\
**Post date:** [5 May 2019 18:20 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/223 "2019-05-05T18:20:55Z")

</div>

> [@andrei-tatar](#):
>
> when something changes from the already known state

I guess on most systems, the "known state" is not the one inside the backend. Many users will use additional input sources (wall switches, tablets, etc), and the current implementation complicates the process.

I'm not sure, if it would brake existing users, if you send the command always - if it is "on" and you send "on" again, nothing should change. But it would be useful for users, who want to use google home only as input.

---

<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:** [5 May 2019 19:50 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/224 "2019-05-05T19:50:52Z")

</div>

@moebius @fightforlife

Just published `node-red-contrib-nora@0.0.24`

This new version has a new checkbox in the nora configuration node:

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

When the checkbox is checked, the state will be sent to the client (node-red) even if there is no change in the state after the execution of a command.

**Unfortunately you may need to restart `node-red` in order for the change to take effect.**

The default behavior is to send the state only when a command changes it.

---

<div class="post-metadata">

**Author:** ![moebius](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/moebius/32/2872_2.png) [@moebius](https://discourse.nodered.org/u/moebius)\
**Post date:** [5 May 2019 20:00 UTC](https://discourse.nodered.org/t/node-red-google-home-integration/4829/225 "2019-05-05T20:00:02Z")

</div>

Thanks for the fast reaction!

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

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