NSPanel Documentation โ—† Icon overview GitHub Deutsch

Alarm and unlock page โ€“ configuration in the admin

An alarm page turns the panel into the control unit of an alarm system: four buttons to arm, four to disarm, a PIN pad and three states through which a real system is connected. The same card also serves as an unlock page โ€” then it only asks for the PIN and jumps on to another page afterwards.

It is created in the tab PageConfig, page type Alarm. A configuration script is not needed for this โ€” and not possible either: the adapter explicitly skips a page with the card type cardAlarm or cardUnlock from a script configuration and logs is only supported in the admin configuration! Skipped!. So for this card type there is exactly one way.

Contents:

1. Creating the page

  1. Open the instance settings โ†’ tab PageConfig.
  2. On the left pick the page type Alarm, enter a name in the field New Page, press +.
  3. The page appears in the list Pages, the editor opens on the right.

The name is the Unique ID of the page โ€” other pages address it by that name in their navigation targets. The name is fixed once the page exists; why, is explained under PageConfig โ€“ Overview.

The new page brings along: the Headline equal to the page name, the PIN 0, the operating mode Alarm and the top button of both columns prefilled - Arm and Disarm (see section 2 and section 4).

Every field is greyed out while the instance is not running. The editor watches the alive state of the instance for that; with a stopped adapter nothing can be entered. The interface gives no explanation for this.

The link Documentation at the bottom of the left-hand column opens exactly this wiki page โ€” it is built from the card type.

2. Operating mode: alarm or unlock

Editor of the alarm page

Right below the ID sits Type with two choices:

Field Effect
Alarm The full alarm control: eight buttons, state machine, status states.
Unlock Only a PIN prompt and a jump to another page.

The unlock page is not a page type of its own โ€” it is created right here, out of an alarm page. That is why you will not find it in the list when creating a page.

The preset is Alarm. A new page is created as an alarm system, so the editor shows every field right away. For an unlock page one click on Unlock is enough; the button texts then disappear from the view but stay in the configuration.

Switching later only hides the fields of the other mode; values you entered stay in the configuration and are still taken into the page. Effective is only what belongs to the chosen mode โ€” the button texts and Approved with Alarm, the jump target with Unlock. One exception is the checkbox Shared status for all panels: it is visible in the mode Alarm only, but the adapter reads it in both modes (see section 7).

Headline

Headline is the header line on the panel. Creating the page fills in the page name.

โš ๏ธ An empty headline yields the word Unlock on the panel โ€” even on an alarm page and in every language. The adapter inserts this substitute value when building the page; the page name does not appear.

Headline and button texts also run through the translation table of the adapter: a text that happens to match a translation key is replaced โ€” on becomes "on", off becomes "off", Start becomes "Start", unlock becomes "unlock" in the panel language.

3. PIN

The field PIN accepts digits only; the eye icon shows them in clear text. The PIN applies to both modes: on the alarm page it protects every button, on the unlock page it is the whole point.

Four peculiarities worth knowing:

The PIN is stored in clear text in the adapter configuration (native.pageConfig[].pin). Anyone with read access to the ioBroker objects can read it. The central credentials (Admin โ†’ System settings โ†’ Credentials) are not covered by this card โ€” unlike the WiFi password of a QR page, which can come from a credential since 1.5.0.

โš ๏ธ After a failed attempt the card locks โ€” and for ever longer. The waiting time doubles with every failed attempt (2 s, 4 s, 8 s โ€ฆ) and is not capped: after ten attempts more than 17 minutes, after sixteen more than 18 hours. The counter is only reset by the correct PIN or by restarting the adapter. While locked, the card shows "locked for" and the time in the second line, it flashes, carries a red key-alert-outline and the pad stays dead. The time does not count down โ€” it is one single message and stays unchanged until the lock expires.

4. The buttons of the alarm page

Two columns with four fields each. What you enter is the text of the button; which action it triggers is fixed. An empty field means: that button does not exist. So you can also offer just one variant.

Field Effect
Column Armed, four fields Appears in state disarmed. A press reports A1โ€ฆA4 and arms the system (four variants, e.g. "at home" and "away"). The top field is mandatory.
Column Disarmed, four fields Appears in state armed. A press reports D1โ€ฆD4 and disarms the system. The top field is mandatory.

Editor in the Alarm mode with both button columns

And this is how the page looks on the panel โ€“ a freshly created alarm page starts in the state armed, so the buttons of the column Disarmed are shown:

The alarm page on the panel in the state armed

The four fields of both columns carry the same labels in the interface โ€” Top button, 2. Button, 3. Button, Bottom button, with the placeholders 1. Button text to 4. Button text. There are no separate texts for "5. Button" to "8. Button"; the columns are told apart by their heading only.

