-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
state inconsistency when turning Osram bulb off using brightness parameter #2566
Comments
I believe that ”brightness 0” gets translated to ”state off” inside the bulb firmware so it acts as it receives turn off command. If you turn off bulb normally it also reports state as off and last value of brightness it was using? This is what I expect happen since when turned on it will resume to last brightness it was using. |
Hi Kryzek, thanks for your response. The current behavior is not consistent: Bulb is on with "brightness":25 So the answer to your question "If you turn off bulb normally it also reports state as off and last value of brightness it was using?" --> No |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi @Koenkk do you have any solution for this behavior? |
Could you provide the complete debug logging of this issue? To enable debug logging set in advanced:
log_level: debug |
Hi Koenkk thanks for your response. Sorry for the delay, here comes the log: |
I understand the problem now. The questions is what the behaviours should be. My current opinion is that this is expected behaviour.
|
the expected behavior for your last case is at the moment not working. turn it off with "brightness":0.0 -> in my case is the problem that you translate |
I have the same problem. I use a “Philips Hue Aurelle” with zigbee2mqtt and control it from openHAB. When I set the brightness to 0: I get the following return: My problem is, that I use a slider-item to control the brightness / OnOffState and when I slide to 0 the light switches off, but the slider jumps back to the old value (here 100%) |
Hi @Koenkk i have upgraded to the latest dev branch and run any ota update of my osram bulbs. Unfortunately is the behavior still the same |
This issue should be fixed in the latest dev branch. Please confirm (ping @Gio76). When the bulb state == OFF, brightness will always be 0. |
@Koenkk I tested it with the zigbee2mqtt-edge add-on and the issue is still there. |
i´m using now: zigbee2mqtt version 1.13.1-dev (commit #409fb24) and the issue is fixed. thanks a lot @Koenkk ! |
@Gio76 please share your debug logging here |
|
I don't see debug logging. To enable debug logging set in advanced:
log_level: debug |
Sorry about that, please see below:
|
@Koenkk setting |
For info on the Home assistant side a patch for the Prometheus exporter has been shipped in the latest version as an extra protection in case this bug shows up again in the future: |
What is wrong with this behaviour. This is the same as for an 'analog dimmer'? @Koenkk Is there a workaround for this (see my ticket #4237 ) |
Hi, |
Hi, In E.g. Domoticz, Node Red or HomeAssisant you can configure the desired response (state=off) when brightness=0 is received. |
Sorry this doesn't make any sense. When you request a bulb to go to zero brightness it should turn off. When a bulb is off its actual/physical brightness IS 0. I think you need something like "lastbrightness". |
What do you refer to with "this"? |
returning any brightness beside 0 when a bulb is off. |
I think that a bullb will return a report of a brightness value > 0 when also reports a state of off. Yet this is what I see most of my bulbs doing when looking at a packet capture or debug logging edit: Just enabled debug logging and ran this on the log:
Currently there are 0 bulbs with state=on edit2: lets just grep for the table_lights/bulb2 while the log has not yet rotated:
You see it clearly sending a genLevelCtrl report after sending a genOnOff report. |
So what to return for I currently think it does make sense to report the values as how they are in the bulb. When state is |
The way I read the ZCL is that the brightness value is not invalidated when the bulb is in the 'off' state. Sort of like when volume for a speaker, if it was set to 50% and you turn it off the volume knob is still at 50% (unless it's one of those where the volume knob also works as the power off... ok this is a really bad example) |
But the current volume the speaker is outputting is zero, isnt it? color_temp and color should be reported as null / none since they physically require a brightness greater 0. Btw we would break dimmer (tthat sends absolute brightness instead of +/-) when setting 0 isnt treated as off. |
Have two properties in the output is not the way to go IMHO, that’s even worse than what we have now. If we go that route they should be saved and restored when the state changes back to on under the same property.
And ideally be updated in the background when changes get reported by the bulbs (but not published).
Still not convinced it’s z2m’s job to do this though, believe it should output what the device is telling us is the value. Or when reporting is disabled, what we set it too or read from it with a get.
~ sjorge
… On 4 Sep 2020, at 14:20, Pockrandt ***@***.***> wrote:
Sort of like when volume for a speaker, if it was set to 50% and you turn it off the volume knob is still at 50% (unless it's one of those where the volume knob also works as the power off... ok this is a really bad example)
But the current volume the speaker is outputting is zero, isnt it?
It think the most sane thing would be a current_Volume, last_Volume.
(current_Bright / last_Brightness for our bulb)
color_temp and color should be reported as null / none since they physically require a brightness greater 0.
Btw we would break dimmer (tthat sends absolute brightness instead of +/-) when setting 0 isnt treated as off.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
No, setting brightness 0 will still result in an OFF. I started to realize what was wrong after reading the comment from @georgeavd (#4237 (comment)). Quoting the sentence which triggered me:
The behaviour will come down to the following:
|
What in the case of
a) update the state internally but don't publish What afterwards when we set the state to on? If we went a) I guess we publish the cached state, but if we went c... what do we send for brightness ? 0 (as now? which is honestly so confusing) or 128 ? c is the current behavior with 0 for the publish on state on. |
@sjorge when 0 brightness is set, the brightness level of the bulb should be 0, so the bulb will report 0 in this case. |
OK so in case of on + 128, sending brightness=0 will set the currentLevel to 0 and also onOff to 0 afterwards? |
@sjorge exactly! |
@sjorge that's indeed something that has to be checked! |
I have one of the E14 and E27 Innr ones so once this gets updated, I’d can check.
~ sjorge
… On 4 Sep 2020, at 17:41, Koen Kanters ***@***.***> wrote:
@sjorge that's indeed something that has to be checked!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@Koenkk |
Please look further as only a lightbulb with some intelligence onboard. There are also dimmer-modules (E.g. ROBB smart 200_004-0). If you send the OFF to this, the last set brightness level is maintained also in de return message. And please keep in mind that zigbee2MQTT is an interface and should be transparent to all messages and not altering them. |
Fixed in the latest dev branch now. @georgeavd @user1o1 @sjorge please test if the behaviour is as expected now. @sjorge also test if it fixes #4214 Changes will be available in the latest dev branch in a few hours (https://www.zigbee2mqtt.io/how_tos/how-to-switch-to-dev-branch.html) |
@Koenkk looks good now, old brightness is retained when toggling the st ate. |
I’ve tested this and the value is either 1 or 2, depending on if the bulb turns off at brightness 0 or 1. |
@georgeavd that behaviour is currently correct right? (it turns on at the lowest possible brightness for that bulb as @sjorge mentioned) |
@Koenkk For me that behaviour is correct. |
Ok, I will close this. thanks all! |
Hi @Koenkk , |
@andreypolyak could you explain more of your use case, maybe we can find an alternative solution. I'm not eager to make this an option because it caused very nasty (hard to solve) side effects. |
Hi @Koenkk, |
Hey, unfortunately the following behavior is back:
The bulb is turned off, but that was as well the case before (sorry if I was misleading). Strangely enough, now the previous brightness is returned instead of always
1
. The same behaviour can be applied to Tradfri bulbs (dimmable and dimmable + CT models).this is how the mqtt communication looks like
I would be happy if the device returned
{"brightness": 0}
instead of{"brightness": 50}
just as I've set it.Originally posted by @thewilli in #1321 (comment)
The text was updated successfully, but these errors were encountered: