Node-RED google home integration

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

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

2 Likes

That works great, thanks!!

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

@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.

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:

Would you mind adding Fans as a device node type?

Thanks

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.

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.

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

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.

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.

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.

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.

5 Likes

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.

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?

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

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.

I'll test that as well this weekend. Thanks

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

The input into the Light node is;

output

I get the error;

nora2

[{"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"}]

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

Yes, it was the format that was wrong!

Injecting the number 50 to a change node formatted as;

change

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

Thanks Ron

1 Like

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.

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

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.