# Problems with node contrib-shelly

**URL:** https://discourse.nodered.org/t/problems-with-node-contrib-shelly/101813
**Category:** General
**Tags:** shelly
**Created:** [21 September 2026 18:13 UTC](https://discourse.nodered.org/t/problems-with-node-contrib-shelly/101813 "2026-09-21T18:13:09Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![gerribaldi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gerribaldi/32/38935_2.png) [@gerribaldi](https://discourse.nodered.org/u/gerribaldi)
#### Post date: [21 September 2026 18:13 UTC](https://discourse.nodered.org/t/problems-with-node-contrib-shelly/101813/1 "2026-09-21T18:13:09Z")

</div>

Hi,

i try to access a Shelly Plus RGBW PM via node-red-contrib-shelly.

The connection between the node and the shelly is working. And if i sent a message to the node, i got feedback from the shelly - like wifi state, colour settings, and a lot more.

But i´m not able to control the shelly via the node No matter what i try or if i use the examples flows.

The goal is to control the colour and brightness of the LED - but i got no idea how to the setup the message in the correct way.

Could anybody show me the correct way please?

---

<div class="post-metadata">

### Author: ![windkh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/windkh/32/4713_2.png) [@windkh](https://discourse.nodered.org/u/windkh)
#### Post date: [22 September 2026 05:41 UTC](https://discourse.nodered.org/t/problems-with-node-contrib-shelly/101813/2 "2026-09-22T05:41:58Z")

</div>

Hi @gerribaldi,  
is it a gen2+ RGBW like this one: [Shelly Plus RGBW PM | Shelly Knowledge Base](https://kb.shelly.cloud/knowledge-base/shelly-plus-rgbw-pm)

Does the example rgbwpmplus.json not work for you?

---

<div class="post-metadata">

### Author: ![windkh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/windkh/32/4713_2.png) [@windkh](https://discourse.nodered.org/u/windkh)
#### Post date: [22 September 2026 05:44 UTC](https://discourse.nodered.org/t/problems-with-node-contrib-shelly/101813/3 "2026-09-22T05:44:58Z")

</div>

You can modify the sample and use RGB.Set with its properties described here

> **[RGB | Shelly Technical Documentation](https://shelly-api-docs.shelly.cloud/gen2/ComponentsAndServices/RGB/)**
>
> The RGB component handles an output with possibility to change color and brightness of RGB LED load. Component has additional on/off control. It has night mode capability that can reduce brightness in selected period of time. It uses RGB as RPC...

---

<div class="post-metadata">

### Author: ![FireWizard52](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/firewizard52/32/34508_2.png) [@FireWizard52](https://discourse.nodered.org/u/FireWizard52)
#### Post date: [22 September 2026 17:04 UTC](https://discourse.nodered.org/t/problems-with-node-contrib-shelly/101813/4 "2026-09-22T17:04:49Z")

</div>

Hi @gerribaldi ,

As @windkh also already said, you have to provide a little bit more information as you have done so far.  
Important information is the following:

1. Is it a Gen 1 or a Gen 2+ (Gen 2, Gen 3 or Gen 4) device?
2. Which Node do you (want to) use? The local node or the cloud node.
3. Or do you want to communicate with MQTT?

Regards

---

<div class="post-metadata">

### Author: ![gerribaldi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gerribaldi/32/38935_2.png) [@gerribaldi](https://discourse.nodered.org/u/gerribaldi)
#### Post date: [22 September 2026 19:32 UTC](https://discourse.nodered.org/t/problems-with-node-contrib-shelly/101813/5 "2026-09-22T19:32:14Z")

</div>

Sorry guys, i thought to provide the type of shelly is fine.

So here some more infos:

I use the node shelly gen 2+ without cloud. The shelly have only a connection to my wifi und my local mqtt broker.

I can access the shelly directly via mqtt and via

```auto
msg.payload = set,true,100,999,77,88,99,5,250

```

i´m able to control the shelly. But this is not realy comfortable 🙂

@windkh  
I use for all my test the nodes rgbw2\* and not the which you are mentioned. 🙄  
So after using the right node i can control the shelly via the example node. 👍

Which will be the easiest way to access or change for example the rgb values?

---

<div class="post-metadata">

### Author: ![windkh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/windkh/32/4713_2.png) [@windkh](https://discourse.nodered.org/u/windkh)
#### Post date: [22 September 2026 20:31 UTC](https://discourse.nodered.org/t/problems-with-node-contrib-shelly/101813/6 "2026-09-22T20:31:06Z")

</div>

In the example flow there should be a switch function. You can modify the payload: instead of Switch.Set you can use RGB.Set with the properties described here

> **[RGB.Set​ - RGB | Shelly Technical Documentation](https://shelly-api-docs.shelly.cloud/gen2/ComponentsAndServices/RGB/#rgbset)**
>
> The RGB component handles an output with possibility to change color and brightness of RGB LED load. Component has additional on/off control. It has night mode capability that can reduce brightness in selected period of time. It uses RGB as RPC...

---

<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: [23 September 2026 07:41 UTC](https://discourse.nodered.org/t/problems-with-node-contrib-shelly/101813/7 "2026-09-23T07:41:46Z")

</div>

I find that using NR core modules to be easier than the node-red-contrib-shelly. BUT, you do have to craft the messages yourself. I use this on a RGBW Gen 1 to control my lights for different 'levels' of lighting. This in a Function node...

```auto
switch (msg.payload) {
  case 1:
  msg.payload = {"turn": "off"};
    break;
  case 2:
    msg.payload = {"mode": "color", "red": 255, "green": 255, "blue": 255, "white": 100, "gain": 100, "effect": 0, "transition": 0, "turn": "on" };
    break;
  case 4:
    msg.payload = {"mode": "color", "red": 255, "green": 255, "blue": 255, "white": 100, "gain": 80, "effect": 0, "transition": 0, "turn": "on" };
    break;
  case 8:
    msg.payload = { "mode": "color", "red": 255, "green": 255, "blue": 255, "white": 100, "gain": 50, "effect": 0, "transition": 0, "turn": "on" };
    break;
  case 16:
    msg.payload = {"mode": "color", "red": 252, "green": 173, "blue": 25, "white": 100, "gain": 100, "effect": 0, "transition": 0, "turn": "on" };
    break;
  case 32:
    msg.payload = {"mode": "color", "red": 252, "green": 173, "blue": 25, "white": 20, "gain": 40, "effect": 0, "transition": 0, "turn": "on" };
    break;
  case 64:
    msg.payload = {"mode": "color", "red": 252, "green": 173, "blue": 25, "white": 20, "gain": 100, "effect": 0, "transition": 0, "turn": "on" };
    break;
  default:
    msg.payload = 1024
}

msg.topic = "shellies/Living_Room/color/0/set";
return msg;

```

---

<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: [23 September 2026 13:00 UTC](https://discourse.nodered.org/t/problems-with-node-contrib-shelly/101813/8 "2026-09-23T13:00:03Z")

</div>

Should have added, the output is to MQTT Output Node! Apologies.

---

<div class="post-metadata">

### Author: ![gerribaldi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gerribaldi/32/38935_2.png) [@gerribaldi](https://discourse.nodered.org/u/gerribaldi)
#### Post date: [23 September 2026 19:19 UTC](https://discourse.nodered.org/t/problems-with-node-contrib-shelly/101813/9 "2026-09-23T19:19:38Z")

</div>

Thanks to all for the support

@mudwalker  
For my shelly switch units i also use the NR core modules with mqtt. I thought that the RGBW handling will be easier with the nr-contrib-shelly node.

Your Function node works with some presettings which you call via the different cases. But is there a way, that you can control the RGB colors directly?