The headings read like a state, but they name the action: the column Armed holds the buttons that arm โ€” so they are visible while the system is off. The German version says Aktivieren / Deaktivieren ("arm" / "disarm") at this point; the same thing is meant.

The top button of both columns is mandatory. Without it the card would be left without any button in one of its two states - and that state could only be left through the state .status. That is why Arm and Disarm sit in those two fields from the start; clear one and the editor turns it red, names the reason and blocks saving until a text is back in it. The other six fields are free. The operating mode Unlock has no mandatory fields - its single built-in button is enough.

Every field is taken over on its own: a text in the column Disarmed needs no partner in the same row of the column Armed.

A new alarm page starts in the state armed, not disarmed. So it shows the column Disarmed first - with the prefilled button Disarm it can be operated right away.

Icons and colors of the card are fixed and not adjustable; there is no icon field for this card type.

5. States and what the card shows

The card knows five states. The current one is held by the state .status, through which an external system can also dictate the state.

State What the card shows Pad
disarmed the buttons of the column Armed, icon shield-off in green free
armed the buttons of the column Disarmed, icon shield-home in red free
arming a text button with the state name, shield in amber, the card flashes locked
pending the same with shield-off โ€” the way back locked
triggered a text button, bell bell-ring in red, the card flashes visible, but without function

On the panel the states appear as short forms in the language of the adapter โ€” in English "Armed" (armed), "Arming" (arming), "Disarm" (disarmed), "Pend" (pending), "Trig" (triggered) and "Locked" (locked).

6. Approved: confirmation from outside

With the checkbox Approved the switching does not go through right away but via an intermediate state: a press in the column Armed puts the card into arming, writes the event into .mode and waits for a confirmation from outside. The way back works the same through pending.

Somebody writes into .approve Effect
true arming โ†’ armed, pending โ†’ disarmed โ€” the switching holds.
false arming โ†’ disarmed, pending โ†’ armed โ€” the switching is taken back.

This is meant for a real system that should report for itself that it is genuinely armed (after checking the door contacts, say). Without the checkbox the card switches directly, without an intermediate state.

Points to note:

7. One state for several panels

The checkbox is labelled Shared status for all panels; the hint below it names where the states live. It is not a minor setting though, so here is what it does:

The checkbox moves the status states of the page from panels.<panel>.alarm.<page> to alarm.<page> and thereby keeps the state the same across all panels: if one panel switches the system, the adapter pulls all other alarm pages of the same name along. Whoever shows the same alarm page on several panels wants that โ€” otherwise the system is armed on one panel and not on the other.

Points to note:

8. The unlock page and its target

Unlock mode with the field for the target page

In the operating mode Unlock all buttons fall away. The card shows a lock (lock-remove), a pad and the label "unlock". After the correct PIN it jumps to the configured target.

The select box below it carries the hint Optional: NSPanel page to open on unlock โ€” must be the page's uniqueName.

Field Effect
Select list All pages the adapter knows โ€” across all panels, without the internal system pages (///โ€ฆ) and without the page itself. A name already stored that the adapter does not (any longer) know stays visible as an additional entry.
left empty After the correct PIN nothing visible happens.

The unlock page is useful as a gate page: you set it as the navigation target in front of a page not everyone should operate, and enter the actual page as its jump target.

9. The states the adapter creates

For every alarm page the adapter creates states under panels.<panel>.alarm.<pagename> (or under alarm.<pagename>, see section 7):

State Type Meaning
.status number, writable The state, with the plain text list disarmed (0), armed (1), arming (2), pending (3), triggered (4). Writable from outside โ€” this is how an external system reports its state to the panel, and how you get out of a stuck state. Values above 4 set disarmed.
.mode text, read-only The last button event (A1โ€ฆA4 when arming, D1โ€ฆD4 when disarming). This is the connector for your own alarm system: a script listens here and switches the system accordingly. Present in the operating mode Alarm only.
.approve boolean, writable The confirmation for Approved; set to false on start-up.

Connecting a real system runs through these states exclusively โ€” no states or alias roles are entered in the editor, and none are evaluated. Writing always has to be done unacknowledged (ack = false); acknowledged values trigger nothing.

In the object view the three states currently carry their raw names StateObjects.alarmstatus, StateObjects.alarmmode and StateObjects.approve โ€” these translations are missing in the adapter as well.

10. Panel assignment and navigation

Panel, navigation targets, Start page (main), Hidden and Screensaver behavior are in the right-hand column Navigation/Panel, described under PageConfig โ€“ Overview and page details.

Pitfalls


Source of this page: doc/en/cardAlarm.md ยท Project on GitHub

  Back to top