Node red and homeassistant and Lifx lights have a conflict

I use this in my configuration.yaml:
light:
- platform: lifx
And use this node in node red:

In homeassistant I can use the switches to switch on/off my lights, but in node red, this node doesn’t connect to my lights anymore. So I can’t control the lights with node red. When I disable the entry in configuration.yaml, the lights start working again in node red.
Does homeassistant also use the LAN protocol to switch the lights and does that create the conflict?
Is it possible to use the cloud in homeassistant to switch the lights?

I think they are fighting over UDP port 56700. This will hopefully be fixed when Home Assistant 0.81 is released.

Just curious, why use the node red lifx package rather than controlling them with just HA?

@amelchio
Is that a known issue?

@dkramer74
I have for example a flic button, so I can control the lights with a physical button.

I don’t known about Node-RED but Home Assistant currently wants exclusive access to UDP port 56700.

That can still be done without the use of the lifx package in node red. As others have said there is a port conflict which is causing your issue

Let’s hope this port conflict gets resolved. But for now I’ll use the lifx scenes in home assistant. They work through the lifx cloud. That would also circumvent this port issue, if this would also work through the cloud.

I just looked into the node that you posted, all that functionality can be used via the home assistant nodes, calling the lifx_set_state service within home assistant, which is how I am using node red with my Lifx lights

What node would I need? Call service or trigger state?
And could you provide an example?

You’d want to use the call service node with domain, light and service lifx_set_state

I’ll edit this with an example flow when I can get chance

Here’s a flow using my wink relay to set light colors:

[{"id":"57621e37.8c862","type":"mqtt in","z":"7a198d74.f39644","name":"Bedroom 1 Hold","topic":"wink_bedroom/buttons/1/held/1","qos":"2","broker":"dc770962.2c27d8","x":340,"y":40,"wires":[["8b14aba2.f8a9c8","8edf329a.91e8b","571a30dd.b9b73"]]},{"id":"571a30dd.b9b73","type":"api-call-service","z":"7a198d74.f39644","name":"Floor Lamp Blue","server":"dd768228.85ca3","service_domain":"light","service":"lifx_set_state","data":"{ \"entity_id\":\"light.lamp\", \"power\":\"true\", \"brightness\":\"255\", \"rgb_color\":[0, 0, 255] }","mergecontext":"","x":600,"y":40,"wires":[[]]},{"id":"8edf329a.91e8b","type":"api-call-service","z":"7a198d74.f39644","name":"Fan Purp","server":"dd768228.85ca3","service_domain":"light","service":"lifx_set_state","data":"{ \"entity_id\":\"light.fan\", \"power\":\"true\", \"brightness\":\"255\", \"rgb_color\":[148, 0, 211] }","mergecontext":"","x":580,"y":80,"wires":[[]]},{"id":"8b14aba2.f8a9c8","type":"api-call-service","z":"7a198d74.f39644","name":"Lamp Pink","server":"dd768228.85ca3","service_domain":"light","service":"lifx_set_state","data":"{ \"entity_id\":\"light.bedside_lamp\", \"power\":\"true\", \"brightness\":\"255\", \"rgb_color\":[249, 2, 142] }","mergecontext":"","x":590,"y":160,"wires":[[]]}]

Wow, that’s way to complicated. I’ll leave it as is.

Too complicated? It’s one single node per light, 4 nodes in all

Oops, I thought I had to use this line in a node, but I have to import this. It didn’t make sense to me :rofl:I will look into it…

To clarify, I have made the change for Home Assistant that I expect will fix this issue. But since I am not using Node-RED, I cannot say for sure.

(Note that this change will be in 0.81, not the upcoming 0.80.)

Then I will wait for this first.

or you could just learn how to use Node-Red and HA? This isn’t complicated. It’s a simple service node with the parameters filled out.

1 Like

Tempting…but I will pass for now. Thanks anyway!

:man_facepalming:

3 Likes

It’s actually less complicated than what you wanted to do in the first place…