Skip to content

Fix generic knx_receive trigger tokens for DPT 3.007#91

Open
jobosol wants to merge 1 commit into
athombv:release/1.6.0from
jobosol:fix/knx-receive-dpt3-tokens
Open

Fix generic knx_receive trigger tokens for DPT 3.007#91
jobosol wants to merge 1 commit into
athombv:release/1.6.0from
jobosol:fix/knx-receive-dpt3-tokens

Conversation

@jobosol

@jobosol jobosol commented Jul 22, 2026

Copy link
Copy Markdown

Summary

Adds support for KNX DPT 3.007 relative dimming values in the generic knx_receive Flow trigger.

DPT 3.007 is decoded as an object containing the dimming direction and step size. Previously, this object was not converted into a useful numeric Flow token.

This change converts it into a signed, normalized value:

  • Positive values represent dimming brighter
  • Negative values represent dimming darker
  • The magnitude represents the KNX step size, for example 0.125 or -0.125 for a 1/8 step

The resulting value can be connected directly to Homey's relative dimming actions.

The special handling is limited to DPT 3.007, since DPT 3.008 uses different semantics.

Use case

This makes it possible to use physical KNX wall switches to control non-KNX lights through Homey.

For example, a KNX push button can publish cyclic relative dimming telegrams while it is held. A Homey Flow can receive each telegram and pass the signed value directly to the relative dimming action of a Philips Hue light.

Testing

Tested on a physical KNX installation using:

  • Schneider Electric KNX Push Button Dynamic Labelling, universal
  • SpaceLogic KNX IP Router
  • A Philips Hue light controlled through a Homey Advanced Flow

The wall switch was configured in ETS to cyclically send 1/8 brighter and darker DPT 3.007 commands. Homey received +0.125 and -0.125, and the Hue light dimmed continuously in the corresponding direction while the button was held.

Dimming stopped when the wall switch stopped publishing cyclic commands.

npm run lint passes locally.

Closes #71

The knx library parses DPT 3.007 telegrams into an object with a direction bit (decr_incr) and a 3-bit stepcode (data). The object case in the token mapping only handled Date and DPT 18 scene objects, so the Flow tokens were always 0 / false / empty regardless of the received command.

Map DPT 3.007 to Homey Flow tokens: the number token carries the signed step on Homey's -1 to 1 dim scale, the boolean token indicates an active dim command, and the string token reads up <percentage>%, down <percentage>% or stop. Restrict the mapping to subtype 3.007 because DPT 3.008 uses different direction semantics.

Fixes athombv#71
@ttherbrink
ttherbrink changed the base branch from master to release/1.6.0 July 22, 2026 18:42
@ttherbrink

Copy link
Copy Markdown
Contributor

Thanks for the PR. I've had a small look at it and it seems good. I'll have a better look next week so it can go along with release 1.6

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Expose all KNX DPT 3.007 (Relative Dimming) values

2 participants