Node-Red Flow Samples/Sharing

Thanks heaps for the suggestion just to use the setHue. Hope to have time tomorrow to get back in the test lab.

1 Like

@erktrek @TechMedX - do you know where I could get the color values to be used with the HE setColor argument? I have found 65 = Blue, 1 = Red pretty much by trial and error. I looked at the Inovelli driver code (I'm using the Red/Black series dimmers) and the values that they have for colors don't work when used in the Hubitat device node:
0:"Red",
21:"Orange",
42:"Yellow",
85:"Green",
127:"Cyan",
170:"Blue",
212:"Violet",
234:"Pink"
Does HE have it's own "color wheel"? Thanks for your help

1 Like

I think it's HSV

3 Likes

I'm not a dev, and I have nothing to stand on but my own experience.

This could differ by manufacturer.

For my Sengled and Sylvania bulbs/lights strips I never use anything over 99. The below is

2=Red
33=Green
55=Blue
77=Purple

I have a sequence we call the "rainbow" It does 0-99 with a 2 sec pause and it covers the entire spectrum. So somewhere in that is basically 0-red-30ish-green-50ish-blue-80ishpurple/pink-rinse-and-repeat. (It doesn't all fit) yeah a bit OCD I know

1 Like

:astonished:

2 Likes

Just do this...

The secret sauce is using a flow variable called "hue" and incrementing using a jsonata expression like this:

also the "setHue = flow.hue" change node is

2 Likes

You must have missed this part :wink:

In that sequence, how would it be reset to 0, after 99? (I see it now, nice!) Always curious.

BTW, I think my ways can often be overly complex due to ignorance in coding, 'layman' terms. But isn't that the beauty of NR? I completely bow to those that know true coding :bowing_man: Until then I'm just glad NR lets us 'hacks' find the ways we can

:hugs:

to all

3 Likes

That only goes through one iteration as an example BUT on the switch node you could add an otherwise and do it like this:

Note: the "no-op" is a placeholder node that does nothing - you could put some exit logic there or whatever.. edit forgot to put a delay on it (after the no-op) as well... sigh

2 Likes

I see your 'easy way' and raise you the control freak factor :wink:

2 Likes

Aaaaahhhhhh!!! My eyes!

( :slight_smile: )

4 Likes

And it/yours looks a lot cooler too.. very matrix-ey :pill:

1 Like

and in truth if your c/p skillz are up to snuff you should be able to do it all in under the 15-30 it took me while the wife cooked dinner. Since then...... its paid for itself in many 'happy returns' :rofl:

3 Likes

Another satisfied Node-RED customer.. :wink: :rofl:

4 Likes

Holy Moly that is complicated. Wouldn't a function have been a lot easier?!?

Ha, now I read on and see your response vis a vis coding etc. Fair enough.

2 Likes

You can create a loop using this pallet:

2 Likes

I'm suspecting that this is right based on what I'm seeing in the Inovelli LED (Blue = 65 Hue)

This is awesome! :clap:t3: :clap:t3:

do-red is also a great "organizational" node as well.. I use it to prettify my water main valve check sequence.

3 Likes

Thanks for pointing this node out.. looks like a great utility node!

I use do-red a places now. Can be quite handy.

1 Like

@stephen_nutt gets the credit for mentioning it - I just showed an example..

:grinning_face_with_smiling_eyes:

1 Like