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

Hello Node-RED Community,

I am attempting to use Node-RED on the Groov EPIC platform 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. Unfortunately, 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:

javascriptCopy code

{
  "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 Node-RED community in identifying any potential issues with my setup or if there are any specific requirements when working with Node-RED and Modbus devices like the LED-SPCV-LV100W on the Groov EPIC platform.

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

Hi @Tamar and welcome to Node-RED forum.

I read the datasheet and see that it use modbus ASCII, check if you set "Serial Type" property as ASCII on your modbus node.
Screenshot from 2023-04-25 17-47-36

And check if set the correct configuration on Dimmer control side:

"Two blocks of DIP switches inside the dimmer’s
case let you set the following parameters:
• Protocol
• Address
• Serial line termination
• Baud rate (Modbus and Optomux only)
• Parity (Modbus only)
Addresses and baud rates depend on the protocol you use:"

Hi!

Here, is my sever configuration

Here is modbus read conf

modbus read conf

Here is dubug msg

And here is Led dimmer settings

I check the settings and look well:
address
(SW1) Address - OK.
baudrate
(SW2) Baud rate and mode modbus- OK.


Bits - OK.
parity
(SW1) parity - OK
maybe you could share your flow (JSON) to import here and check it!

Here is the code example what i´m using.

[{"id":"1ffe402ccd9d6740","type":"inject","z":"09d7aed953dc057c","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":880,"y":2360,"wires":[["156819f39079a14f"]]},{"id":"67497061440a4658","type":"debug","z":"09d7aed953dc057c","name":"Debugger","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1380,"y":2360,"wires":[]},{"id":"156819f39079a14f","type":"modbus-getter","z":"09d7aed953dc057c","name":"Read slave 2 Brightness","showStatusActivities":true,"showErrors":true,"showWarnings":true,"logIOActivities":false,"unitid":"2","dataType":"HoldingRegister","adr":"16","quantity":"1","server":"db6f9b3e.e5f338","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":true,"keepMsgProperties":true,"delayOnStart":false,"startDelayTime":"","x":1130,"y":2360,"wires":[["67497061440a4658"],["c3a6441edc2f8444"]]},{"id":"c3a6441edc2f8444","type":"debug","z":"09d7aed953dc057c","name":"Debugger","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1380,"y":2440,"wires":[]},{"id":"0f67587dc768fbad","type":"modbus-write","z":"09d7aed953dc057c","name":"Write slave 2 Brightness","showStatusActivities":false,"showErrors":false,"showWarnings":true,"unitid":"2","dataType":"HoldingRegister","adr":"16","quantity":"1","server":"db6f9b3e.e5f338","emptyMsgOnFail":false,"keepMsgProperties":false,"delayOnStart":false,"startDelayTime":"","x":1130,"y":2440,"wires":[["67497061440a4658"],["c3a6441edc2f8444"]]},{"id":"22acfaadee470226","type":"inject","z":"09d7aed953dc057c","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"768","payloadType":"num","x":870,"y":2440,"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/ttySerMod0.1","serialType":"ASCII","serialBaudrate":"9600","serialDatabits":"7","serialStopbits":"2","serialParity":"none","serialConnectionDelay":"100","serialAsciiResponseStartDelimiter":"0x3A","unit_id":"","commandDelay":"1","clientTimeout":"1000","reconnectOnTimeout":false,"reconnectTimeout":"2000","parallelUnitIdsAllowed":false}]

Try this

[{"id":"8a102c65a89ba6f4","type":"tab","label":"Flow 32","disabled":false,"info":"","env":[]},{"id":"22acfaadee470226","type":"inject","z":"8a102c65a89ba6f4","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"768","payloadType":"num","x":450,"y":420,"wires":[["edf9fb10fe727985"]]},{"id":"edf9fb10fe727985","type":"function","z":"8a102c65a89ba6f4","name":"","func":"\n\nmsg.payload = { value: msg.payload, 'fc': 6, 'unitid': 2, 'address': 16, 'quantity': 1}\n\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":535,"y":420,"wires":[["8a83fbe377eb4f98"]],"l":false},{"id":"8a83fbe377eb4f98","type":"modbus-flex-write","z":"8a102c65a89ba6f4","name":"","showStatusActivities":true,"showErrors":true,"server":"db6f9b3e.e5f338","emptyMsgOnFail":false,"keepMsgProperties":false,"x":670,"y":420,"wires":[[],["ddb368bcea0fad9c"]]},{"id":"ddb368bcea0fad9c","type":"modbus-response","z":"8a102c65a89ba6f4","name":"","registerShowMax":20,"x":870,"y":420,"wires":[]},{"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/ttySerMod0.1","serialType":"ASCII","serialBaudrate":"9600","serialDatabits":"7","serialStopbits":"2","serialParity":"none","serialConnectionDelay":"100","serialAsciiResponseStartDelimiter":"0x3A","unit_id":"","commandDelay":1,"clientTimeout":1000,"reconnectOnTimeout":false,"reconnectTimeout":2000,"parallelUnitIdsAllowed":false}]

@Tamar I see that Beno has posted a reply on the Opto Forums. If that response has everything working it might want to mark this thread as Solved

1 Like

Here is a link into working solution. Solution for LED-SPCV-LV100W

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.