andrei-tatar / node-red-contrib-nora

Node Red Google Home integration
74 stars 25 forks source link

Trouble connecting light - dummy light created instead of control over intended light #99

Closed SuperMalakan closed 3 years ago

SuperMalakan commented 3 years ago

I'm unsure what is wrong but what I observe is a secondary, dummy, device within the Google Home app that Node-RED interacts with instead of the intended light.

I'll list below my process in the hopes it can help resolve my issue:

My Light bulb has its own app - 'TCP Smart', the light is fully functional within the app. The light is called Light and is in the room Bedroom.

I add the light to my Google Home App by using Set up device > Works with Google > TCP Smart. This adds the device with full Google Home support: On/off, brightness, colour, and voice control. In the Google Home App I also add NORA.

In Node-RED, I add the light node to a flow, I create a config adding the token from my NORA login. In the config I give it the name Light and the room hint is set to Bedroom.

Deploying Node-RED I see beneath the light node that it states that it is connected. I go into my Google Home app and a new light has appeared, toggling it also toggles the state within Node-RED however it is not the original light I added, it is a secondary dummy light, and I cannot control my actual light with Node-RED.

Below is the JSON that NORA displays, maybe it has something?

Thanks!

JSON from NORA:

{ "": { "devices": { "63cdb06b.746fe8": { "type": "light", "brightnessControl": true, "turnOnWhenBrightnessChanges": false, "colorControl": false, "name": "Light", "roomHint": "Bedroom", "state": { "online": true, "on": false, "brightness": 100 } } }, "localExecution": false } }

bertreb commented 3 years ago

Hi, what you describe seems to me the way it's designed to work. A light thats added in Google Home via for example TCP Smart has no link to a light added via Node-red. Even if you use the same name.

SuperMalakan commented 3 years ago

Hi, what you describe seems to me the way it's designed to work. A light thats added in Google Home via for example TCP Smart has no link to a light added via Node-red. Even if you use the same name.

How do I control the light then, is there a way to link them?

bertreb commented 3 years ago

You need a 'TCP Smart' node-red plugin to control the lights from node-red. After that you have 2 options to use Google Home:

  1. Use the 'TCP Smart', 'works with google' solution (your current solution). The TCP Smart will take care of the communication towards (google home<->tcp smart<->node-red). You don't need Nora for this.
  2. Create a Nora Light in node-red and with some node-red logic control the 'TCP light'. You don't need the 'TCP Smart' in Google home. In Google Home you will see the Light from Nora and you can control it ( google home<->Nora<->node-red<->TCP Smart)
SuperMalakan commented 3 years ago

@bertreb, if I can't find a 'TCP Smart' plugin, what are my options?

I found node-red-contrib-tcp-client but don't know if it'll work as it seems generic?

bertreb commented 3 years ago

I just checked and there seems no node-red plugin for TCPSmart. Now i see 2 options:

  1. you buy other node-red supported lights (there are many and not so expensive one's)
  2. an out-of-the-box approach; you install Assistant-relay and send text commands from node-red to control your Google Home devices (like the TCP Smart light)

I think the first solution is easier.

SuperMalakan commented 3 years ago

I just checked and there seems no node-red plugin for TCPSmart. Now i see 2 options:

1. you buy other node-red supported lights (there are many and not so expensive one's)

2. an out-of-the-box approach; you install Assistant-relay and send text commands from node-red to control your Google Home devices (like the TCP Smart light)

I think the first solution is easier.

On the first solution, is there a list of supported devices?

bertreb commented 3 years ago

If you search for node-red light plugins on https://flows.nodered.org, you will see several support systems like Philips Hue, Ikea Tradfri, Milight, etc. For most of these systems you need a controller to interface with. You could for example use an Ikea solution with a tradfri hub, lights and switches. There's a node-red plugin for tradfri. Another solution is using the conbee zigbee adapter and the node-red-contrib-deconz plugin. This is a very flexible way of interfacing from node-red to zigbee devices from Tradfri, Hue, Xioami (lights, switch and sensors).