@rfranzoi/scrypted-mqtt-securitysystem 1.0.23 → 1.0.24

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,107 +1,110 @@
1
1
  # Paradox MQTT SecuritySystem (Scrypted)
2
2
 
3
- Expose and control a **Paradox** alarm via **MQTT (PAI/PAI-MQTT style)** as a Scrypted **SecuritySystem**.
3
+ Control and sync a Paradox (PAI/PAI-MQTT–like) alarm via MQTT, exposed in Scrypted as a **SecuritySystem**. Optional child sensors (contact, motion, occupancy) can also be surfaced.
4
4
 
5
5
  ---
6
6
 
7
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
8
+ - Arm/Disarm: Disarmed, Home, Away, Night.
9
+ - MQTT topics for current/target state, tamper, and online.
10
+ - Optional per‑sensor MQTT bindings (contact/motion/occupancy) with battery, tamper, and online status.
11
+ - HomeKit: usable through the official Scrypted HomeKit plugin (non-standalone accessory).
13
12
 
14
13
  ---
15
14
 
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
-
15
+ ## Install
25
16
  ```bash
26
17
  npm i
27
- npm run build # generates dist/plugin.zip
18
+ npm run build # produces dist/plugin.zip
28
19
  ```
20
+ Then in **Scrypted → Manage Plugins → Install from file** and upload `dist/plugin.zip`.
29
21
 
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
- ```
22
+ > Alternatively: `npm run deploy` (requires `npx scrypted-cli login` one time).
35
23
 
36
24
  ---
37
25
 
38
- ## Configuration (Scrypted → your device → Settings)
39
-
26
+ ## Configuration (Settings)
40
27
  ### MQTT
41
- - **Broker URL**: e.g. `mqtt://0.0.0.0:1883`
42
- - **Username / Password** (if required)
43
- - **Client ID**, **TLS**, **Reject Unauthorized**
44
-
45
- ### Topics
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` |
28
+ - **Broker URL** e.g. `mqtt://127.0.0.1:1883`
29
+ - **Username/Password** (if needed)
30
+ - **Client ID**
31
+ - **TLS / Reject Unauthorized** (when using `mqtts://`)
32
+
33
+ ### Alarm Topics
34
+ - **Set Target State (publish)**: where the plugin publishes outgoing arm/disarm payloads.
35
+ - **Get Target State (subscribe)**: topic that echoes the intended target from your alarm bridge.
36
+ - **Get Current State (subscribe)**: topic reflecting the *actual* alarm state.
37
+ - **Get Status Tampered (subscribe)**: tamper status.
38
+ - **Get Online (subscribe)**: online/offline indicator of the alarm bridge.
53
39
 
54
40
  ### Publish Options
55
- - **QoS** (0/1/2)
56
- - **Retain** (true/false)
41
+ - **QoS** / **Retain**
42
+
43
+ ### Outgoing Payloads (defaults)
44
+ - Disarm → `disarm`
45
+ - Home → `arm_home`
46
+ - Away → `arm_away`
47
+ - Night → `arm_night`
57
48
 
58
- ### Outgoing Payloads (customizable)
59
- - **Disarm**: `disarm`
60
- - **Home**: `arm_home`
61
- - **Away**: `arm_away`
62
- - **Night**: `arm_night`
49
+ You can change these to match your bridge.
63
50
 
64
51
  ---
65
52
 
66
- ## Payload Notes
53
+ ## Sensor Support (Optional)
54
+ The plugin can expose additional sensors. You may add them from the **Sensors** section in Settings.
67
55
 
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.
56
+ Each sensor has:
57
+ - **kind**: `contact` | `motion` | `occupancy`
58
+ - **topics** (examples):
59
+ - Contact: `your/zones/front-door/open`
60
+ - Motion: `your/zones/hallway/motion`
61
+ - Occupancy: `your/rooms/office/occupied`
62
+ - Optional: `batteryLevel` (0..100), `lowBattery` (boolean), `tamper`, `online`
75
63
 
76
- **Outgoing (publish):** change payload strings in Settings to match your PAI mapping.
64
+ ### Creating Sensors from the UI
65
+ - Fill the fields for **ID**, **Name**, **Kind**, and desired **Topics**.
66
+ - Toggle **Create Sensor** to “On” and **Save**.
67
+ - **Restart this plugin** to have Scrypted show the new accessory under the plugin device.
68
+ - If you’re using HomeKit, **restart the HomeKit plugin** to see newly added accessories.
69
+
70
+ > Only the capabilities for which topics are provided will be exposed (e.g., no low‑battery if no related topic is set).
77
71
 
78
72
  ---
79
73
 
80
- ## Recommended PAI Mapping (example)
74
+ ## HomeKit Notes
75
+ Add this plugin’s device to the HomeKit plugin **(not as a Standalone accessory)**. A QR code appears in the HomeKit plugin when it is running and configured.
81
76
 
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
- ```
77
+ ---
90
78
 
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
- ```
79
+ ## Example Topic Mapping (Generic)
80
+ > Replace with your own topics from your bridge.
81
+ - **Set Target** (publish): `alarm/control/partition_1`
82
+ - **Get Target** (subscribe): `alarm/states/partition_1/target_state`
83
+ - **Get Current** (subscribe): `alarm/states/partition_1/current_state`
84
+ - **Tamper** (subscribe): `alarm/states/system/tamper`
85
+ - **Online** (subscribe): `alarm/interface/availability` (`online`/`offline`)
86
+
87
+ ---
88
+
89
+ ## Behavior & States
90
+ - The plugin waits for **Current State** before flipping the alarm mode (so you can see arming delays).
91
+ - It accepts common synonyms on incoming states (e.g., `armed_home`, `armed_away`, `armed_night`, `disarmed`).
92
+ - For sensors, battery/low‑battery is only reported when the corresponding topic is configured and indicates it.
98
93
 
99
94
  ---
100
95
 
101
- ## Tips
96
+ ## Troubleshooting
97
+ - No HomeKit QR? Ensure the HomeKit plugin is running and this device is added there (not standalone).
98
+ - Mode flips instantly? Ensure your bridge publishes **Current State** updates (and optionally `exit_delay` during arming).
99
+ - Nothing happens on arm/disarm? Verify the **Set Target** topic and outgoing payloads.
100
+ - MQTT connection issues? Check broker URL, credentials, TLS, and network reachability.
102
101
 
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).
102
+ ---
103
+
104
+ ## Privacy
105
+ You can set a noreply email in git to avoid exposing your name in commit metadata. For npm, ensure your account privacy settings are configured appropriately.
106
106
 
107
107
  ---
108
+
109
+ ## License
110
+ MIT (or your preferred license).
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.23",
3
+ "version": "1.0.24",
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",