Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for simple dimmer with RGBW(W) (Hue) devices #23

Open
mattijsf opened this issue Jan 2, 2018 · 13 comments
Open

Support for simple dimmer with RGBW(W) (Hue) devices #23

mattijsf opened this issue Jan 2, 2018 · 13 comments

Comments

@mattijsf
Copy link

mattijsf commented Jan 2, 2018

A majority of my lights are based on Hue Ambiance bulbs. These are white lights with a configurable warmth color. Domoticz classifies these lights as RGBW devices and in Reacticz they ultimately show up as RGB dimmers. Is there a way to enforce Reacticz to render these switches as the following?
screen shot 2018-01-02 at 21 37 39

Currently they always show as RGB dimmers:
screen shot 2018-01-02 at 21 42 37

{
 "DimmerLevels" : "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100",
 "IsDimmer" : true,
 "Name" : "Kamer",
 "SubType" : "RGBW",
 "Type" : "Lighting Limitless/Applamp",
 "idx" : "94"
},
@t0mg
Copy link
Collaborator

t0mg commented Jan 8, 2018

I agree on the need for a better suited widget, but I'm not sure how we can do that. Two questions come to my mind:

  1. How to tell the difference between a true RGB bulb vs a warmth-thing, especially if domoticz doesn't?
  2. I think they should not be rendered as a simple dimmer (this hides the warmth setting, which is worse than the current situation) - so what should they look like?

@mattijsf
Copy link
Author

mattijsf commented Jan 8, 2018

Good questions.

  1. Difficult to tell. I know that there is an related issue on this topic here: Philips Hue White group shows as RGBW domoticz#1202. I'm pretty unfamiliar with the Hue API / Domoticz backend to provide help on this. I think you are right that this needs to be "fixed" in domoticz itself. Maybe a new "RGB Dimmer" / "RGBWW Dimmer" Switch Type next to the existing "Dimmer".

Like the linked issue is describing it is actually an issue with groups only. Single Hue Ambiance lights show up correctly as plain dimmable lights in domoticz, and therefore also Reacticz:
screen shot 2018-01-08 at 21 38 20

  1. Depends on the use case. If I look it my use case I purchased Hue Ambiance lights to pinpoint my personal "warmth" preference. After I found the sweet spot I just use them as regular dimmable lights. Again, a more specific "Switch Type" in Domoticz next to the existing "Dimmer" could be an option to fit specific use cases.

@emontnemery
Copy link

Domoticz has now been updated #2229 such that:

  • Color / or dual white color dimmers have "Type" set to "Color Switch"
  • "Subtype" is correctly reported: WW, RGB, RGBW or RGBWW
  • Set color is published both in "devices" web API reponse and in MQTT domoticz/out messages

@t0mg
Copy link
Collaborator

t0mg commented Apr 3, 2018

Thanks for the heads up @emontnemery

Is this available in the beta channel already? Am I correct assuming that @mattijsf 's Hue Ambiance bulbs will then show up with subtype WW?

I suppose I'll create a new type of dimmer widget with warmth instead of the full hue range. Which subtypes should get that instead of the old one ?

@emontnemery
Copy link

emontnemery commented Apr 3, 2018

Yeah, already available in beta channel.
If subtype is any of WW, RGBWW or RGBWWZ, the switch supports cold / warm white.
If subtype is any of RGB, RGBW, RGBWW, RGBWZ, RGBWWZ, the switch supports color.
Not only fully saturated colors are supported now, you can pass either a Domoticz color object (see the wiki) or RGB. For some reason, I forgot to make it possible to pass a hue, sat, brightness triplet though, please let me know if that's desired and I'll add it as well.
(RGBWZ / RGBWWZ supports turning on RGB and white LED at the same time)

I can't link to Domoticz wiki as it seems to be inaccessible from Europe today..

@t0mg
Copy link
Collaborator

t0mg commented Apr 4, 2018

Ok so to summarize, if the device has type Color Switch, Reacticz should display a dimmer widget with either:

  • A warmth color bar if subtype is WW
  • A full hue color bar if subtype is anything else (RGB, RGBW, RGBWW, RGBWZ or RGBWWZ)
    (not sure if/how we should make saturation editable too)

Makes sense ? @mattijsf could you please confirm (if you have the beta channel) that the Hue Ambiance bulbs show up with WW subtype ?

Regarding HSL triplet, this is what the reacticz widget uses. It converts it to hex values before sending commands, so it's not necessary to add direct HSL support just for that (but it would still be nice to have I guess).

@mattijsf
Copy link
Author

mattijsf commented Apr 4, 2018

@t0mg I'm currently running a stable version of Domoticz. For stability sake I don't want to move that to a beta channel (yet). I will try running a beta version in parallel this weekend to have a look at this update and provide more details.

@emontnemery
Copy link

Warmth and hue is different, it should preferably be possible to set either hue or warmth for RGBWW and RGBWWZ.
For RGBW it should preferably be possible to set either a hue or a white level.

  • Setting hue will turn on RGB LED and turn off white LEDs,
  • Setting warmth will turn off RGB LED and turn on warm/cold white LED
  • Setting white level will turn off RGB LED and turn on white LED

Are you using http or mqtt domoticz/in to control the lights?

@t0mg
Copy link
Collaborator

t0mg commented Apr 4, 2018

No, dimmers are currently using http/JSON to send updates because as far as I remember it wasn't working over mqtt. Mqtt is used whenever was possible at the time of writing the widgets (eg on/off switches use mqtt, but scenes toggles and dimmers don't).

I agree it would be better to be able to set either hue or warmth when the light supports both, but I can't picture how a widget with that many options could remain simple (and small) enough.

@mattijsf
Copy link
Author

mattijsf commented Apr 4, 2018

Maybe it is out of the scope unrelated to this issue but I have these lights to find the correct warmth just once. In day-to-day use I prefer just to have a plain dimmer because the color / warmth is already fine. Especially from a dashboard point of view a plain dimmer would be perfect. Of course this won't be the case for all users...

@emontnemery
Copy link

emontnemery commented Apr 4, 2018

MQTT support is there now for setting color and warmth, but i forgot to update the Domoticz wiki, I'll try to get it done soon.

The clutter issue is typically solved by having some small UI element to allow choosing mode of the color picker, like in the attached picture.

I agree with @mattijsf, dimlevel has highest priority, probably warmth second and hue last.
Perhaps show only dimlevel slider if widget is small?
(And of course someone will disagree with this)

image

Edit: Wiki updated, https://www.domoticz.com/wiki/MQTT#Sending_a_Switch_Command

@t0mg
Copy link
Collaborator

t0mg commented Apr 4, 2018

Ok. I think I have an idea. We already have the concept of widgets that hide away parts of their ui when resized horizontally (for example a dimmer becomes a simple toggle). Maybe I can do the same vertically to show/hide the third bar (which would be hue).

@t0mg
Copy link
Collaborator

t0mg commented Apr 4, 2018

(if we hid both hue and warmth at default height - which is already the minimum height - then I'm afraid existing users would see the suddenly missing hue bar as a bug)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants