@rfranzoi/scrypted-mqtt-securitysystem 1.0.9 → 1.0.10

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 CHANGED
@@ -1,47 +1,107 @@
1
1
  # Paradox MQTT SecuritySystem (Scrypted)
2
2
 
3
- Controlla e sincronizza un sistema Paradox via MQTT (PAI) esponendolo come **SecuritySystem** in Scrypted.
3
+ Expose and control a **Paradox** alarm via **MQTT (PAI/PAI-MQTT style)** as a Scrypted **SecuritySystem**.
4
4
 
5
- ## Installazione
6
- 1. `npm i`
7
- 2. `npm run build` → genera `dist/plugin.zip`
8
- 3. **Scrypted Manage Plugins Install from file** e carica `dist/plugin.zip`
9
- Oppure: `npm run deploy` (richiede `npx scrypted-cli login` una volta)
5
+ ---
6
+
7
+ ## Features
8
+ - Bidirectional sync: target & current state
9
+ - Custom MQTT topics (publish/subscribe)
10
+ - Tamper & online status support
11
+ - QoS / Retain options for outgoing messages
12
+ - Fully customizable outgoing payloads
13
+
14
+ ---
15
+
16
+ ## Requirements
17
+ - **Scrypted** (server up and running)
18
+ - An MQTT broker (e.g., Mosquitto)
19
+ - A Paradox ↔︎ MQTT bridge (e.g., **PAI**)
20
+
21
+ ---
22
+
23
+ ## Installation
24
+
25
+ ```bash
26
+ npm i
27
+ npm run build # → generates dist/plugin.zip
28
+ ```
29
+
30
+ - In Scrypted: **Manage Plugins → Install from file** and upload `dist/plugin.zip`
31
+ _Or_:
32
+ ```bash
33
+ npm run deploy # requires: npx scrypted-cli login (one time)
34
+ ```
35
+
36
+ ---
37
+
38
+ ## Configuration (Scrypted → your device → Settings)
10
39
 
11
- ## Configurazione (Settings)
12
40
  ### MQTT
13
- - **Broker URL** es. `mqtt://0.0.0.0:1883`
14
- - Username/Password (se necessari)
15
- - Client ID, TLS, Reject Unauthorized
41
+ - **Broker URL**: e.g. `mqtt://0.0.0.0:1883`
42
+ - **Username / Password** (if required)
43
+ - **Client ID**, **TLS**, **Reject Unauthorized**
16
44
 
17
45
  ### Topics
18
- - **Set Target State (publish)**: es. `SYSTEM/control/partitions/Area_1`
19
- - **Get Target State (subscribe)**: `SYSTEM/states/partitions/Area_1/target_state`
20
- - **Get Current State (subscribe)**: `SYSTEM/states/partitions/Area_1/current_state`
21
- - **Get Status Tampered (subscribe)**: `SYSTEM/states/system/troubles/zone_tamper_trouble`
22
- - **Get Online (subscribe)**: `SYSTEM/interface/availability`
46
+ | Purpose | Direction | Example Topic |
47
+ |----------------------------------|-----------|-----------------------------------------------------------|
48
+ | Set Target State | publish | `SYSTEM/control/partitions/Area_1` |
49
+ | Get Target State | subscribe | `SYSTEM/states/partitions/Area_1/target_state` |
50
+ | Get Current State | subscribe | `SYSTEM/states/partitions/Area_1/current_state` |
51
+ | Get Status Tampered | subscribe | `SYSTEM/states/system/troubles/zone_tamper_trouble` |
52
+ | Get Online | subscribe | `SYSTEM/interface/availability` |
23
53
 
24
54
  ### Publish Options
25
- - QoS / Retain
26
-
27
- ### Outgoing Payloads
28
- - Disarm: `disarm`
29
- - Home: `arm_home`
30
- - Away: `arm_away`
31
- - Night: `arm_night`
32
-
33
- ## Note sui payload
34
- - In ingresso, il plugin riconosce anche sinonimi (es. `disarmed`, `alarm`, `armed_home`, `entry_delay`, ecc.).
35
- - In uscita, puoi cambiare i payload per aderire al tuo PAI.
36
-
37
- ## Mappa consigliata per PAI (esempio)
38
- - **Set**: `SYSTEM/control/partitions/Area_1`
39
- - Disarm `disarm`
40
- - Home `arm_home`
41
- - Away `arm_away`
42
- - Night`arm_night`
43
- - **Get Target**: `SYSTEM/states/partitions/Area_1/target_state`
44
- - **Get Current**: `SYSTEM/states/partitions/Area_1/current_state`
45
- - **Tamper**: `SYSTEM/states/system/troubles/zone_tamper_trouble` (`true`/`false`)
46
- - **Online**: `SYSTEM/interface/availability` (`online`/`offline`)
55
+ - **QoS** (0/1/2)
56
+ - **Retain** (true/false)
57
+
58
+ ### Outgoing Payloads (customizable)
59
+ - **Disarm**: `disarm`
60
+ - **Home**: `arm_home`
61
+ - **Away**: `arm_away`
62
+ - **Night**: `arm_night`
63
+
64
+ ---
65
+
66
+ ## Payload Notes
67
+
68
+ **Incoming (subscribe):** the plugin also recognizes common synonyms, e.g.
69
+ - `disarmed`, `off`, `idle`, `ready` → **Disarmed**
70
+ - `armed_home`, `home`, `stay` → **Home**
71
+ - `armed_away`, `away`, `arming`, `exit_delay` → **Away**
72
+ - `armed_night`, `night` **Night**
73
+ - `alarm`, `triggered` → sets `triggered: true`
74
+ - Transitional states (e.g., `entry_delay`, `pending`) are ignored for mode changes.
75
+
76
+ **Outgoing (publish):** change payload strings in Settings to match your PAI mapping.
77
+
78
+ ---
79
+
80
+ ## Recommended PAI Mapping (example)
81
+
82
+ **Publish (Set):**
83
+ ```
84
+ SYSTEM/control/partitions/Area_1
85
+ Disarm -> disarm
86
+ Home -> arm_home
87
+ Away -> arm_away
88
+ Night -> arm_night
89
+ ```
90
+
91
+ **Subscribe (Get):**
92
+ ```
93
+ Target -> SYSTEM/states/partitions/Area_1/target_state
94
+ Current -> SYSTEM/states/partitions/Area_1/current_state
95
+ Tamper -> SYSTEM/states/system/troubles/zone_tamper_trouble (true/false)
96
+ Online -> SYSTEM/interface/availability (online/offline)
97
+ ```
98
+
99
+ ---
100
+
101
+ ## Tips
102
+
103
+ - If you use Scrypted’s **HomeKit** plugin to expose this device:
104
+ - Enable the **Security System** extension/mapping inside the HomeKit plugin.
105
+ - Ensure your Scrypted container runs with **host networking** so mDNS/Bonjour works (for pairing).
47
106
 
107
+ ---
package/dist/plugin.zip CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rfranzoi/scrypted-mqtt-securitysystem",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "Scrypted plugin: Paradox Security System via MQTT (PAI/PAI-MQTT style).",
5
5
  "license": "MIT",
6
6
  "main": "dist/main.nodejs.js",