node-red-contrib-alarm-ultimate 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.MD +32 -20
- package/README.md +21 -16
- package/nodes/AlarmSystemUltimate.html +26 -25
- package/nodes/AlarmSystemUltimate.js +24 -0
- package/nodes/AlarmUltimateSiren.html +2 -2
- package/nodes/AlarmUltimateState.html +3 -3
- package/nodes/AlarmUltimateZone.html +3 -3
- package/package.json +7 -4
- package/tools/alarm-json-mapper.html +284 -748
- package/tools/alarm-panel.html +230 -514
- package/tools/alarm-settings.html +386 -0
- package/tools/assets/alarm-tools-pages.css +619 -0
- package/tools/assets/alarm-vue-shell.css +425 -0
- package/tools/assets/alarm-vue-shell.js +94 -0
- package/tools/assets/vue.global.prod.js +13 -0
package/CHANGELOG.MD
CHANGED
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
3
|
> Stable release track from `0.3.0`.
|
|
4
|
-
> Previous
|
|
4
|
+
> Previous pre-release history is preserved below.
|
|
5
|
+
|
|
6
|
+
## [1.0.1] - 2026-04-07
|
|
7
|
+
|
|
8
|
+
### Changed
|
|
9
|
+
|
|
10
|
+
- **Tools UI (Vue shell):** aligned all pages in `tools/` to the KNX AI visual style (layout, colors, typography, shared CSS shell).
|
|
11
|
+
- **Navigation:** renamed sections to **Control Panel**, **Zones**, and **Settings** with SVG icons and improved selected-menu highlighting.
|
|
12
|
+
- **Zones page:** reorganized import flow by moving the full **Import Wizard** into its own dedicated box (now positioned above the zones list).
|
|
13
|
+
- **Settings page:** moved JSON import/export actions from Zones to Settings and renamed actions to **Export Zones** / **Import Zones**.
|
|
14
|
+
- **Control Panel page:** removed redundant helper texts in the Node box and improved node-selection button readability.
|
|
15
|
+
- **Zones supervision timeout:** default timeout is now `120` seconds and empty timeout fields no longer trigger validation errors.
|
|
16
|
+
- **Packaging:** added `prepublishOnly` hook to automatically run `build:vue-tools` before publishing.
|
|
5
17
|
|
|
6
18
|
## [0.3.0] - 2026-02-18
|
|
7
19
|
|
|
8
20
|
### Release
|
|
9
21
|
|
|
10
|
-
- First stable release of `node-red-contrib-alarm-ultimate` (from `0.3.0-
|
|
22
|
+
- First stable release of `node-red-contrib-alarm-ultimate` (from `0.3.0-pre-release.7`).
|
|
11
23
|
|
|
12
24
|
### Fixed
|
|
13
25
|
|
|
@@ -18,9 +30,9 @@
|
|
|
18
30
|
|
|
19
31
|
- **Packaging:** added explicit npm publish allowlist (`package.json` `files`) to avoid accidental inclusion of unwanted files.
|
|
20
32
|
|
|
21
|
-
## [0.3.0-
|
|
33
|
+
## [0.3.0-pre-release.7] - 2026-02-08
|
|
22
34
|
|
|
23
|
-
### Breaking (
|
|
35
|
+
### Breaking (pre-release)
|
|
24
36
|
|
|
25
37
|
- **Alarm outputs (Open zones):** removed **Open zones (on request)** output + `list_open_zones` / request-topic behavior. Open zones listing while arming and cyclic listing are now always-on outputs (configurable intervals). Total outputs: **9**.
|
|
26
38
|
- **Alarm Zone / Alarm State (outputs):** `msg.payload` is now always a boolean (`true|false`). All extra fields are emitted as root properties on `msg`.
|
|
@@ -34,9 +46,9 @@
|
|
|
34
46
|
- **Alarm System:** output label renamed to **Any zone open (bool)** and help now documents each output pin.
|
|
35
47
|
- **Examples/Docs/Tests:** updated for new pins and helper node payload shape.
|
|
36
48
|
|
|
37
|
-
## [0.3.0-
|
|
49
|
+
## [0.3.0-pre-release.6] - 2026-02-07
|
|
38
50
|
|
|
39
|
-
### Breaking (
|
|
51
|
+
### Breaking (pre-release)
|
|
40
52
|
|
|
41
53
|
- **Alarm Zone:** `AlarmUltimateZone` is now output-only (removed Input mode and all adapters).
|
|
42
54
|
- **Alarm System:** moved zone input adapters into the Alarm node (**Zones → Zone input adapter** + **AX Pro match**).
|
|
@@ -49,9 +61,9 @@
|
|
|
49
61
|
|
|
50
62
|
- **Tests:** expanded unit test coverage for core Alarm behaviors (arming violations, topic prefix matching, code denial, persistence fallback).
|
|
51
63
|
|
|
52
|
-
## [0.3.0-
|
|
64
|
+
## [0.3.0-pre-release.5] - 2026-02-07
|
|
53
65
|
|
|
54
|
-
### Breaking (
|
|
66
|
+
### Breaking (pre-release)
|
|
55
67
|
|
|
56
68
|
- **Alarm System:** removed `blockArmOnViolations`. Arming is now always blocked by violations (open zones, or supervised zones that are **MISSING** when `supervision.blockArm: true`).
|
|
57
69
|
|
|
@@ -65,7 +77,7 @@
|
|
|
65
77
|
- **Tools:** moved **Export JSON** / **Import JSON** from the node edit dialog to `/alarm-ultimate/alarm-json-mapper`.
|
|
66
78
|
- **Tools / Runtime:** `supervision.blockArm` now treats false-like values (e.g. `"false"`, `0`) as `false`.
|
|
67
79
|
|
|
68
|
-
## [0.3.0-
|
|
80
|
+
## [0.3.0-pre-release.4] - 2026-02-06
|
|
69
81
|
|
|
70
82
|
### Changed
|
|
71
83
|
|
|
@@ -73,7 +85,7 @@
|
|
|
73
85
|
- **UI:** `AlarmUltimateZone` now allows selecting the **Ax Pro** adapter also in **Output** mode.
|
|
74
86
|
- **Docs:** refreshed node help and README for coherence (HomeKit input notes, Ax Pro mapping notes, "click Done" reminder).
|
|
75
87
|
|
|
76
|
-
## [0.3.0-
|
|
88
|
+
## [0.3.0-pre-release.3] - 2026-02-06
|
|
77
89
|
|
|
78
90
|
### Changed
|
|
79
91
|
|
|
@@ -85,7 +97,7 @@
|
|
|
85
97
|
- **Tools (Zones JSON Mapper):** improved visibility of the "click Done in Node-RED editor to apply" reminder.
|
|
86
98
|
- **UI:** clarified AX Pro matching help text in `AlarmUltimateZone`.
|
|
87
99
|
|
|
88
|
-
## [0.3.0-
|
|
100
|
+
## [0.3.0-pre-release.2] - 2026-02-04
|
|
89
101
|
|
|
90
102
|
### Changed
|
|
91
103
|
|
|
@@ -94,9 +106,9 @@
|
|
|
94
106
|
- **Tools:** Zones JSON Mapper now accepts **JSON array only** (aligned with `AlarmSystemUltimate.zones`).
|
|
95
107
|
- **UI:** refined AX Pro “match” option labels in `AlarmUltimateZone`.
|
|
96
108
|
|
|
97
|
-
## [0.3.0-
|
|
109
|
+
## [0.3.0-pre-release.1] - 2026-02-04
|
|
98
110
|
|
|
99
|
-
### Breaking (
|
|
111
|
+
### Breaking (pre-release)
|
|
100
112
|
|
|
101
113
|
- **Zones identifier:** removed the `id`/`zoneId` field from zones. Zones are identified only by `topic`.
|
|
102
114
|
- **Zones format:** `AlarmSystemUltimate.zones` now accepts **JSON array only** (no single-object, no JSON-per-line).
|
|
@@ -113,9 +125,9 @@
|
|
|
113
125
|
- **Alarm State (Input + AX Pro):** added support for AX Pro `CIDEvent.code` to inject arm/disarm (`3401` Away, `3441` Stay, `1401` Disarmed).
|
|
114
126
|
- **Tools:** Alarm JSON Mapper and Alarm Panel updated to reflect topic-only zones and the simplified zones format.
|
|
115
127
|
|
|
116
|
-
## [0.3.0-
|
|
128
|
+
## [0.3.0-pre-release.0] - 2026-02-04
|
|
117
129
|
|
|
118
|
-
### Breaking (
|
|
130
|
+
### Breaking (pre-release)
|
|
119
131
|
|
|
120
132
|
- **Removed adapter nodes:** `AlarmUltimateInputAdapter` and `AlarmUltimateOutputAdapter` have been removed.
|
|
121
133
|
- **Alarm State / Alarm Zone I/O mode:** `AlarmUltimateState` and `AlarmUltimateZone` can now be configured as **Input** (flow → selected alarm) or **Output** (selected alarm → flow).
|
|
@@ -131,9 +143,9 @@
|
|
|
131
143
|
- Replace any `AlarmUltimateOutputAdapter` nodes with:
|
|
132
144
|
- `AlarmUltimateState` / `AlarmUltimateZone` → **Mode: Output**, pick an **Adapter**, wire their output to your integrations.
|
|
133
145
|
|
|
134
|
-
## [0.2.0-
|
|
146
|
+
## [0.2.0-pre-release.0] - 2026-02-03
|
|
135
147
|
|
|
136
|
-
### Breaking (
|
|
148
|
+
### Breaking (pre-release)
|
|
137
149
|
|
|
138
150
|
- **Canonical envelope:** all nodes now emit `msg.alarmUltimate` (versioned) as the stable, canonical representation of alarm messages.
|
|
139
151
|
- **Output-only helper nodes:** `Alarm State`, `Alarm Zone`, `Alarm Siren` now emit the same “default telegrams” as `AlarmSystemUltimate`:
|
|
@@ -155,7 +167,7 @@
|
|
|
155
167
|
|
|
156
168
|
## [0.1.17] - 2026-02-02
|
|
157
169
|
|
|
158
|
-
### Breaking (
|
|
170
|
+
### Breaking (pre-release)
|
|
159
171
|
|
|
160
172
|
- **Output Adapter (Homekit Alarm Status):** on `arming` the node keeps `SecuritySystemCurrentState` at the previous value (while updating `SecuritySystemTargetState`). If you relied on both being the same during arming, update your downstream flows.
|
|
161
173
|
|
|
@@ -197,7 +209,7 @@
|
|
|
197
209
|
|
|
198
210
|
## [Unreleased]
|
|
199
211
|
|
|
200
|
-
### Breaking (
|
|
212
|
+
### Breaking (pre-release)
|
|
201
213
|
|
|
202
214
|
- TBD.
|
|
203
215
|
|
|
@@ -215,7 +227,7 @@
|
|
|
215
227
|
|
|
216
228
|
## [0.1.9] - 2026-02-02
|
|
217
229
|
|
|
218
|
-
### Breaking (
|
|
230
|
+
### Breaking (pre-release)
|
|
219
231
|
|
|
220
232
|
- **Alarm node:** removed classic multi-output mode; `AlarmSystemUltimate` now has a single output only.
|
|
221
233
|
|
package/README.md
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
[![Node-RED Flows][flows-image]][flows-url]
|
|
8
8
|
[![License][license-image]][license-url]
|
|
9
9
|
[![GitHub issues][issues-image]][issues-url]
|
|
10
|
-
[![Status: beta][beta-image]][repo-url]
|
|
11
10
|
|
|
12
11
|
# node-red-contrib-alarm-ultimate
|
|
13
12
|
|
|
@@ -23,14 +22,14 @@ Alarm System Ultimate nodes + web panel for Node-RED.
|
|
|
23
22
|
|
|
24
23
|
Includes:
|
|
25
24
|
|
|
26
|
-
- `AlarmSystemUltimate
|
|
25
|
+
- `AlarmSystemUltimate`: main alarm node with panel-style behavior (zones, entry/exit delays, bypass, chime, 24h/fire/tamper, siren, event log, optional per-zone sensor supervision).
|
|
27
26
|
- Helper nodes: `AlarmUltimateState`, `AlarmUltimateZone`, `AlarmUltimateSiren`.
|
|
28
|
-
- `AlarmUltimateState`:
|
|
27
|
+
- `AlarmUltimateState`: input/output helper for arm/disarm and state integration (Default / Homekit / Ax Pro / KNX-Ultimate).
|
|
29
28
|
- `AlarmUltimateZone`: output-only zone events splitter (no adapters).
|
|
30
29
|
- `AlarmUltimateSiren`: output-only siren state splitter.
|
|
31
30
|
- Web tools: Zones JSON mapper + web Alarm Panel (embeddable in Node-RED Dashboard).
|
|
32
31
|
|
|
33
|
-
|
|
32
|
+
`AlarmSystemUltimate` is now stable.
|
|
34
33
|
|
|
35
34
|
## Table of contents
|
|
36
35
|
|
|
@@ -40,8 +39,8 @@ Note: `AlarmSystemUltimate` is currently **BETA**.
|
|
|
40
39
|
- [Nodes](#nodes)
|
|
41
40
|
- [Web tools](#web-tools)
|
|
42
41
|
- [Examples](#examples)
|
|
43
|
-
- [
|
|
44
|
-
- [
|
|
42
|
+
- [Advanced integration reference (optional)](#advanced-integration-reference-optional)
|
|
43
|
+
- [Contributing (optional)](#contributing-optional)
|
|
45
44
|
|
|
46
45
|
## Install
|
|
47
46
|
|
|
@@ -56,8 +55,8 @@ npm i node-red-contrib-alarm-ultimate
|
|
|
56
55
|
|
|
57
56
|
Beginner-friendly flow:
|
|
58
57
|
|
|
59
|
-
1. Add an **AlarmSystemUltimate
|
|
60
|
-
2. Click **Manage zones** and add at least one zone (example topic: `sensor/frontdoor`).
|
|
58
|
+
1. Add an **AlarmSystemUltimate** node.
|
|
59
|
+
2. Click **Manage zones** and add at least one zone (example topic: `sensor/frontdoor`). For backup/restore use **Export Zones** / **Import Zones** in the **Settings** page.
|
|
61
60
|
**Important:** after editing zones, click **Done** in the Node-RED editor to save (if you click **Cancel**, changes are lost).
|
|
62
61
|
3. Send sensor messages to the Alarm node:
|
|
63
62
|
- open: `msg.topic="sensor/frontdoor"`, `msg.payload=true`
|
|
@@ -91,7 +90,7 @@ Optional (recommended):
|
|
|
91
90
|
|
|
92
91
|
## Nodes
|
|
93
92
|
|
|
94
|
-
### Alarm System Ultimate
|
|
93
|
+
### Alarm System Ultimate
|
|
95
94
|
|
|
96
95
|
Main node that:
|
|
97
96
|
|
|
@@ -152,7 +151,9 @@ Example zone:
|
|
|
152
151
|
- `Alarm Zone` (`AlarmUltimateZone`): emits `zone_open` / `zone_close` as `.../event` telegrams
|
|
153
152
|
- `Alarm Siren` (`AlarmUltimateSiren`): emits siren telegrams (`msg.topic = <controlTopic>/siren`, `msg.event = siren_on|siren_off`, `msg.payload = true|false`)
|
|
154
153
|
|
|
155
|
-
###
|
|
154
|
+
### Advanced integration (optional): `msg.alarmUltimate`
|
|
155
|
+
|
|
156
|
+
If you are just wiring nodes in Node-RED, you can safely skip this section.
|
|
156
157
|
|
|
157
158
|
All nodes in this package add a stable, versioned object to every output message:
|
|
158
159
|
|
|
@@ -168,11 +169,11 @@ msg.alarmUltimate = {
|
|
|
168
169
|
};
|
|
169
170
|
```
|
|
170
171
|
|
|
171
|
-
|
|
172
|
+
Adapters and advanced integrations can use `msg.alarmUltimate` as a consistent source of alarm details.
|
|
172
173
|
|
|
173
174
|
## Web tools
|
|
174
175
|
|
|
175
|
-
These pages are
|
|
176
|
+
These web pages are available from your Node-RED editor at:
|
|
176
177
|
|
|
177
178
|
- Zones JSON Mapper: `/alarm-ultimate/alarm-json-mapper`
|
|
178
179
|
- Alarm Panel: `/alarm-ultimate/alarm-panel`
|
|
@@ -187,9 +188,12 @@ The Zones JSON Mapper supports:
|
|
|
187
188
|
|
|
188
189
|
- Sample message mapping (e.g. KNX Ultimate): map `topic`/`payload` fields and generate a zone template.
|
|
189
190
|
- ETS Group Addresses export (TSV): paste the exported table and generate zones in batch (boolean datapoints only).
|
|
190
|
-
- Backup/restore: **Export JSON** / **Import JSON** for zone definitions.
|
|
191
191
|
- Quality-of-life: bulk apply (Kind/Supervision), sorting, duplicate-topic skipping on import, persisted Step 1 input.
|
|
192
192
|
|
|
193
|
+
The Settings page supports:
|
|
194
|
+
|
|
195
|
+
- Backup/restore: **Export Zones** / **Import Zones** for zone definitions.
|
|
196
|
+
|
|
193
197
|
## Examples
|
|
194
198
|
|
|
195
199
|
- `examples/alarm-ultimate-basic.json`: ready-to-import flow with `AlarmSystemUltimate`, injects and debug nodes.
|
|
@@ -200,7 +204,7 @@ The Zones JSON Mapper supports:
|
|
|
200
204
|
|
|
201
205
|
See `examples/README.md`.
|
|
202
206
|
|
|
203
|
-
##
|
|
207
|
+
## Contributing (optional)
|
|
204
208
|
|
|
205
209
|
Run tests:
|
|
206
210
|
|
|
@@ -208,7 +212,9 @@ Run tests:
|
|
|
208
212
|
npm test
|
|
209
213
|
```
|
|
210
214
|
|
|
211
|
-
##
|
|
215
|
+
## Advanced integration reference (optional)
|
|
216
|
+
|
|
217
|
+
If you are using the package normally in flows, you can ignore this section.
|
|
212
218
|
|
|
213
219
|
When Node-RED authentication is enabled, the admin endpoints use these permissions (if available):
|
|
214
220
|
|
|
@@ -236,4 +242,3 @@ HTTP admin endpoints:
|
|
|
236
242
|
[flows-image]: https://img.shields.io/badge/Node--RED%20Flows-library-8f0000?logo=nodered&logoColor=white
|
|
237
243
|
[license-image]: https://img.shields.io/npm/l/node-red-contrib-alarm-ultimate.svg
|
|
238
244
|
[issues-image]: https://img.shields.io/github/issues/Supergiovane/node-red-contrib-alarm-ultimate.svg
|
|
239
|
-
[beta-image]: https://img.shields.io/badge/status-beta-orange.svg
|
|
@@ -748,7 +748,7 @@
|
|
|
748
748
|
## Quick start (5 minutes)
|
|
749
749
|
|
|
750
750
|
1. Add an **Alarm System** node to your flow.
|
|
751
|
-
2. Click **Manage zones** and create at least one zone (example topic: `sensor/frontdoor`).
|
|
751
|
+
2. Click **Manage zones** and create at least one zone (example topic: `sensor/frontdoor`). For backup/restore use **Export Zones** / **Import Zones** in the **Settings** web page.
|
|
752
752
|
**Important:** after editing zones, click **Done** in the Node-RED editor to save (if you click **Cancel**, changes are lost).
|
|
753
753
|
3. Send sensor messages to the Alarm node:
|
|
754
754
|
- open: `msg.topic="sensor/frontdoor"` + `msg.payload=true` (also works: `"open"`, `"on"`, `1`)
|
|
@@ -769,10 +769,11 @@
|
|
|
769
769
|
|
|
770
770
|
<br/>
|
|
771
771
|
|
|
772
|
-
###
|
|
772
|
+
### Editor and web pages
|
|
773
773
|
|
|
774
774
|
- **Panel**: `/alarm-ultimate/alarm-panel` (supports `?id=<alarmNodeId>` and `?embed=1&id=<alarmNodeId>`).
|
|
775
|
-
- **Zones**: use **Manage zones** to open `/alarm-ultimate/alarm-json-mapper` and sync
|
|
775
|
+
- **Zones**: use **Manage zones** to open `/alarm-ultimate/alarm-json-mapper` and sync zones back into the editor. Click **Done** in the Node-RED node editor to apply/save.
|
|
776
|
+
- **Settings**: open `/alarm-ultimate/alarm-settings` to **Export Zones** / **Import Zones**.
|
|
776
777
|
- **Name**: optional label shown in the Alarm Panel.
|
|
777
778
|
- **Control topic**: topic that receives commands (and is used as base for some outputs).
|
|
778
779
|
- **With Input**: message property evaluated as sensor value (default `payload`). It must be convertible to boolean (`true/false`, `open/closed`, `on/off`, `1/0`, ...).
|
|
@@ -800,11 +801,11 @@
|
|
|
800
801
|
| Emit restore events | Emits `zone_restore` when a zone returns to false. |
|
|
801
802
|
| Event log size | Max stored log entries in node context (0 disables log). |
|
|
802
803
|
| Sync other alarms | Optional: when this node is armed/disarmed, it can arm/disarm other Alarm nodes. The original `msg.code` is forwarded. |
|
|
803
|
-
| Zones | Zone definitions. Use **Manage zones**
|
|
804
|
+
| Zones | Zone definitions. Use **Manage zones** to edit them in the web page (including optional supervision). For backup/restore use **Settings** → **Export Zones / Import Zones**. |
|
|
804
805
|
|
|
805
806
|
<br/>
|
|
806
807
|
|
|
807
|
-
## Zones
|
|
808
|
+
## Zones (advanced, optional)
|
|
808
809
|
|
|
809
810
|
Each zone can optionally enable **sensor supervision** (per-zone): if no valid sensor updates are received within `timeoutSeconds`, the node emits `supervision_lost` (supervision starts immediately when the node runs, and `supervision_restored` is emitted on the next valid update).
|
|
810
811
|
|
|
@@ -827,11 +828,11 @@
|
|
|
827
828
|
|
|
828
829
|
<br/>
|
|
829
830
|
|
|
830
|
-
## Output
|
|
831
|
+
## Output reference
|
|
831
832
|
|
|
832
833
|
The node has **9 outputs** (pins).
|
|
833
834
|
|
|
834
|
-
Important: **Output #1 (All messages)**
|
|
835
|
+
Important: **Output #1 (All messages)** includes everything from the other outputs. It can emit:
|
|
835
836
|
|
|
836
837
|
- a single message, or
|
|
837
838
|
- an array of messages (for example, when the node emits an event **and** a siren update at the same time).
|
|
@@ -889,7 +890,7 @@
|
|
|
889
890
|
|
|
890
891
|
<br/>
|
|
891
892
|
|
|
892
|
-
##
|
|
893
|
+
## Event reference (`msg.event`, optional)
|
|
893
894
|
|
|
894
895
|
Arming / state:
|
|
895
896
|
|
|
@@ -921,7 +922,7 @@
|
|
|
921
922
|
|
|
922
923
|
<br/>
|
|
923
924
|
|
|
924
|
-
## Control
|
|
925
|
+
## Control message reference (`msg.topic === controlTopic`)
|
|
925
926
|
|
|
926
927
|
Arm:
|
|
927
928
|
|
|
@@ -937,11 +938,11 @@
|
|
|
937
938
|
|
|
938
939
|
- `msg.command = "status"` or `msg.status = true`
|
|
939
940
|
|
|
940
|
-
|
|
941
|
+
Bypass / unbypass (zone topic):
|
|
941
942
|
|
|
942
943
|
- `msg.command = "bypass"` / `msg.command = "unbypass"`
|
|
943
944
|
- or `msg.bypass = true` / `msg.unbypass = true`
|
|
944
|
-
|
|
945
|
+
- pass the zone **topic** in `msg.zoneTopic`
|
|
945
946
|
|
|
946
947
|
Siren:
|
|
947
948
|
|
|
@@ -963,18 +964,18 @@
|
|
|
963
964
|
|
|
964
965
|
<br/>
|
|
965
966
|
|
|
966
|
-
##
|
|
967
|
+
## Zone fields
|
|
967
968
|
|
|
968
|
-
|
|
969
|
+
Zones must be configured as a JSON array of objects.
|
|
969
970
|
|
|
970
|
-
|
|
971
|
+
Minimal fields:
|
|
971
972
|
|
|
972
|
-
|
|
973
|
+
- `topic` (exact topic, or a prefix ending with `*`)
|
|
973
974
|
|
|
974
|
-
|
|
975
|
+
Common fields:
|
|
975
976
|
|
|
976
|
-
|
|
977
|
-
|
|
977
|
+
- `topic`: **unique identifier** of the zone (used for bypass via `msg.zoneTopic`)
|
|
978
|
+
- `name`: label used in events (optional; defaults to `topic`)
|
|
978
979
|
- `type`: `perimeter` (default), `motion`, `tamper`, `fire`, `24h`
|
|
979
980
|
- `entry`: `true` to use entry delay, otherwise triggers instantly
|
|
980
981
|
- `entryDelaySeconds`: overrides the global entry delay
|
|
@@ -990,13 +991,13 @@
|
|
|
990
991
|
|
|
991
992
|
Example (formatted JSON array):
|
|
992
993
|
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
994
|
+
```json
|
|
995
|
+
[
|
|
996
|
+
{
|
|
997
|
+
"name": "Front door",
|
|
998
|
+
"topic": "house/door/front",
|
|
999
|
+
"type": "perimeter",
|
|
1000
|
+
"entry": true,
|
|
1000
1001
|
"entryDelaySeconds": 30,
|
|
1001
1002
|
"bypassable": true,
|
|
1002
1003
|
"chime": true
|
|
@@ -97,6 +97,22 @@ module.exports = function (RED) {
|
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
function sendToolAssetFile(res, filename) {
|
|
101
|
+
const assetsRoot = path.join(__dirname, '..', 'tools', 'assets');
|
|
102
|
+
const requested = String(filename || '').replace(/^\/+/, '');
|
|
103
|
+
const rootPath = path.resolve(assetsRoot);
|
|
104
|
+
const fullPath = path.resolve(rootPath, requested);
|
|
105
|
+
if (!fullPath.startsWith(rootPath + path.sep)) {
|
|
106
|
+
res.status(403).end();
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
res.sendFile(fullPath, (err) => {
|
|
110
|
+
if (err) {
|
|
111
|
+
res.status(err.statusCode || 404).end();
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
|
|
100
116
|
RED.httpAdmin.get('/alarm-ultimate/alarm-json-mapper', needsRead, (req, res) => {
|
|
101
117
|
sendToolFile(res, 'alarm-json-mapper.html');
|
|
102
118
|
});
|
|
@@ -105,6 +121,14 @@ module.exports = function (RED) {
|
|
|
105
121
|
sendToolFile(res, 'alarm-panel.html');
|
|
106
122
|
});
|
|
107
123
|
|
|
124
|
+
RED.httpAdmin.get('/alarm-ultimate/alarm-settings', needsRead, (req, res) => {
|
|
125
|
+
sendToolFile(res, 'alarm-settings.html');
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
RED.httpAdmin.get('/alarm-ultimate/alarm-tools/assets/:file', needsRead, (req, res) => {
|
|
129
|
+
sendToolAssetFile(res, req.params.file);
|
|
130
|
+
});
|
|
131
|
+
|
|
108
132
|
RED.httpAdmin.get('/alarm-ultimate/alarm/nodes', needsRead, (req, res) => {
|
|
109
133
|
const nodes = Array.from(alarmInstances.values()).map((api) => ({
|
|
110
134
|
id: api.id,
|
|
@@ -112,10 +112,10 @@ Output message (same format as the Alarm node siren output):
|
|
|
112
112
|
- `msg.event`: `siren_on` or `siren_off`
|
|
113
113
|
- `msg.payload`: `true` when the siren is on, otherwise `false`
|
|
114
114
|
- `msg.reason`: `manual|timeout|arm|disarm|...`
|
|
115
|
-
- `msg.alarmUltimate`:
|
|
115
|
+
- `msg.alarmUltimate`: optional standard object with extra alarm details
|
|
116
116
|
|
|
117
117
|
Notes:
|
|
118
118
|
|
|
119
|
-
- No
|
|
119
|
+
- No wire from the Alarm node is required: just select the Alarm node in this editor.
|
|
120
120
|
- Use the **Panel** button to open the Alarm Panel preselected on the chosen Alarm node.
|
|
121
121
|
</script>
|
|
@@ -166,11 +166,11 @@ Output message (same format as the Alarm node `.../event` output):
|
|
|
166
166
|
- `msg.payload`: `true|false` (armed/active boolean)
|
|
167
167
|
- `msg.mode`: `armed|disarmed`
|
|
168
168
|
- other event fields (reason, seconds, violations, ...) are emitted as **root properties** on `msg`
|
|
169
|
-
- `msg.alarmUltimate`:
|
|
169
|
+
- `msg.alarmUltimate`: optional standard object with extra alarm details
|
|
170
170
|
|
|
171
171
|
Notes:
|
|
172
172
|
|
|
173
|
-
- No
|
|
173
|
+
- No wire from the Alarm node is required: just select the Alarm node in this editor.
|
|
174
174
|
- Use the **Panel** button to open the Alarm Panel preselected on the chosen Alarm node.
|
|
175
175
|
|
|
176
176
|
## Input mode details
|
|
@@ -215,7 +215,7 @@ Only arming/disarming CID codes are handled (other CID events are ignored):
|
|
|
215
215
|
- `3441` → `arm` (Stay)
|
|
216
216
|
- `1401` → `disarm`
|
|
217
217
|
|
|
218
|
-
##
|
|
218
|
+
## Adapter output behavior
|
|
219
219
|
|
|
220
220
|
- **Default / Ax Pro**: keeps a boolean `msg.payload` and emits details as root properties.
|
|
221
221
|
- **Homekit**: emits `msg.SecuritySystemTargetState` and `msg.SecuritySystemCurrentState` as root properties (while keeping boolean `msg.payload`).
|
|
@@ -164,11 +164,11 @@ Output message (same format as the Alarm node `.../event` output):
|
|
|
164
164
|
- `msg.payload`: `true|false` (zone open boolean)
|
|
165
165
|
- `msg.mode`: `armed|disarmed`
|
|
166
166
|
- `msg.zone`, `msg.open`, `msg.bypassed`, `msg.reason` are emitted as **root properties**
|
|
167
|
-
- `msg.alarmUltimate`:
|
|
167
|
+
- `msg.alarmUltimate`: optional standard object with extra alarm details
|
|
168
168
|
|
|
169
169
|
Notes:
|
|
170
170
|
|
|
171
|
-
- The zone list is loaded from the selected Alarm node
|
|
172
|
-
- No
|
|
171
|
+
- The zone list is loaded automatically from the selected Alarm node.
|
|
172
|
+
- No wire from the Alarm node is required: just select the Alarm node in this editor.
|
|
173
173
|
- Use the **Panel** button to open the Alarm Panel preselected on the chosen Alarm node.
|
|
174
174
|
</script>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-alarm-ultimate",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Alarm System node for Node-RED. Integrates also with Home Assistant, MQTT, KNX-Ultimate. Completed with web interface for fast configuration and control. With zone import wizard.",
|
|
5
5
|
"author": "Massimo Saccani (https://github.com/Supergiovane)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,9 +34,12 @@
|
|
|
34
34
|
"chai": "^4.3.10",
|
|
35
35
|
"mocha": "^10.4.0",
|
|
36
36
|
"node-red": "^3.1.0",
|
|
37
|
-
"node-red-node-test-helper": "^0.3.5"
|
|
37
|
+
"node-red-node-test-helper": "^0.3.5",
|
|
38
|
+
"vue": "^3.5.30"
|
|
38
39
|
},
|
|
39
40
|
"scripts": {
|
|
40
|
-
"test": "mocha test/**/*.spec.js"
|
|
41
|
+
"test": "mocha test/**/*.spec.js",
|
|
42
|
+
"build:vue-tools": "node scripts/build-vue-tools.js",
|
|
43
|
+
"prepublishOnly": "npm run build:vue-tools"
|
|
41
44
|
}
|
|
42
|
-
}
|
|
45
|
+
}
|