Announcement

Collapse
No announcement yet.

Shelly RGBW2 (Color Mode for Light Strips and RGB lights)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Unless something has changed recently with HS4, when a range of values is specified for a Feature then HS will present a dropdown selection typically equally spaced over the specified range. I think I submitted an issue a long time ago about this.

    This means a different event action approach is needed. Use the MQTT Message event action with a JSON payload rather than the device change action. As an example the following would be used to set color to almost pure red at 50% brightness and gradual change effect. Left of the "=" is the Topic which you will find on the Association tab for the RGBW2 color end point. Right of the "=" is the payload which is JSON to specify what you want the RGBW2 to do.

    Code:
    shellies/shellyrgbw2-C649B2/color/0/set={"ison":"on","red":248,"green":3,"blue":3,"white":0,"gain":50,"effect":2}
    You can use replacement variables to generalize the event action. For example assume you have three virtual devices 50, 51 and 52 that contain the desired red, green and blue in the DeviceValue. The MQTT Message action would then be s below. This is just an example to illustrate the approach.

    Code:
    shellies/shellyrgbw2-C649B2/color/0/set={"ison":"on","red":$$DVR:(50):,"green":$$DVR:(51):,"blue":$$DVR:(52):,"white":0,"gain":50,"effect":2}
    As a note you may want to use mcsMQTT rather than mcsShelly as it does everything mcsShelly does and more.

    Comment


      #17
      Good Evening,

      Thank you for this! I am using mcsMQTT but I found the device in question in this thread.

      Your solution using the virtual devices and variables was just the elegant solution I needed!

      Thanks again!

      Comment

      Working...
      X