Change color light in Node red

Hello there working with node red the couple of days. But i was searching for a tutorial for lighting and change te light (brightness color light and that things). Where can i change that? i want to change this light red? How do i do that? I use hue magic on node red


[{"id":"6c9d3bfe.804c54","type":"switch","z":"38ce27be.2cd0b","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":250,"y":80,"wires":[["c65e726c.15cf","52571be0.e48d6c"],["c65e726c.15cf"]]},{"id":"5f46a1c.7931ee","type":"api-call-service","z":"38ce27be.2cd0b","name":"Off","server":"28028217.1461ee","version":1,"service_domain":"light","service":"turn_off","entityId":"light.keuken_2","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":630,"y":120,"wires":[[]]},{"id":"c65e726c.15cf","type":"stoptimer","z":"38ce27be.2cd0b","duration":"20","units":"Minute","payloadtype":"num","payloadval":"0","name":"","x":380,"y":180,"wires":[["5727292e.054cb8"],[]]},{"id":"52571be0.e48d6c","type":"api-current-state","z":"38ce27be.2cd0b","name":"Al aan","server":"28028217.1461ee","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.keuken_2","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":410,"y":40,"wires":[["324407d2.1c7958"]]},{"id":"5727292e.054cb8","type":"api-current-state","z":"38ce27be.2cd0b","name":"Motion","server":"28028217.1461ee","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.keuken_motion","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":570,"y":180,"wires":[["5f46a1c.7931ee"]]},{"id":"324407d2.1c7958","type":"hue-light","z":"38ce27be.2cd0b","name":"Keuken","bridge":"378c6f34.e094","lightid":"6","colornamer":true,"x":620,"y":40,"wires":[[]]},{"id":"28028217.1461ee","type":"server","z":"","name":"Home Assistant"},{"id":"378c6f34.e094","type":"hue-bridge","z":"","name":"Hue Bridge","bridge":"192.168.2.7","key":"xSYLYRm6tIRvnIQCYziAy7CHN-vIQTElkhEP2jGL","interval":"3000"}]

Your flow doesn't appear to contain anything where you are trying to set a colour.
Have you read the ReadMe for the node you are using ( see flows.nodered.org)

It contains the details of the many different ways you can change a bulb to red
which include sending msg.payload.color = red;

See documentation.

Also note that you can select the node itself and in the "info" panel, lots of information is given how to do this.

I saw the documentation and saw the info, but the question is where do i put the lines of brightness and color change? In the particulairy flow, in what section do i have to put this...

In a message that is sent to the node it suggests. You can create the message in a function node or a change node

I figured it out using a function node Thanx !!!!

Brightness is done... But now struggeling with the color... The color wont change to blue.. What do i wrong ?

msg.payload={
"on":true,
"brightness":80,
"color":blue

};
return msg;

Read the documentation. in your example blue is value and not a string.

HINT: Ask yourself, how do I send a string?

People have a lot of attitude in this forum heh?

1 Like

Hi @fnees, welcome to the forum,

forgive me, but that isnt really a great first post :confused:

Sometimes people get frustrated (me included) and write things that might seem like "attitude" but I can tell you this much, I dont think I have ever been a member of a more helpful forum. Ever.

The amount of time some of the regulars put in helping out folk who either dont RTM or dont bother to try themselves is outstanding. Take a look for yourself, I would guess that 99% of the threads are responded to with either a solution or a hint, without a sniff of attitude.

When you yourself have and issue and start a thread, you will find the people here are truly amazing.

Also, i must point out, that sometimes this "attitude" is merely a thinly veiled attempt at pushing the OP to look into things for themselves (its the best way to really learn)

4 Likes

How did you get the brightness done? Can you share the flow, please?