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
[knx] Correctly support state sub-types for DPTs #16337
Conversation
Signed-off-by: Kai Kreuzer <kai@openhab.org>
@kaikreuzer
default.items:
Sending value 0,0,0 from the console sends the corresponding packet with status OFF. However, no packet to control the color seems to be sent to the bus on GA 10/0/0. |
@holgerfriedrich I never tried rgb DPTs, since I don't have any such devices on my KNX bus. |
I found the mistake in the config above: Type color: in "rgb knx in" [hsb="232.600:10/0/0"] Now it works as expected. |
Awesome! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix!
This breaks dimmer channels, at least "sometimes".
Fails sometimes, sometimes not, usually with
I tried to find out why this happens and enhanced the logging in the new code and found three different outputs:
The output of the This was not important before, because we only checked for class-presence but did not apply any conversion, while we now change the type. |
@kaikreuzer @holgerfriedrich Shall we revert it for now? It seems worse than before, at least for me. |
Signed-off-by: Kai Kreuzer <kai@openhab.org> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
This fixes a problem when KNX channels are linked to items that support sub-types of what the DPTs can handle in case of "-control" channels or channels with a follow profile.
More concretely: Having a Color Item linked through the follow profile to a DPT 1.001 results in
None of the configured GAs on channel 'xxx' could handle the command
, while it would be expected thattrue
is sent for anything that isn't equal to the stateOFF
.This PR makes sure that the binding tries to check if the command is a state that can be converted to a suitable subtype for the linked DPT and then sends out the according KNX telegram.