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

**URL:** <https://discourse.nodered.org/t/need-help-with-node-red-for-led-spcv-lv100w-dimmer-control-on-groov-epic-platform/77927>\
**Category:** Industrial\
**Tags:** modbus\
**Created:** [25 April 2023 16:03 UTC](https://discourse.nodered.org/t/need-help-with-node-red-for-led-spcv-lv100w-dimmer-control-on-groov-epic-platform/77927 "2023-04-25T16:03:23Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tamar](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tamar/32/49299_2.png) [@Tamar](https://discourse.nodered.org/u/Tamar)\
**Post date:** [25 April 2023 16:03 UTC](https://discourse.nodered.org/t/need-help-with-node-red-for-led-spcv-lv100w-dimmer-control-on-groov-epic-platform/77927/1 "2023-04-25T16:03:23Z")

</div>

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

```auto
{
  "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

---

<div class="post-metadata">

**Author:** ![MecatronicaMADE](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@MecatronicaMADE](https://discourse.nodered.org/u/MecatronicaMADE)\
**Post date:** [25 April 2023 23:51 UTC](https://discourse.nodered.org/t/need-help-with-node-red-for-led-spcv-lv100w-dimmer-control-on-groov-epic-platform/77927/2 "2023-04-25T23:51:34Z")

</div>

Hi @Tamar and welcome to Node-RED forum.

> [@Tamar](#):
>
> Modbus slave connection details (IP address, port, etc.).

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](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/8/78e12e1793fdbaa855d808b8f3853451742f96c1.png)

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:"

---

<div class="post-metadata">

**Author:** ![Tamar](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tamar/32/49299_2.png) [@Tamar](https://discourse.nodered.org/u/Tamar)\
**Post date:** [26 April 2023 04:37 UTC](https://discourse.nodered.org/t/need-help-with-node-red-for-led-spcv-lv100w-dimmer-control-on-groov-epic-platform/77927/3 "2023-04-26T04:37:26Z")

</div>

Hi!

Here, is my sever configuration

 ![server conf](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/a/1a67b1f2c1bd4bd8a052d6a7170725ecd4f93cd7.png)

Here is modbus read conf

![modbus read conf](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/0/30883d0d500ad96b3261270d786f311797af9f0e.png)

Here is dubug msg

 ![read modbus](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/f/af29e6ec8fb20e49446b600f3d63dcc957b4f563.png)

And here is Led dimmer settings

 ![342473455_550725310511644_3029247708730718464_n](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/8/480e9b3b1d908b3d4f00bc2caddffb2d8a6d3dc7.jpeg)

---

<div class="post-metadata">

**Author:** ![MecatronicaMADE](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@MecatronicaMADE](https://discourse.nodered.org/u/MecatronicaMADE)\
**Post date:** [26 April 2023 18:05 UTC](https://discourse.nodered.org/t/need-help-with-node-red-for-led-spcv-lv100w-dimmer-control-on-groov-epic-platform/77927/4 "2023-04-26T18:05:49Z")

</div>

I check the settings and look well:  
 ![address](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/1/6140f3c92df391879cb2bd99493a7f9bacc6fbd7.png)  
(SW1) Address - OK.  
 ![baudrate](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/6/8644a3d487754af5ae1d12ded66ff6b4d7f1df09.png)  
(SW2) Baud rate and mode modbus- OK.

 ![bits](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/d/1d111c33f0650f1455087e7bd27be356034b52f4.png)  
Bits - OK.  
 ![parity](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/c/5c4208a54bb5d983b4ae33de0e15f0a05a0a4c90.png)  
(SW1) parity - OK  
maybe you could share your flow (JSON) to import here and check it!

---

<div class="post-metadata">

**Author:** ![Tamar](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tamar/32/49299_2.png) [@Tamar](https://discourse.nodered.org/u/Tamar)\
**Post date:** [26 April 2023 18:42 UTC](https://discourse.nodered.org/t/need-help-with-node-red-for-led-spcv-lv100w-dimmer-control-on-groov-epic-platform/77927/5 "2023-04-26T18:42:41Z")

</div>

Here is the code example what i´m using.

```auto
[{"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}]

```

---

<div class="post-metadata">

**Author:** ![MecatronicaMADE](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@MecatronicaMADE](https://discourse.nodered.org/u/MecatronicaMADE)\
**Post date:** [26 April 2023 21:36 UTC](https://discourse.nodered.org/t/need-help-with-node-red-for-led-spcv-lv100w-dimmer-control-on-groov-epic-platform/77927/6 "2023-04-26T21:36:47Z")

</div>

Try this

```auto
[{"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}]

```

---

<div class="post-metadata">

**Author:** ![mudwalker](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@mudwalker](https://discourse.nodered.org/u/mudwalker)\
**Post date:** [27 April 2023 12:44 UTC](https://discourse.nodered.org/t/need-help-with-node-red-for-led-spcv-lv100w-dimmer-control-on-groov-epic-platform/77927/7 "2023-04-27T12:44:45Z")

</div>

@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

---

<div class="post-metadata">

**Author:** ![Tamar](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tamar/32/49299_2.png) [@Tamar](https://discourse.nodered.org/u/Tamar)\
**Post date:** [1 May 2023 09:39 UTC](https://discourse.nodered.org/t/need-help-with-node-red-for-led-spcv-lv100w-dimmer-control-on-groov-epic-platform/77927/8 "2023-05-01T09:39:02Z")

</div>

Here is a link into working solution. [Solution for LED-SPCV-LV100W](https://forums.opto22.com/t/need-help-with-node-red-on-groov-epic-for-led-spcv-lv100w-dimmer-control/5088/18)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [15 May 2023 09:39 UTC](https://discourse.nodered.org/t/need-help-with-node-red-for-led-spcv-lv100w-dimmer-control-on-groov-epic-platform/77927/9 "2023-05-15T09:39:48Z")

</div>

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