-
Notifications
You must be signed in to change notification settings - Fork 779
Hue binding: dimmer and switch items for brightness should move together #866
Comments
Please state what UI you are using. |
I was using HABdroid. |
I can see similar problem in Classic UI. If I use the color channel and the color picker to set brightness to 0, the switch linked to the brightness channel is not updated. |
Could you please give me a reference? I am not aware of any brightness channels for color lights... |
You're right on one point, I was able to define only one Color item and link it to the color channel.
Then I was able in my sitemap to use different elements for this item:
Doing that I was able to use the switch, the slider for brightness and the color picker. One error I can see in my logs:
Since this error appeared, I was not able to open in classic UI the frame containing the slider. Another problem is that the UI controls are not initialized with the correct value at startup. If my light is ON with brightness at 100%, I would expect the switch to be ON and the slider to be at 100% rather than the switch OFF and the slider at 0. When I play with the hue application to change color or brightness, I can see in the UI (classic UI or HABdroid) that the color is changed accordingly, but one time again only the color picker widget. Sorry if all this is a little confused. |
@lolodomo I see you use hue, and perhaps the wiki docs confuse you here, Right under the heading it is talking about dimmer item for brightness and colour temperature, but the example uses
Update: I tried to create colour picker, slider and switch for my Hue lights to show example, but they would not respond, even with hue.cfg(not sure if it was used). After searching google I came across this community post and it shows example of how it works with OH2. The item wiki docs point out that You can see examples here:
hue.sitemap:
All of these will work. The slider on Color is adjusting the B(brightness) channel. I am not sure if it is the same as sliding the colorpicker brightness slider which might send full HSB value to the bulb instead of brightness only like with Dimmer? I've not looked into smarthome docs yet, but the openHAB wiki docs that I refer to are not as reliable when using OH2, wiki docs for hue for example show how item config used to be with no note for OH2 users about the change. @kaikreuzer via both Paper UI and HABmin I am unable to see I wasn't aware of the issue with the item types being updated with a channel value triggered out of openHAB causing problems. :( I've not used anything outside of openHAB yet, but Classic UI is not showing the Switch toggling off even though it's getting the HSB value, presumably because it's a string and is treated as truthy? Paper UI did not seem to be affected either, only Basic UI. Just used a Chrome app to change state, everything seems fine? Only Basic UI is showing these symptoms. Slider on
I don't know if you should use ColorPicker for Brightness channel(unless you're referring to HSB and not hue:brightness channel). I have used ColorPicker with Color item type and channel, using the brightness slider in ColorPicker UI does not turn light off because lowest brightness value sent over network is 1-2, the slider is not allowing for 0. This might be due to the 300ms delay I have seen in code, I think this might be a throttle(send update only once per 300ms) instead of debounce(send update of latest value after 300ms has passed), either that or value range issue. |
There actually should not be a brightness channel, whenever there is already a Color channel. There is a bug in the hue binding, which will be cleaned with #1652. This PR also contains an enhanced README.md. |
@kaikreuzer I'm wondering why you think there should be no brightness channel if a colour channel exists. I have the LCT001 Extended Colour lights and from my earliest usage of the API I have always been able to directly set the brightness channel ("bri") using JSON in Python. I'm having trouble finding the exact API reference (it seems they've had a shuffle around on the philips site), but under supported devices on this page ( https://developers.meethue.com/documentation/supported-lights ) you can see that: the "extended color lights (1.5)" support:
from 1.4 Color Light:
from 1.3 Color Temperature Light:
from 1.2 Dimmable Light:
from 1.1: On/Off Light(looking at only the state object attributes:
Listing all in one place:
I personally have only ever used:
Just to add: https://developers.meethue.com/documentation/lights-api#14_get_light_attributes_and_state There is an example response at 1.4.3 of a color light that has a brightness value:
Sorry for the long post, it's turned into a bit of a reference for me. I realise I may be talking about something slightly different, but it seems a few projects drop "brightness" from color lights and I'm trying to work out why (when AFAICSee), it works for me in my own hacked together python automation setup. |
For a Philips Living Colors Bloom light, I linked manually the brightness channel to a switch item and to a dimmer item.
When I set the dimmer to 0 (using the UI), the switch is not switch OFF and remains ON.
PS: note that it works well in openHAB 1.x.
The text was updated successfully, but these errors were encountered: