Alarm
Builds a burglar alarm from the sensors a house already has. It holds the armed state, decides which sensors matter in which mode, runs the entry and exit delays, and drives a siren and notifications.
1.What it does
The block is the alarm's logic. It is tied to an alarm device, which carries the wiring — the arming bits, the sensor contacts, the siren output — while the block decides what happens when.
- Two armed states: away, which watches everything, and stay, which watches only the perimeter.
- An exit delay so the customer can leave, and an entry delay so they can disarm on the way in.
- A panic input that sounds the alarm immediately, armed or not.
- Siren and notify outputs you wire to whatever should happen — a siren, lights, a message.
2.Sensor points
Unlike the other blocks, the alarm's inputs are not fixed — you add one pin per sensor.
- Open the block and pick the alarm device.
- Press Add motion sensor for each interior detector. Each one adds an input pin
Sen1,Sen2, and so on. - Press Add window/door sensor for each contact. Each adds
Win1,Win2, … - Wire each physical sensor to its pin.
The split is the whole point: Sen pins are interior motion and Win pins are the perimeter, and that is what makes stay mode possible.
3.Inputs
| Pin | Label | Description | Range |
|---|---|---|---|
| Arm | Arm away | Pulse arms in away mode — every sensor is watched. Runs the exit delay first. | 0/1 |
| Stay | Arm stay | Pulse arms in stay mode — only the Win contacts are watched. Also runs the exit delay. | 0/1 |
| Disarm | Disarm | Pulse disarms, clears any sounding alarm, and cancels a running entry or exit delay. | 0/1 |
| Panic | Panic | Pulse raises the alarm immediately — siren and notify — regardless of whether the system is armed, and with no delay. | 0/1 |
| Sen1…n | Motion sensors | Interior detectors. Trigger an alarm in away mode only; in stay mode they are ignored completely. | 0/1 |
| Win1…n | Door / window contacts | Perimeter contacts — 1 means open. Trigger an alarm in both away and stay mode. | 0/1 |
4.Outputs
Outputs are only re-sent when they change, so a quiet armed night produces no repeated writes.
| Pin | Description | Range |
|---|---|---|
| Armed | 1 whenever the system is armed, in either mode. It stays 0 during the exit delay and only goes to 1 once arming completes. | 0/1 |
| ArmLevel | Which mode: 0 disarmed, 1 armed stay, 2 armed away. Use it when another flow needs to branch on the mode rather than just "armed or not". | 0…2 |
| Alarm | 1 while an alarm is active. Cleared by disarming. | 0/1 |
| Siren | Follows Alarm. Wire it to the siren output. | 0/1 |
| Notify | Follows Alarm. Wire it to a Notification block, a light, a call — to whatever should tell somebody. | 0/1 |
By default Siren and Notify rise with Alarm and run until somebody disarms. Give either one a delay, or cap the siren with Max siren time, to stage the response — see the parameters below.
5.Parameters
| Parameter | Summary | Description | Unit | Default |
|---|---|---|---|---|
| Exit delay | Grace period when arming | How long after arming before the system is really live. Sensor activity during this window is ignored, so walking out of your own front door starts nothing. 0 arms instantly. | s | 30 |
| Entry delay | Grace period when a sensor trips | How long between an armed sensor triggering and the siren sounding — time to reach the keypad. 0 means the siren sounds at once. | s | 0 |
| Siren delay | Hold the siren back | Seconds between the alarm firing and the Siren output rising. 0 raises it with the alarm. | s | 0 |
| Notify delay | Hold the notification back | The same for Notify, independently of the siren — a quiet warning first, the siren after. | s | 0 |
| Max siren time | Noise cut-off | Silences the siren after this long. The system stays armed and Alarm stays 1 — it is a cut-off, not a disarm. 0 sounds until somebody disarms. | s | 0 |
| Rem | Remanence | When on, the system is still armed after a reboot. When off it comes back disarmed. | 0/1 | 0 |
6.Away and stay
Two armed states, differing only in whether interior motion counts.
| Away | Stay | |
|---|---|---|
| Armed by | Arm | Stay |
| Motion sensors (Sen) | Trigger the alarm. | Ignored entirely — the family can move around at night. |
| Contacts (Win) | Trigger the alarm. | Trigger the alarm. |
| Use it for | Nobody home. | Everybody home and in bed, with the perimeter watched. |
Sen pins and everything on the building's skin — doors, windows, a garage shutter — on Win pins. If a detector covers a hallway the family crosses at night, it belongs on Sen or stay mode will be unusable.7.Exit delay — arming
What happens between pressing arm and the system being live.
ArmorStayfires. The exit countdown starts and theArmedoutput stays 0 — the system is not yet live.- Sensor and contact activity during the countdown is ignored and not queued: nothing fires the moment the delay ends because you walked past a detector on the way out.
- When the countdown finishes the system arms,
Armedgoes to 1 and every watched sensor is live.
- Pressing arm again during the countdown does not restart it. Repeated commands — a button pressed twice, a status echoed back — are ignored, so the system cannot be kept permanently in the act of arming.
Disarmduring the countdown cancels it.- With an exit delay of 0 the system arms the instant the command arrives.
8.Entry delay — coming home
What happens between an armed sensor tripping and the siren.
- An armed sensor or contact goes active.
- With an entry delay of 0 — the default — the siren sounds immediately.
- With an entry delay set, the countdown starts. Further sensor activity during it is ignored, so walking from the door to the keypad does not shorten anything.
- If nobody disarms before the countdown ends, the alarm fires:
Alarm,SirenandNotifyall go to 1. Disarmduring the countdown cancels it entirely.
9.Panic and disarming
Panic
Panic raises the alarm at once — siren and notify — whether the system is armed or disarmed, with no entry delay and no conditions. It is the one input that works in every state.
Disarming
Disarm does everything at once: it sets the system to disarmed, clears a sounding alarm, drops the siren and notify outputs, and cancels any running entry or exit delay. It is the only way to stop an alarm.
10.Driving it from the panel
The customer's buttons reach the block without any wiring on the canvas.
Arm away, arm stay, disarm and panic pressed on the wall panel or in the app are routed straight into the matching pins of every alarm block bound to that device. You do not wire the panel to the block — picking the device on the block is enough.
- The panel shows the countdown while arming — "Armed in 30 s" — and during an entry delay, because the block publishes its configured delays to the interface.
- The same commands can come from a scene, so "Leaving home" can arm the house as well as switching the lights off.
- Arming is also exposed to Apple Home and Google Home when the device is shared with them, with a PIN required to disarm by voice.
11.Programming example
A house with three interior detectors, five contacts, a siren and a notification.
- Add the block and pick the alarm device.
- Add three motion points and five window/door points, then wire each sensor to its pin.
- Set Exit delay to 45 — long enough to reach the car — and Entry delay to 20 for the front door.
- Wire
Sirento the siren device andNotifyto a Notification block with a message naming the house. - Optionally wire
Alarminto a Lighting Controller'sAlarminput so the lights flash as well. - Turn Rem on, then Deploy.
- Test properly: arm stay and walk past an interior detector — nothing should happen. Arm away and do the same — the alarm should fire after the entry delay. Then test disarming during the countdown.
12.Not available in this version
Other systems' alarm blocks have these; ours does not, and some matter when quoting a job.
- Two stages, not six. The siren and the notification can each be delayed independently, which covers most staged escalation, but there is no separate silent / audible / visual / internal / external / remote level. Further stages can be built with Delayed on/off blocks after the outputs.
- No cause or time of alarm outputs, no count of active sensors, no remaining-time output, and no text listing which window was left open.
- No acknowledge without disarming, no alarm test mode, no "arm with a contact open" option, and no disable-buttons input.
- Two sensor categories. Motion and contacts — there is no separate glass-break or generic category, though a glass-break detector works perfectly well on a
Winpin. - No two-sensor confirmation window — a single detector triggers the alarm.