BusDiagram GitHub Download

Examples

#Priority control

A short press on Key 3 forces L4 off with DPT 2.001 value 2; a long press releases the override with value 0. Key 4 continues to send toggle telegrams while the override is active. The actuator stores those commands, but L4 stays off until the override ends. It then applies the last received command according to its afterForcing setting.

<bus-diagram>
<script type="application/json">
{
  "formatVersion": 2,
  "title": "Force an output",
  "description": "A short press on Key 3 forces L4 off (DPT 2.001 value 2); a long press releases the override (value 0). While the override is active, Key 4 still sends toggle commands. The actuator stores them, but L4 stays off. When the override ends, L4 applies the last command received.",
  "lines": [{ "address": "1.1", "name": "Example line" }],
  "groupAddresses": [
    { "address": "1/1/4", "name": "L4 lighting", "dpt": "1.001" },
    { "address": "1/4/4", "name": "L4 status feedback", "dpt": "1.001" },
    { "address": "1/5/4", "name": "L4 override", "dpt": "2.001" }
  ],
  "devices": [
    {
      "id": "pushButton",
      "name": "Push-button",
      "address": "1.1.1",
      "kind": "pushButton",
      "behavior": "pushButton/v1",
      "description": "Key 3 sends a two-bit priority override. Key 4 is a toggle key whose object also listens to status feedback.",
      "objects": [
        {
          "id": "key3",
          "name": "Key 3 override",
          "ga": "1/5/4",
          "dpt": "2.001",
          "port": "input",
          "flags": { "W": false, "T": true }
        },
        {
          "id": "key4",
          "name": "Key 4 toggle",
          "ga": ["1/1/4", "1/4/4"],
          "dpt": "1.001",
          "port": "input",
          "flags": { "W": true, "T": true }
        }
      ],
      "buttons": [
        {
          "id": "key3",
          "label": "Key 3 · Force off",
          "icon": "off",
          "short": { "object": "key3", "value": 2 },
          "long": { "object": "key3", "value": 0 }
        },
        {
          "id": "key4",
          "label": "Key 4",
          "press": { "object": "key4", "value": "toggle" },
          "led": "key4"
        }
      ]
    },
    {
      "id": "switchActuator",
      "name": "Four-output switching actuator",
      "address": "1.1.2",
      "kind": "switchActuator",
      "behavior": "switchActuator/v1",
      "description": "Channel 4 has switching, override, and status objects. Channels 1–3 are unused here.",
      "objects": [
        {
          "id": "c4",
          "name": "Channel 4",
          "ga": "1/1/4",
          "dpt": "1.001",
          "port": "switch",
          "channel": "s4",
          "flags": { "W": true, "T": false }
        },
        {
          "id": "f4",
          "name": "Override 4",
          "ga": "1/5/4",
          "dpt": "2.001",
          "port": "forced",
          "channel": "s4",
          "flags": { "W": true, "T": false }
        },
        {
          "id": "e4",
          "name": "Status 4",
          "ga": "1/4/4",
          "dpt": "1.001",
          "port": "status",
          "channel": "s4",
          "flags": { "W": false, "T": true }
        }
      ],
      "channels": [
        { "id": "s1", "label": "unused", "equipment": null },
        { "id": "s2", "label": "unused", "equipment": null },
        { "id": "s3", "label": "unused", "equipment": null },
        { "id": "s4", "label": "L4", "equipment": { "type": "lamp" } }
      ]
    }
  ],
  "options": { "speed": 1, "filterTables": false }
}
</script>
</bus-diagram>