Need Help with Node-RED on Groov EPIC for LED-SPCV-LV100W Dimmer Control

Hello Opto22 Community,

I am trying to use the Groov EPIC platform with Node-RED to control an LED dimmer, specifically the LED-SPCV-LV100W. I have followed the LED dimmer’s datasheet and used the modbus-flex-write node in Node-RED to send Modbus commands to the LED dimmer. However, I have not been able to get it to work as expected. I have also tried using the modbusSerial out node without success.

Here’s a brief overview of my Node-RED setup:

  1. I have installed the “node-red-contrib-modbus” package and configured the modbus-flex-write node with the appropriate Modbus slave connection details (IP address, port, etc.).
  2. I am using an inject node to send a JavaScript object containing the required properties, including the function code (6 for Write Single Register), unit ID, register address, and brightness value. For example, to set the brightness to 35%, I am sending the following payload:
{
  "fc": 6,
  "unitid": 1,
  "address": 16,
  "value": 22848
}
  1. I have connected the inject node to the modbus-flex-write node, and I’m deploying the flow.

In addition to the modbus-flex-write node, I have also tried using the modbusSerial out node by configuring it with the correct serial settings (baud rate, data bits, parity, stop bits) and connecting it to the inject node.

Despite trying both of these nodes and following these steps, I haven’t been able to control the LED dimmer successfully. I would appreciate any assistance or guidance from the community in identifying any potential issues with my setup or if there are any specific requirements for the Groov EPIC platform when working with Node-RED and Modbus devices like the LED-SPCV-LV100W.

Please let me know if you need any more information or if there’s anything else I should try. Thank you in advance for your help!

Best regards,

Tamar

Welcome to the Opto22 forums!

You seem to have done all the right things with Node-RED, but don’t give any information on the hardware, so thats my first up focus…

Are you using a USB to serial adapter? If so, its an authentic FTDI chip? Is it a single port or dual port? (Dual ports are not supported on EPIC, but they won’t give an error, they just wont work).

Are you using the EPIC serial module? If so, is it configured in groov Manage? (Node-RED will not do the configuration for you).

Either way, do you see the LED dimmer tx/rx LEDs flicker when you send commands?

I am using GRV-CSERI-4 module.
LED-SPCV-LV100W is connected to channel 1.
slot0

I get tx LED flicker when i´m sending commands with Modbus-Serial Out node.

How are the channels configured?

EDIT: If you mean the module TX LED flickers, thats good, but what does the dimmer LED do?
The dimmer Rx LED should flicker at the same time.

Here is configuration

module 0

Module Tx flicker and dimmer Rx flickers also.

Have you tried reading from the dimmer to confirm good communications?

Here, is my sever configuration

Here is modbus read conf

modbus read conf

Here is dubug msg

And here is Led dimmer settings

I am out if ideas

Do you get the Error: Port Not Open all the time? Is something else using the serial port?

“Port Not Open” is new error msg.

Before it I get “Client → fsm failed state after sending Get More About It By Logging Serial”.

There is nothing what is using same port. At least from the node red side. This is only node what I am using for testing.

I’m not seeing anything obvious wrong with your configuration.

Can you expand the debug output to see if there is any other helpful information in the msg object?

Unfortunately there is no additional information what can help.

Is there some another way how can use Node Red to control LED-SPCV-LV100W?

Sorry we are not solving this quick enough…
There are now two of us at Opto working on this for you.
Will let you know once we have something to share.

2 Likes

Thank you very much, I am very grateful.

Got it working.
Thanks for your patience, always a lot going on Opto HQ.

Ok, from the dimmer backwards…
Just set it up like this and slowly expand as you need that way you know when something stops working.

No parity, 9600 baud, Modbus, terminated (if this dimmer is at the end of loop, not terminated if it is not).
Address 1.

On the serial module…

image

I’m using port 1 as I have some RS232 stuff in port 0.
No termination if your EPIC is in the middle of the dimmer loop.

