ParameterDefaultDescriptionBase URLhttp://ycznwl.local/api/v1Default mDNS address — use as-is unless the user provides their own gateway address or IPAuthAuthorization: Bearer ${KNX_TOKEN}See token instructions belowEncodingUTF-8The gateway accepts and emits UTF-8 only. Always send Content-Type: application/json; charset=utf-8 and decode responses as UTF-8. Names, descriptions, room names, action names, and any free-text fields may contain Chinese characters and must be transmitted/parsed as UTF-8. Do not URL-encode JSON payloads or wrap them in an extra encoding layer.
Safe token handling:
export KNX_TOKEN=...) — never paste it directly into a chat conversation, as conversation logs may be persistedThis skill's only required credential is KNX_TOKEN. Optional workflow nodes that
send data outside the gateway or trusted LAN must be configured only after an
explicit user request and endpoint review. Do not introduce hardcoded secrets
into skill files or workflow examples.
Default safety policy: keep automations local to the gateway and trusted LAN. Only author or enable off-LAN HTTP, MQTT, webhook, or email integrations when the user explicitly asks for that integration and approves the exact endpoint.
This skill is organized into progressive reference files. Read them in order when you need detailed information:
FileContentref/devices.mdDevice types, subtypes, capabilities, actions, paramsref/scenes.mdScene data model, actions structure, KNX binding, execution behaviorref/triggers.mdTrigger types and their exact configuration (incl. sun_event with offset scheduling)ref/nodes.mdNode types, subtypes (incl. scene_exec, schedule_match with sunrise/sunset boundaries), config structs, validation rulesref/api.mdComplete REST API endpoint reference (devices, scenes, automation, system location/sun times)ref/examples.mdRealistic, validated workflow examples (incl. scene-based)
Discover devices: GET /devices → note uuid, name, type, capabilities, and room_id (resolve via GET /rooms)
Build actions array: Each action targets a device: json
{
"id": "a1",
"device_uuid": "light-uuid",
"device_name": "Living Room Light",
"action": "turn_off",
"params": {},
"delay": 0
}
action + params must match the device's capability (see ref/devices.md)delay is in milliseconds (0 = immediate, 500 = 0.5s delay before this action)id is a unique string per action (e.g. "a1", "a2")light_dimmer, light_tunable, light_rgb), sending set_brightness with brightness > 0
automatically powers the light on at the firmware/handler level. Do not emit a separate
turn_on action before set_brightness — it adds latency and a redundant KNX telegram.
Sending set_brightness with brightness: 0 will likewise turn the light off. Use an explicit
turn_on / turn_off only when the device has no brightness capability.device_name with the room name: When a scene spans multiple
rooms, prepend the room name to the action's display name so the execution log and UI are
readable. Example: "device_name": "客厅·主灯" instead of just "主灯". Single-room scenes
may keep the bare device name. The room name comes from GET /rooms joined on device.room_id.
This applies to both scene actions ( actions[].device_name) and any name you set on
automation device_control / scene_exec action nodes.1000–10000 K
with a configurable step. The backend clamps & step-aligns values automatically — but pass
reasonable values that the user has actually configured for the device.POST /scenes with name, actions, optional icon, color, description, enabledPOST /scenes/:uuid/execute → verify execution resultGet current state: GET /scenes/:uuid
Update: PUT /scenes/:uuid with partial fields:
json
{
"name": "Updated Scene Name",
"actions": [ ... ],
"enabled": true
}
Only include fields you want to change. The actions array replaces the existing one entirely.
Test: POST /scenes/:uuid/execute
OperationMethodEndpointList all scenesGET``/scenes (optional ?enabled=true)Get sceneGET``/scenes/:uuidCreatePOST``/scenesUpdatePUT``/scenes/:uuidDeleteDELETE``/scenes/:uuidExecutePOST``/scenes/:uuid/executeToggle enabledPOST``/scenes/:uuid/toggleReorderPUT``/scenes/sortView logsGET``/scenes/logs?scene_uuid=xxx
See ref/api.md for full request/response details.
Scenes can be triggered from automation workflows in two ways:
scene_exec node (recommended): { "node_subtype": "scene_exec", "config": { "scene_uuid": "..." } }device_control node with virtual device: { "config": { "device_uuid": "scene-<scene_uuid>", "action": "activate_scene" } }See ref/examples.md Examples 7 & 8 for complete workflow payloads.
GET /devices → note uuid, type, sub_type, capabilitiesGET /scenes → note scene uuid for scene_exec nodesPOST /automation/workflows/import → returns new workflow with server-generated UUIDsPOST /automation/workflows/:uuid/validatePOST /automation/workflows/:uuid/enablePOST /automation/workflows/:uuid/execute can only fire enabled triggers of type
manual. If the workflow has no manual trigger (e.g. only device_event, cron,
sun_event, knx_group_event, or webhook triggers), the call returns
no enabled manual trigger found in workflow ... and nothing executes.
Rule: If the user wants the workflow to be runnable on demand from the UI or via the
API (e.g. a "test" button, a chatbot command, a script), include at least one
{ "trigger_type": "manual", "enabled": true } trigger in the import JSON. You may combine
it with other triggers — they remain independent.
json
{
"triggers": [
{ "uuid": "t-manual", "trigger_type": "manual", "enabled": true, "config": {} },
{ "uuid": "t-cron", "trigger_type": "cron", "enabled": true, "config": { "expression": "0 7 * * *" } }
]
}
A workflow without a manual trigger still runs automatically when its other triggers fire —
it just cannot be invoked through POST /workflows/:uuid/execute.
GET /automation/workflows/:uuidPUT /automation/workflows/:uuidPOST /automation/workflows/:uuid/validateDevice actions are NOT generic "set" or "toggle". Each device type has specific actions. Always check ref/devices.md for the exact action name and required params for each device type/subtype combination.
UUIDs on import are placeholders. The server remaps ALL UUIDs. Use simple
placeholder values like "t1", "n1", "e1" — the server will replace them with
real UUIDs.
Imported workflows start in draft + disabled state. Always validate then
enable after import.
Node configs are strictly typed. A device_control node with wrong params will
fail at execution time even if import succeeds. Always match action + params to the
device's capability.
Edge handle names: Triggers use source_handle: "output". Condition/logic nodes
use "true" and "false" as source_handle. Action, delay, and transform nodes use
source_handle: "output". All target handles are "input".
source_type in edges: Use "trigger" when source is a trigger UUID, use
"node" when source is any node UUID.
node_subtype vs sub_type — DIFFERENT fields!#sub_type (e.g. "sub_type": "light_dimmer")node_subtype (e.g. "node_subtype": "device_control")sub_type in a node definition, it will be silently ignored. The node
will have an empty subtype and validation will report "未知节点类型 action:" (unknown
node type). Always use node_subtype for nodes.errors array, NOT just valid#The /validate endpoint may return "valid": true even when errors is non-empty.
Node config errors (e.g. missing subtype, wrong params) appear in errors but do not
flip valid to false. Always check the errors array is null or empty.
text
✗ BAD: if response.data.valid == true → proceed
✓ GOOD: if response.data.valid == true AND response.data.errors is null/empty → proceed
Always inspect the import response body. Confirm that:
node_subtype fields are non-empty for action nodessource_handle / target_handle have the expected valuesconfig objects contain the correct action/paramsIf any field is missing or empty, the import JSON had a wrong field name.
LimitValueMax workflows200Max nodes per flow50Max edges per flow200Max triggers per workflow5Timeout range5–3600 secondsMax parallel10Max retry count5Max name length128 charsMax description length1024 chars
Retrieve current limits: GET /automation/limits