node-red-contrib-alarm-ultimate 0.1.1 → 0.1.2
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/README.md +11 -0
- package/examples/README.md +13 -0
- package/examples/alarm-ultimate-basic.json +0 -1
- package/examples/alarm-ultimate-dashboard-controls.json +3 -2
- package/examples/alarm-ultimate-dashboard-v2.json +762 -0
- package/examples/alarm-ultimate-dashboard.json +3 -3
- package/flowfuse-node-red-dashboard-1.30.2.tgz +0 -0
- package/nodes/AlarmSystemUltimate.html +171 -82
- package/nodes/AlarmSystemUltimate.js +39 -8
- package/nodes/AlarmUltimateInputAdapter.html +304 -0
- package/nodes/AlarmUltimateInputAdapter.js +188 -0
- package/nodes/AlarmUltimateZone.html +2 -2
- package/nodes/AlarmUltimateZone.js +6 -3
- package/nodes/presets/input-adapter/ax-pro-hikvision-ultimate.js +34 -0
- package/nodes/presets/input-adapter/boolean-from-payload.js +10 -0
- package/nodes/presets/input-adapter/ha-on-off.js +24 -0
- package/nodes/presets/input-adapter/knx-ultimate.js +29 -0
- package/nodes/presets/input-adapter/passthrough.js +7 -0
- package/package.json +4 -3
- package/test/alarm-system.spec.js +51 -0
- package/test/input-adapter.spec.js +243 -0
- package/test/output-nodes.spec.js +3 -0
- package/tools/alarm-json-mapper.html +934 -165
- package/tools/alarm-panel.html +630 -131
package/README.md
CHANGED
|
@@ -16,6 +16,7 @@ Alarm System Ultimate nodes + web panel for Node-RED.
|
|
|
16
16
|
Includes:
|
|
17
17
|
|
|
18
18
|
- `AlarmSystemUltimate` (BETA): full alarm control panel node (zones, entry/exit delays, bypass, chime, 24h/fire/tamper, siren, event log).
|
|
19
|
+
- `AlarmUltimateInputAdapter`: translates incoming messages into zone messages for `AlarmSystemUltimate` using built-in or user-defined presets.
|
|
19
20
|
- Output-only helper nodes: `AlarmUltimateState`, `AlarmUltimateZone`, `AlarmUltimateSiren`.
|
|
20
21
|
- Web tools: Zones JSON mapper + web Alarm Panel (embeddable in Node-RED Dashboard).
|
|
21
22
|
|
|
@@ -73,6 +74,13 @@ These nodes have no input and emit the current Alarm state (and changes) for one
|
|
|
73
74
|
- `Alarm Zone` (`AlarmUltimateZone`): `msg.payload = true|false` for a selected zone
|
|
74
75
|
- `Alarm Siren` (`AlarmUltimateSiren`): `msg.payload = true|false` when the siren is on/off
|
|
75
76
|
|
|
77
|
+
### Input Adapter
|
|
78
|
+
|
|
79
|
+
`AlarmUltimateInputAdapter` translates incoming messages (from arbitrary sources) into the format expected by the Alarm zones.
|
|
80
|
+
|
|
81
|
+
- Built-in presets are shipped with the package.
|
|
82
|
+
- A single user preset (custom JavaScript) can be created/edited inside the node and is stored in the node configuration.
|
|
83
|
+
|
|
76
84
|
## Web tools
|
|
77
85
|
|
|
78
86
|
These pages are served via the Node-RED admin HTTP endpoint:
|
|
@@ -95,6 +103,7 @@ The Zones JSON Mapper supports:
|
|
|
95
103
|
- `examples/alarm-ultimate-basic.json`: ready-to-import flow with `AlarmSystemUltimate`, injects and debug nodes.
|
|
96
104
|
- `examples/alarm-ultimate-dashboard.json`: Node-RED Dashboard example embedding the Alarm Panel in a `ui_template` iframe.
|
|
97
105
|
- `examples/alarm-ultimate-dashboard-controls.json`: Node-RED Dashboard example with the embedded panel plus command buttons (and a small sensor simulator).
|
|
106
|
+
- `examples/alarm-ultimate-dashboard-v2.json`: Dashboard 2.0 example for `@flowfuse/node-red-dashboard` (Alarm Panel + basic controls + status).
|
|
98
107
|
|
|
99
108
|
See `examples/README.md`.
|
|
100
109
|
|
|
@@ -112,11 +121,13 @@ When Node-RED authentication is enabled, the admin endpoints use these permissio
|
|
|
112
121
|
|
|
113
122
|
- `AlarmSystemUltimate.read`
|
|
114
123
|
- `AlarmSystemUltimate.write`
|
|
124
|
+
- `AlarmUltimateInputAdapter.read`
|
|
115
125
|
|
|
116
126
|
HTTP admin endpoints:
|
|
117
127
|
|
|
118
128
|
- `GET /alarm-ultimate/alarm/nodes`
|
|
119
129
|
- `GET /alarm-ultimate/alarm/:id/state`
|
|
130
|
+
- `GET /alarm-ultimate/input-adapter/presets`
|
|
120
131
|
- `POST /alarm-ultimate/alarm/:id/command`
|
|
121
132
|
- `GET /alarm-ultimate/alarm-json-mapper`
|
|
122
133
|
- `GET /alarm-ultimate/alarm-panel`
|
package/examples/README.md
CHANGED
|
@@ -12,6 +12,11 @@ This flow includes:
|
|
|
12
12
|
- Inject nodes for arm/disarm, bypass, sensor open/close
|
|
13
13
|
- Output-only nodes (`Alarm State`, `Alarm Zone`, `Alarm Siren`) connected to debug
|
|
14
14
|
|
|
15
|
+
Notes:
|
|
16
|
+
|
|
17
|
+
- The old Alarm “Translator” option has been removed. If you need to translate incoming device messages, use the `AlarmUltimateInputAdapter` node.
|
|
18
|
+
- Zones can be edited from the Alarm node editor via the “Manage zones” button (opens the `alarm-json-mapper` tool).
|
|
19
|
+
|
|
15
20
|
## Dashboard (node-red-dashboard)
|
|
16
21
|
|
|
17
22
|
Import `examples/alarm-ultimate-dashboard.json`.
|
|
@@ -27,3 +32,11 @@ Import `examples/alarm-ultimate-dashboard-controls.json`.
|
|
|
27
32
|
- Includes the panel (iframe) + Dashboard buttons for `arm`, `disarm`, `status`, `list_open_zones`, `siren_on/off`, `panic`.
|
|
28
33
|
- Also includes a small “sensor simulator” (buttons that send `true/false` on `sensor/frontdoor` and `sensor/living_pir`).
|
|
29
34
|
- The iframe uses a *relative* URL (`alarm-ultimate/...`) so it works even when Node-RED is served under a path prefix (e.g. Home Assistant Ingress).
|
|
35
|
+
|
|
36
|
+
## Dashboard V2 (FlowFuse / @flowfuse/node-red-dashboard)
|
|
37
|
+
|
|
38
|
+
Import `examples/alarm-ultimate-dashboard-v2.json`.
|
|
39
|
+
|
|
40
|
+
- Requires `@flowfuse/node-red-dashboard` installed (`ui-*` nodes).
|
|
41
|
+
- Embeds the Alarm Panel via a Dashboard 2.0 `ui-template` (Vue SFC) iframe.
|
|
42
|
+
- Includes basic command buttons (`arm`, `disarm`, `status`), a small sensor simulator, and two status widgets (`AlarmUltimateState`, `AlarmUltimateSiren` → `ui-text`).
|
|
@@ -64,7 +64,6 @@
|
|
|
64
64
|
"name": "Home Alarm",
|
|
65
65
|
"controlTopic": "alarm",
|
|
66
66
|
"payloadPropName": "payload",
|
|
67
|
-
"translatorConfig": "",
|
|
68
67
|
"persistState": true,
|
|
69
68
|
"requireCodeForArm": false,
|
|
70
69
|
"requireCodeForDisarm": false,
|
|
@@ -121,7 +120,9 @@
|
|
|
121
120
|
"fwdInMessages": false,
|
|
122
121
|
"resendOnRefresh": true,
|
|
123
122
|
"templateScope": "local",
|
|
124
|
-
"className": ""
|
|
123
|
+
"className": "",
|
|
124
|
+
"x": 520,
|
|
125
|
+
"y": 180
|
|
125
126
|
},
|
|
126
127
|
{
|
|
127
128
|
"id": "c44ac2b6af1a1e20",
|