PLUGIN: RGB Controller (UI5 & UI7) - V1.41

Introduction

This plugin allows to control RGBW devices.
It’s able to manage RGBW color channels and animation programs.

Compatible with

  • Aeotec RGBW Bulb
  • Fibaro FGRGB-101
  • Qubino RGBW dimmer
  • Sunricher RGBW Controller
  • Zipato RGBW Bulb
  • Hyperion Remote (http)
  • All Z-Wave device which supports COLOR COMMAND CLASS
  • Hyperion

Compliant with : UI5 / UI7 / ALTUI / ImperiHome

Installation

You will find the plugin on apps.mios.com or in “Apps->Install apps” by searching “RGB Controller”.

In the “Settings” tab, select the type of the the device you want to control.

Then select its specific settings (the Z-Wave rgb device or server ip/port)

Just UI5: There’s no JSON decoder installed by default.
If you have the error “No JSON decoder”, you have to upload the library in “/usr/lib/lua”. You can take “json.lua” or “dkjson.lua”.
​You will find “json.lua” here : http://code.mios.com/trac/mios_genericutils/export/20/json.lua
This code can be executed in “Apps->Develop apps->Test Luup code (Lua)”

os.execute("wget -q -O /usr/lib/lua/json.lua http://code.mios.com/trac/mios_genericutils/export/20/json.lua")

Usage

You can control your RGBW device :

1/ from the dashboard
It’s just possible to switch ON or OFF the device (keeps the last chosen color).

2/ from “Color wheel” tab
You can

  • Switch ON or OFF the device
  • Set the RGB colors by the wheel or the sliders (RGB and white channels).
    You can apply a transition between the current color and the new chosen color. You just have to set the duration of the transition and the number of steps. In any case, the plugin wil adjust these parameters in a way that the minimal duration between two intermediate changes is of one second.
  • Start or stop animation programs if your device is compatible.

3/ by LUA script

  • Switch on/off the RGBW device
-- switches ON the device
luup.call_action("urn:upnp-org:serviceId:SwitchPower1", "SetTarget", {newTargetValue = 1}, <idPlugin>)

-- switches OFF the device
luup.call_action("urn:upnp-org:serviceId:SwitchPower1", "SetTarget", {newTargetValue = 0}, <idPlugin>)
  • Change the RGB color
-- sets the RGB color to red
luup.call_action("urn:upnp-org:serviceId:RGBController1", "SetColorTarget", {newColorTargetValue = "#FF0000"}, <idPlugin>)
  • Change the RGBW color
-- sets the RGB color to red and the warm white to 100%
luup.call_action("urn:upnp-org:serviceId:RGBController1", "SetColorTarget", {newColorTargetValue = "#FF0000FF"}, <idPlugin>)

-- sets the RGB color to red and the cool white to 100%
luup.call_action("urn:upnp-org:serviceId:RGBController1", "SetColorTarget", {newColorTargetValue = "#FF000000FF"}, <idPlugin>)

-- sets the RGB color to blue and the cool white to 50%, with a transition of 30 seconds (in 10 steps)
luup.call_action("urn:upnp-org:serviceId:RGBController1", "SetColorTarget", {newColorTargetValue = "#0000FF007F", transitionDuration = 30, transitionNbSteps = 10}, <idPlugin>)
  • Start an animation program
luup.call_action("urn:upnp-org:serviceId:RGBController1", "StartAnimationProgram", {programName = "LAPD"}, <idPlugin>)

You will find the animation program names in the “Color wheel” tab.

  • Stop an animation program
luup.call_action("urn:upnp-org:serviceId:RGBController1", "StopAnimationProgram", {}, <idPlugin>)

4/ by scenes
You can achieve the same operations than by LUA script, in advanced editor of the scenes.

Debug

You can enable the debug mode with setting the variable “Debug” to “1” in the “Advanced” panel.
Then, you can check the logs with this command (SSH session) :

tail -f /var/log/cmh/LuaUPnP.log | grep "^01\|RGBController"

Inspirations

Sources

vosmont, it’s me again. I have not had success with your plugin (yet) and the Aeon Tech bulb on UI7 (running the latest firmware).

I hate to be a pain, but I feel like there is something that I’m missing in the setup.

I documented the steps that I took as closely as I could (see attached .doc).

Are there any other “prerequisites” (other plugins, vera system settings, etc.) that I need to change in my setup?

In the document, when I pair the Aeon bulb with Vera normally, I can control the bulb (only on/off, dimmer) but when I add the RGB controller plugin in, things just don’t work.

Please let me know if there is anything else I can do differently to get this working. It’s one of my main projects with the Vera.

Thanks again for your help.
jmarken

Ok :wink:

In ‘Advanced’ panel, you have several tabs :

  • ‘Params’; internal parameters of Vera devices
  • ‘Variables’; several parameters including settings of plugins

If you change the parameter ‘id’ in ‘Params’ tab… I think you crush the device which had this id (that’s why your Bulb has disappeared).
You should revert id to ‘16’ on the RGB Controller, and if the Bulb is no more here, you have to reinclude it.

How to make the RGB Controller working ?

vosmont,

I got it working. Thanks!

The missing portion for me was that the ‘DeviceId’ field on the Variables tab was not present until after I selected the ‘Device Type’ on the RGB Controller device Settings tab.

After that, I was able to set the ‘DeviceId’ on the Variables tab instead of the Parameters tab and then all was working.

The response time was very slow for maybe 3-4 minutes, but after that it is quick to respond. The Vera was probably still processing something in the background.

Thank you very much for the excellent explanation. I hope it helps someone else down the line.

Jmarken

Great to see a RGB plugin with white as well plus color wheel applied to multiple devices/lights.

I have a lot of LED strips that are controlled by Vera dimmer devices - one dimmer for each color. In your plugin, would it be possible to dial up the strip type (see blow) and just enter the IDs of these simple dimmers - one for each channel. Then issue dimmer commands to these ids depending on the color wheel selection. Master on/off would command all dimmers to turn on or off. For RGBW, optionally just the white channel when commanded to on, rather than RGB and W.

At a higher level there are some complications:
RGB is pretty clear cut. However RGB with W has complications and how do you create white: using all three RGB channels or just the white channel or both. Your plugin appears to allow all three scenarios. But you can also have two channel strips that implement just warm white and cool white, which seem not handled at the moment.

However can I please suggest something like so?:

RGBDeviceTypes[“RGBdimmers”]
RGBDeviceTypes[“RGBWdimmers”]
RGBDeviceTypes[“WWCWdimmers”]

Something like this would probably also allow the mysensor Arduino devices to be similarly engaged.

Hello a-lurker,
I didn’t know mysensors. It’s a great project.
I wait personally for the release of the SBS, which is similar to mysensors (http://www.domotique-info.fr/2015/05/smart-board-sensors-connected/).

Concerning your need to associate the colour channels to dimmers, the early version of the plugin, which was made for the Fibaro RGBW, was acting like this.
But there was lags when changing colors due to Z-Wave latency (some colour channels were modified after the others some seconds later). That’s why the plugin use now directly the Z-Wave color class command.

The RGB/RGBW strips controlled by your arduinos, could use this deactivated portion of code.
I will add the management of warm and cold white channels in the panel.

vostmont - the SBS pcbs look interesting. Good flexibility as shown in the connectivity diagrams:

http://domotique-info.fr/wp-content/uploads/2014/03/domotique-info-4sbs-io-rgbw-.png

On my RGBW needs - I don’t need speed or animations for the task they are being used for, so simple dimmers will work OK. Will look forward to the addition of warm/cool white!

The new version of the SBS should be autonomous (no need of a Fibaro RGBW controller).

Version 1.3 is about to arrive :

  • Add compatibility with Aeotec RGBW Bulb
  • Add dimmer devices management
  • Compliant with ALTUI
  • Add color transition animation for all RGB devices.

This version will be on apps.mios in in few days. If you wan’t to test it, you can download it here :

Version 1.32 is available :

  • Fix multiple CSS injection
  • Watchs status
  • CSS fix
  • registerEventHandler on UI5
  • shows communication errors
  • fix mouse event on colorpicker under Firefox

[quote=“vosmont, post:10, topic:187690”]Version 1.32 is available :

  • Fix multiple CSS injection
  • Watchs status
  • CSS fix
  • registerEventHandler on UI5
  • shows communication errors
  • fix mouse event on colorpicker under Firefox[/quote]

a small fix for ALTUI is needed ( missing constant ), you will need ALTUI version >= 339. will publish it soon.

I’m looking at doing a RGB(W) LED strip installation using the Fibaro FGRGB-101 as a controller. If I am reading right, I should be able to use a color wheel with nothing else except the Vera and this plug-in. Is that right? (I shouldn’t need something like a SmartThings Hub or the Fibaro Home Center 2 or HC Lite controllers in addition).

Thanks!

That’s right : the plugin allows you to change the RGBW color via a color wheel and via ImperiHome.
You just have to pair your Fibaro FGRGB-101 with your Vera (UI5 or UI7)

Good job!
Is it possible to use this plugin on the iOS app? I mean to chose the color or animation.
Thanks!

I’m not sure that the IOS application is fully compatible with custom plugin tabs.
You should use ALTUI (webapp) or Imperihome (an IOS version is in development)

Great App!
I have MySensors RGB (i.e. separate dimmers for each color). Can you control only those three, instead of RGB+W/WW?
I tried to configure the plugin, but it seems to require also the W & WW device ids, which I don’t have.
Thanks!

If you choose the type “RGBW Dimmers”, only one dimmer is mandatory.
You can then select any combination among the color channels ( R G B WW CW).

vosmont, I just wanted to send you a quick note to say that your plugin is amazing.

And the latest couple of versions have made it even better.

Thanks for the continued development and kudos on a great plugin.

Merci!
Jmarken

Thanks

You’re welcome :slight_smile:

Great app!

A few questions though.

  1. For the Aeotec RGB I can’t see the animation options. Do these work for this device yet?

  2. How do I set a color as a preset so I can call it up in a scene? It appears if I alter the color wheel then this will be the new setting for any scene I’ve saved.

(I’m using Ui7)

Again, awesome work!