Inovelli Red Series (VZW31-SN) LED Custom Action via Node-RED

Hello - I just changed out my Gen 2 Inovelli Red Series switches (LZW31-SN) for the newer versions. All my rules are in Node-RED and with the older version, I was able to control the LED notification colors by sending the arguments through msg.arguments as a JSON object (To set the LED to RED, msg.arguments would be {"hue":1,"saturation":100,"level":100}).

However, the new switches expect 4 parameters. Does anyone have an example of the format? I can hard code the values in a command node (1,1,10,255) and they work but they don't work if I send the same via msg.arguments. My guess is that the 2nd parameter corresponds to "hue", the 3rd to "level" (I can change colors/brightness by playing with those 2), but have no idea what the first and fourth parameters are.

Any help would be appreciated. Thanks!

SOLVED: I asked Gemini what the new parameters were and it gave me a starting point (the initial answer had the wrong order). I played around with the order and got it to work. For anyone looking for this in the future, here are the parameters:

Array Index Parameter Your Value Notes
0 Effect 1 1=Solid, 2=Fast Blink, 3=Slow Blink, 4=Pulse
1 Color 1 1 or 0 is Red, 170 is Blue, 85 is Green
2 Level 100 Brightness (0–100)
3 Duration 255 255 = Always On until cleared

and I sent in the values as a JSON object [1,254,30,255].

Hope this helps someone.

For future reference, you could have solved this yourself -- and avoided Gemini's wrong answer to start -- by just looking at the command on the device detail page. There, you'll see the order, type, and name (and usually description, though this depends on the driver) of all parameters. Here's the command you're likely using from Inovelli's custom driver, though both what driver you're using and what command would also be necessary to know:

This is helpful for any "custom" command (or really any where you're curious) and is not specific to Node-RED or any other method of calling them. Commonly, it's also something people need to look at when using custom actions/commands in Rule Machine.

Hope this helps explain what's really going on!

(Or, sigh, feeds an AI model better information next time.)

4 Likes

Thanks - it does! I kept looking at the State Variables and Preferences without finding anything and completely overlooked this area in the Commands section :man_facepalming:t2:.

Forest vs trees.....

1 Like