Examples
#Timers
The actuator handles the delay: one on telegram starts the timer, and the output switches off locally. Use status feedback in the bus monitor to measure the duration. Each new detection restarts L3's delay. The clock of this example is a push-button that simulates its scheduled times; the time schedule example uses a simulated clock, a clock master, and a weekly time switch.
<bus-diagram>
<script type="application/json">
{
"formatVersion": 2,
"title": "Timer, clock, and presence detection",
"description": "The actuator handles the delay: one on telegram is enough, and it switches off locally. Observe status telegrams in the monitor to measure the elapsed time.",
"lines": [{ "address": "1.1", "name": "Example line" }],
"groupAddresses": [
{ "address": "1/1/1", "name": "L1 timer", "dpt": "1.001" },
{ "address": "1/1/2", "name": "L2 clock", "dpt": "1.001" },
{ "address": "1/1/3", "name": "L3 presence", "dpt": "1.001" },
{ "address": "1/4/1", "name": "L1 status feedback", "dpt": "1.001" },
{ "address": "1/4/3", "name": "L3 status feedback", "dpt": "1.001" }
],
"devices": [
{
"id": "pushButton",
"name": "Push-button",
"address": "1.1.1",
"kind": "pushButton",
"behavior": "pushButton/v1",
"objects": [
{
"id": "key1",
"name": "Key 1",
"ga": "1/1/1",
"dpt": "1.001",
"port": "input",
"flags": { "W": true, "T": true }
}
],
"buttons": [{ "id": "button-0", "label": "Key 1", "press": { "object": "key1", "value": 1 } }]
},
{
"id": "clk",
"name": "Weekly clock",
"address": "1.1.4",
"kind": "sensor",
"behavior": "pushButton/v1",
"description": "The buttons simulate the clock reaching its scheduled times.",
"objects": [
{
"id": "c1",
"name": "Channel A",
"ga": "1/1/2",
"dpt": "1.001",
"port": "input",
"flags": { "W": true, "T": true }
}
],
"buttons": [
{
"id": "button-0",
"label": "8:00",
"icon": "clock",
"press": { "object": "c1", "value": 1 }
},
{
"id": "button-1",
"label": "8:05",
"icon": "clock",
"press": { "object": "c1", "value": 0 }
}
]
},
{
"id": "pir",
"name": "Presence detector",
"address": "1.1.5",
"kind": "sensor",
"behavior": "pushButton/v1",
"objects": [
{
"id": "p",
"name": "Presence",
"ga": "1/1/3",
"dpt": "1.001",
"port": "input",
"flags": { "W": true, "T": true }
}
],
"buttons": [
{
"id": "button-0",
"label": "Passage",
"icon": "presence",
"press": { "object": "p", "value": 1 }
}
]
},
{
"id": "switchActuator",
"name": "Four-output switching actuator",
"address": "1.1.2",
"kind": "switchActuator",
"behavior": "switchActuator/v1",
"description": "L1 uses a 10-second timer. L3 has a 30-second delay restarted on each detection. L4 is unused.",
"objects": [
{
"id": "c1",
"name": "Channel 1",
"ga": "1/1/1",
"dpt": "1.001",
"port": "switch",
"channel": "s1",
"flags": { "W": true, "T": false }
},
{
"id": "e1",
"name": "Status 1",
"ga": "1/4/1",
"dpt": "1.001",
"port": "status",
"channel": "s1",
"flags": { "W": true, "T": true }
},
{
"id": "c2",
"name": "Channel 2",
"ga": "1/1/2",
"dpt": "1.001",
"port": "switch",
"channel": "s2",
"flags": { "W": true, "T": false }
},
{
"id": "c3",
"name": "Channel 3",
"ga": "1/1/3",
"dpt": "1.001",
"port": "switch",
"channel": "s3",
"flags": { "W": true, "T": false }
},
{
"id": "e3",
"name": "Status 3",
"ga": "1/4/3",
"dpt": "1.001",
"port": "status",
"channel": "s3",
"flags": { "W": true, "T": true }
},
{
"id": "c4",
"name": "Channel 4",
"ga": [],
"dpt": "1.001",
"port": "switch",
"channel": "s4",
"flags": { "W": true, "T": false }
}
],
"channels": [
{
"id": "s1",
"label": "L1",
"parameters": { "timerMs": 10000 },
"equipment": { "type": "lamp" }
},
{ "id": "s2", "label": "L2", "equipment": { "type": "lamp" } },
{
"id": "s3",
"label": "L3",
"parameters": { "timerMs": 30000 },
"equipment": { "type": "lamp" }
},
{ "id": "s4", "label": "L4", "equipment": { "type": "lamp" } }
]
}
],
"options": { "speed": 1, "filterTables": false }
}
</script>
</bus-diagram>{
"formatVersion": 2,
"title": "Timer, clock, and presence detection",
"description": "The actuator handles the delay: one on telegram is enough, and it switches off locally. Observe status telegrams in the monitor to measure the elapsed time.",
"lines": [{ "address": "1.1", "name": "Example line" }],
"groupAddresses": [
{ "address": "1/1/1", "name": "L1 timer", "dpt": "1.001" },
{ "address": "1/1/2", "name": "L2 clock", "dpt": "1.001" },
{ "address": "1/1/3", "name": "L3 presence", "dpt": "1.001" },
{ "address": "1/4/1", "name": "L1 status feedback", "dpt": "1.001" },
{ "address": "1/4/3", "name": "L3 status feedback", "dpt": "1.001" }
],
"devices": [
{
"id": "pushButton",
"name": "Push-button",
"address": "1.1.1",
"kind": "pushButton",
"behavior": "pushButton/v1",
"objects": [
{
"id": "key1",
"name": "Key 1",
"ga": "1/1/1",
"dpt": "1.001",
"port": "input",
"flags": { "W": true, "T": true }
}
],
"buttons": [{ "id": "button-0", "label": "Key 1", "press": { "object": "key1", "value": 1 } }]
},
{
"id": "clk",
"name": "Weekly clock",
"address": "1.1.4",
"kind": "sensor",
"behavior": "pushButton/v1",
"description": "The buttons simulate the clock reaching its scheduled times.",
"objects": [
{
"id": "c1",
"name": "Channel A",
"ga": "1/1/2",
"dpt": "1.001",
"port": "input",
"flags": { "W": true, "T": true }
}
],
"buttons": [
{
"id": "button-0",
"label": "8:00",
"icon": "clock",
"press": { "object": "c1", "value": 1 }
},
{
"id": "button-1",
"label": "8:05",
"icon": "clock",
"press": { "object": "c1", "value": 0 }
}
]
},
{
"id": "pir",
"name": "Presence detector",
"address": "1.1.5",
"kind": "sensor",
"behavior": "pushButton/v1",
"objects": [
{
"id": "p",
"name": "Presence",
"ga": "1/1/3",
"dpt": "1.001",
"port": "input",
"flags": { "W": true, "T": true }
}
],
"buttons": [
{
"id": "button-0",
"label": "Passage",
"icon": "presence",
"press": { "object": "p", "value": 1 }
}
]
},
{
"id": "switchActuator",
"name": "Four-output switching actuator",
"address": "1.1.2",
"kind": "switchActuator",
"behavior": "switchActuator/v1",
"description": "L1 uses a 10-second timer. L3 has a 30-second delay restarted on each detection. L4 is unused.",
"objects": [
{
"id": "c1",
"name": "Channel 1",
"ga": "1/1/1",
"dpt": "1.001",
"port": "switch",
"channel": "s1",
"flags": { "W": true, "T": false }
},
{
"id": "e1",
"name": "Status 1",
"ga": "1/4/1",
"dpt": "1.001",
"port": "status",
"channel": "s1",
"flags": { "W": true, "T": true }
},
{
"id": "c2",
"name": "Channel 2",
"ga": "1/1/2",
"dpt": "1.001",
"port": "switch",
"channel": "s2",
"flags": { "W": true, "T": false }
},
{
"id": "c3",
"name": "Channel 3",
"ga": "1/1/3",
"dpt": "1.001",
"port": "switch",
"channel": "s3",
"flags": { "W": true, "T": false }
},
{
"id": "e3",
"name": "Status 3",
"ga": "1/4/3",
"dpt": "1.001",
"port": "status",
"channel": "s3",
"flags": { "W": true, "T": true }
},
{
"id": "c4",
"name": "Channel 4",
"ga": [],
"dpt": "1.001",
"port": "switch",
"channel": "s4",
"flags": { "W": true, "T": false }
}
],
"channels": [
{
"id": "s1",
"label": "L1",
"parameters": { "timerMs": 10000 },
"equipment": { "type": "lamp" }
},
{ "id": "s2", "label": "L2", "equipment": { "type": "lamp" } },
{
"id": "s3",
"label": "L3",
"parameters": { "timerMs": 30000 },
"equipment": { "type": "lamp" }
},
{ "id": "s4", "label": "L4", "equipment": { "type": "lamp" } }
]
}
],
"options": { "speed": 1, "filterTables": false }
}