deconz-rest-plugin: turn off with transition (fade out) stopped working in home assistant deconz addon
Describe the bug
turn off with transition (fade out) stopped working in home assistant. I don’t know what happens when i use the rest api directly because I have downgraded the deconz addon again to avoid the bug. I have not found any way in home assistant to restore previous behavior (fade off a zigbee light) without downgrading the deconz addon.
Steps to reproduce the behavior
in Home Assistant call the turn_off service with
"data": {
"transition": 10
}
Expected behavior
Light will fade to black during 10 seconds, after this the light is off and the stored brightness in the bulb is 1 (if you turn it on the next time)
Actual behavior
Light will switch off immediately and the stored brightness remains at 255
Environment
- Host system: proxmox + Home Assistant (2022.11.5) + Deconz-Addon 2.20.0 or 2.20.1 (not sure, have downgraded again)
I could not find anything suspicious in the change log, but the turn-off with transition behavior has definitely changed, With the afforementioned version I am completely unable to do a fade-off transition.
Fade from one brightness to another works, but fade-off seems impossible, at least from within home assistant.
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 2
- Comments: 49 (26 by maintainers)
Tbh, I don’t have enough info to assess whether there’s a bug in deCONZ or not. Also the “me too” remarks don’t help, with similar symptoms in a completely different setup (e.g. recalling a ZIgbee scene, or updating the
actionof agroupsresource).As I said before, Zigbee doesn’t take a transition time with an Off command, so you would have to use a Off with Effect command, or a Move to Level (with On/Off). To make matters worse, not all ligts implement these commands correctly, which resulted in lot of ugly whitelisting in the legacy code.
To fully analyse this issue, I would need to know:
lightsresource;stateof thelightsresource.If the behaviour changes between versions, we need to understand whether that’s because 4) has changed (in which case the API client does something else), or because 5) has changed.
Possibly, when:
off_with_effect;So keep it on gold. No problem with that.
@Mimiix When I know what to ask and how to formulate the question, then I generally do ask on Discord. This topic is however quite above me, and I don’t want to be that guy with the question “How do I create DDF” because I’m -honestly- not really interested how the sausage is made, I just want to see it working (I am however happy to provide helpful data to someone with better understanding of this whole thing). Secondly, I’m still not really sure what the issue is, as in current and previous versions there was no DDF for my Osram bulbs, however before they were working properly and now they are not. Something somewhere changed between 2.19x and 2.20.x that impacted this change and I really do not know how to get that information.
See https://github.com/dresden-elektronik/deconz-rest-plugin/pull/6316.
So here is my situation. And to be honest, the more I look into it, the less sense it makes. To briefly summarize, my problem is with dimming to Off state from HA. Last version of deCONZ that worked properly in my case was v2.19.3, so below I’ll reference it vs the last one (v2.21.2).
In the deCONZ GUI all of the commands work as expected (On, Off, Toggle, Off with effect, Move to level(with On/Off)), on both versions.
There is no DDF associated with this bulb. Does it mean that it uses generic “color_temperature_light.json” or something else?
4&5) Below is a c/p of deCONZ log for HTTP & APS & APS_L2 for both versions. I manually run parts of the HA automation that turns light on, and couple of seconds later turns it off with transition set to 10s. (Bulb is number 22 and it’s MAC address is 0x7cb03eaa00af78ef)
In this version the bulb switches Off in 10s as it should. I’m not sure but haven’t found anything related to it in log with timestamp 10s after the Off command.
In this version the bulb switches to Off immediately.
Now, I’m no expert in this matter, but I do not see any differences between the versions. If my assumption from 3) is correct, there are differences between .json files in old vs new versions (here I’m comparing old vs 2.20.1 as it’s the first one where it no longer works properly)
However, although newer json has more items, including “move with onoff” among other, it doesn’t work properly in my case. Or I might be completely wrong and something else is used instead of this generic jsons?
Anyhow, any help would be appreciated, I’d like to resolve this issue to be able to continue to update deCONZ going forward. THANKS!
Still not fixed.
What lights does this concern? Are these exposed through DDF or through legacy code? Was the DDF updated in v2.20, to include
cap/on/off_with_effect?Note that you cannot specicy a Transition Time to the Zigbee Off command. Instead, you need to use Off with Effect. However not all devices support this command, notably some plugs, but also some exotic lights.
By default the legacy code sends Off with Effect when
"on": falseis PUT. When"transitiontime": 0is included, it sends Off. It also sends Off for some whitelisted devices that don’t support Off with Effect.As of v2.20, the DDF code sends Off, unless
cap/on/off_with_effectis included in the DDF.