Domoticz: Use RGB(W) value instead of Hue

Created on 5 Jan 2016  路  17Comments  路  Source: domoticz/domoticz

Hello,

there is still only hue & brightness, do you plan to add the RGB color value or the third parameter of HSB ?

type=command&param=setcolbrightnessvalue&idx=395&hue=128&brightness=42&iswhite=false

enhancement

Most helpful comment

vote for rgbwc. hue/sat/bright can't describe all 5 channels correctly. maybe some functions to convert to and from hsb if it is used in scripts and such.

All 17 comments

In the latest commit/beta you can now issue

type=command&param=setcolbrightnessvalue&idx=395&hex=RRGGBB

for example

type=command&param=setcolbrightnessvalue&idx=395&hex=F08040

But actually it would be best to rewrite all hue code to RGB, and implement a good HSB/HSV conversion
But this is not that easy as it is in a lot of places (lights/scenes/groups/timers/control/...)

Hi,

Does this mean the virtual rgbw device will be usable in v3.x?

Cheers!

this has nothing todo with a virtual switch but with rebuilding the whole application to use RGB(WC) instead of hue.
So far i already reverted my changes 2 times.
Hue is so build in at the moment, it is not easy to change
But the milestone is set, only hope i got enough time

Dont know why you want a virtual rgbw switch, maybe you can have a look at mysensors.org and use that as a converter between your hardware and domoticz ?

Well I'm using my own esp8266 based hardware so just wanted a way to get the colour values out of domoticz really..

I'll have a look mysensors then.

Also had a look at milight as domoticz supports them and protocol makes it easy to emulate but domoticz milight rgbw doesn't device seem to pass all the info (just part of the hsb)..

Thanks anyways :)

You can use your esp8266 with mysensors

I've 2 great esp8266 sketch

1st run esp8266 as a Philips Hue bridge and bulb (for a ws2812b led strip, each pixel is set as a bulb)
Need some help to make it run all ledstrip as a single bulb.

2nd run esp8266 as a Milight bridge and RGB pwm led strip contr么ler (looks perfect for a h801 controler)
This one is base on nodmcu FW and is made on LUA i'm working to made it run for ws2812b led strip, once done, will add it some cool effect for disco mode.

With this esp8266 works :

https://github.com/deennoo/ESP8266-ws2812b/tree/nodemcu

i manage to drive saturation by playing on disco mode up and disco mode down

domoticz hardware : milight set on RGB
domoticz device : on/off switch

Please stay on topic, or use our forum

Thank you very much to have implemented the 'hex' parameter for RGB. really nice addition, that many people were waiting for! :+1:

As you seems to say that internally Domoticz is build using HS(V)/HS(B), I'm voting to STAY like that because it is more clever for a lot of reasons, including the fact that HSV color is a way more natural method to describe a color for a human mind, and that it allow easy natural and smooth dimming of colors, vs RGB raw values.

Also from a hardware point of view, libraries like FastLED, are doing an amazing job and internally also speak in HSV. That why I'm also currently pushing at MySensor for them to add a V_HSV type to direcly send/receive HSV values.

So while you're there , and if if that is not that hard, would you please also add the S (saturation) to the API, ie :

type=command&param=setcolbrightnessvalue&idx=395&hue=128&brightness=42&iswhite=false&sat=255

It would be awesome to be able to also change colors using HSV directly !

I want add new device (BleBox) which control RGBW lights.
And i think, that I must add RGBW to parameter (get from popup window with colors).

vote for rgbwc. hue/sat/bright can't describe all 5 channels correctly. maybe some functions to convert to and from hsb if it is used in scripts and such.

we should add two sliders to the color popup/picker, if the warmwhite is 'touched/changed' the color white should go to zero, and visa versa
internally there is still a very big challenge to remove the hue fields/variables, keep them for limitedled of devices that depends on the hue.
Store all in Hex (CW_WW_R_G_B) and if needed convert RGB to hue

I wanted add new type of device (RGBW intead HUE), but i didn't find place, when RGBW may be stored in struct General Switch :(

Dont think we need another sensor type, the current type is perfect.
The field 'Hue' in the database should be renamed to 'Color' and we can store there a CWWWRRGGBB value in (as number, like it is now)
Only we have to handle this value differently for devices that work with Hue instead of RGB (WW), for applamp/limitedless we need to convert the RGB part to Hue for example

Regarding sliders for white/warm white. GUI wise I think a slider for general white and one for color temperature is a bit more intuitive(balance between ww and cw). since you would like to have those mixed. not one or the other.

It seems to me that the simple On/Off Switch lights the Led Bulb with the last color configuration saved with the RGBW Switch. I am not sure of the logic of this. Shouldn't instead the simple Switch light the Bulb with the configuration defined in the device configuration panel (Parameters 37, 38 and 39) which may include a color animation (which the RGBW Switch does not allow) ?

Implemented

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Hydci picture Hydci  路  7Comments

gaeljw picture gaeljw  路  22Comments

sushukka picture sushukka  路  15Comments

TheReptile picture TheReptile  路  16Comments

PierreLevres picture PierreLevres  路  21Comments