Quickstart

KNX Quickstart: Set a Lighting Level

Set a virtual lighting circuit to 35% and verify the actual brightness through KNX group readback.

Before you begin

Install SPX with the KNX package and SPX UI. Have a reachable KNX/IP tunnelling gateway and a client that sends raw group values. Use the lighting-zone YAML linked in the communication reference.

Run the test

  1. Import the YAML in Models → Load model from file. Create a fresh instance with your gateway host/port and ga_main=7, then start it. Connect your client to the same gateway.
  2. Send GroupValueWrite to 7/1/10 with one raw byte 0x23 (decimal 35). This binding uses uint8 percentages 0–100, rather than DPT 5.001 scaling or ASCII digits.
  3. Wait for the lighting ramp to settle. Send GroupValueRead to 7/1/10 and inspect the GroupValueResponse.

Check the result

The actual-level response is 0x23 / 35%. An earlier response may show an intermediate ramp value. Restore the fresh model’s target 70% with raw byte 0x46, verify it after settling, then stop the instance.

Protocol communication

Use these settings and messages with the library’s lighting zone model.

Client / transport
KNX/IP tunnelling → GATEWAY_HOST:3671 over UDP; same gateway as SPX
Address override
ga_main=7 for this exercise; library default: 1
Brightness codec
uint8; one raw byte in 0–100, not DPT 5.001 scaling

Replace host placeholders with reachable addresses and use your published ports.

Swipe the table to see requests and replies.

Addresses, requests and expected replies
Address / messageOperation / payloadExpected reply
7/1/10Circuit A: GroupValueWrite raw 0, 100 or 35; GroupValueReadGroupValueResponse: actual brightness, eventually 0, 100 or 35
7/1/11Circuit B: same read/write uint8 formatActual Circuit B brightness in 0–100%
7/1/14Occupancy: GroupValueWrite; boolean true/false; inbound onlyNo direct readback binding; check occupancy_detected in SPX
7/1/15Daylight: read / outbound updates; DPT 9.004Measured illuminance in lx; varies with the scenario

Values describe this model’s nominal setup unless noted. Live measurements change as the simulation runs.

Example request and reply

Write 0, then 100, then 35 to 7/1/10, waiting for each ramp to settle. Issue GroupValueRead after each step and verify the actual-level response.

GroupValueWrite 7/1/10  payload: 0x64 (decimal 100)
Wait for the ramp; GroupValueRead 7/1/10
→ GroupValueResponse payload: 0x64 (100%)
GroupValueWrite 7/1/10  payload: 0x23 (decimal 35)
Wait; GroupValueRead 7/1/10
→ GroupValueResponse payload: 0x23 (35%)
No reply or an unexpected value?
  • Target writes and actual feedback share 7/1/10 in this model. An immediate read may return an intermediate ramp value.
  • Decimal 35 is raw byte 0x23; decimal 100 is 0x64. Do not send ASCII text or scale 100% to 255.
  • Allow enough gateway tunnels for SPX and your client. If your instance uses ga_main=1, replace 7/... with 1/... on every group address.

Next steps

See the lighting walkthrough with 0 → 100 → 35% steps. For adapter settings, use the KNX guide.