Or turn termination on if it is at the end.
(For this simple test, it does not really matter - same with bias, for a short length of wire, bias and termination are not go/no-go settings).

Don’t forget to set all this via groov Manage as Node-RED will not configure the port.

The EPIC serial module port naming is important.
Make a note from groov Manage what your port names are.

Now the Node-RED.

In Node-RED, setup the port name to match the name of the serial port that you noted in groov Manage:

Simple flow to read the brightness every time I click the inject.
Can manual set the LED to three levels, dim, 50% and 100% by clicking each inject.

And here is the flow:

[{"id":"1ffe402ccd9d6740","type":"inject","z":"1c91b36d1147a349","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":460,"y":180,"wires":[["156819f39079a14f"]]},{"id":"67497061440a4658","type":"debug","z":"1c91b36d1147a349","name":"debug brightness","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload[0]","targetType":"msg","statusVal":"","statusType":"auto","x":1010,"y":180,"wires":[]},{"id":"156819f39079a14f","type":"modbus-getter","z":"1c91b36d1147a349","name":"Read slave 1 Brightness","showStatusActivities":true,"showErrors":true,"showWarnings":true,"logIOActivities":false,"unitid":"1","dataType":"HoldingRegister","adr":"16","quantity":"1","server":"db6f9b3e.e5f338","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":true,"keepMsgProperties":true,"delayOnStart":false,"startDelayTime":"","x":730,"y":180,"wires":[["67497061440a4658"],[]]},{"id":"c3a6441edc2f8444","type":"debug","z":"1c91b36d1147a349","name":"payload","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":980,"y":260,"wires":[]},{"id":"0f67587dc768fbad","type":"modbus-write","z":"1c91b36d1147a349","name":"Write slave 1 Brightness","showStatusActivities":false,"showErrors":false,"showWarnings":true,"unitid":"1","dataType":"HoldingRegister","adr":"16","quantity":"1","server":"db6f9b3e.e5f338","emptyMsgOnFail":false,"keepMsgProperties":false,"delayOnStart":false,"startDelayTime":"","x":730,"y":260,"wires":[["c3a6441edc2f8444"],[]]},{"id":"22acfaadee470226","type":"inject","z":"1c91b36d1147a349","name":"1% = 768","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"768","payloadType":"num","x":460,"y":260,"wires":[["0f67587dc768fbad"]]},{"id":"7414dfb8f7e3c5ba","type":"inject","z":"1c91b36d1147a349","name":"50% = 32768","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"32768","payloadType":"num","x":470,"y":320,"wires":[["0f67587dc768fbad"]]},{"id":"b6f37dc50ada552f","type":"inject","z":"1c91b36d1147a349","name":"100% = 65280","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"65280","payloadType":"num","x":480,"y":380,"wires":[["0f67587dc768fbad"]]},{"id":"db6f9b3e.e5f338","type":"modbus-client","name":"","clienttype":"serial","bufferCommands":true,"stateLogEnabled":true,"queueLogEnabled":true,"failureLogEnabled":true,"tcpHost":"127.0.0.1","tcpPort":"10502","tcpType":"DEFAULT","serialPort":"/dev/ttySerMod3.1","serialType":"ASCII","serialBaudrate":"9600","serialDatabits":"7","serialStopbits":"2","serialParity":"none","serialConnectionDelay":"100","serialAsciiResponseStartDelimiter":"0x3A","unit_id":"1","commandDelay":"50","clientTimeout":"1000","reconnectOnTimeout":false,"reconnectTimeout":"2000","parallelUnitIdsAllowed":false}]

Here is the debug from setting the brightness to 50% and reading the payload and then setting to 100%.

That should get you up and running… Lets know how you get on.

2 Likes

Why you are not using bias? Manual shows that there should be bias. line 3.

I updated the thread and flow just now with Bias / Termination and port name details.

Thanks for the feedback.