Node-RED google home integration

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.

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.

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?

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.

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

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)?

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/
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

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?

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

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.

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.

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.

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 ?

1 Like

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.

1 Like

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?

Not sure if this solves your problem but there is the "pass message through to output" checkbox:
image

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

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

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.

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.

@moebius @fightforlife

Just published node-red-contrib-nora@0.0.24

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

image

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.

1 Like

Thanks for the fast reaction!