@rfranzoi/scrypted-mqtt-securitysystem 1.0.22 → 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 +74 -71
- package/dist/main.nodejs.js +1 -1
- package/dist/plugin.zip +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,107 +1,110 @@
|
|
|
1
1
|
# Paradox MQTT SecuritySystem (Scrypted)
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
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
|
-
##
|
|
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
|
|
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
|
-
|
|
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 (
|
|
39
|
-
|
|
26
|
+
## Configuration (Settings)
|
|
40
27
|
### MQTT
|
|
41
|
-
- **Broker URL
|
|
42
|
-
- **Username
|
|
43
|
-
- **Client ID
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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**
|
|
56
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
53
|
+
## Sensor Support (Optional)
|
|
54
|
+
The plugin can expose additional sensors. You may add them from the **Sensors** section in Settings.
|
|
67
55
|
|
|
68
|
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
-
|
|
74
|
-
-
|
|
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
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
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
|
-
|
|
92
|
-
|
|
93
|
-
Target
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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/main.nodejs.js
CHANGED
|
@@ -34256,7 +34256,7 @@ class ParadoxMqttSecuritySystem extends sdk_1.ScryptedDeviceBase {
|
|
|
34256
34256
|
{ group: 'Publish Options', key: 'retain', title: 'Retain', type: 'boolean', value: this.storage.getItem('retain') === 'true' },
|
|
34257
34257
|
];
|
|
34258
34258
|
// ---- UI Add Sensor ----
|
|
34259
|
-
out.push({ group: 'Add Sensor', key: 'new.id', title: 'New Sensor ID', placeholder: 'porta-ingresso', value: this.storage.getItem('new.id') || '' }, { group: 'Add Sensor', key: 'new.name', title: 'Name', placeholder: 'Porta Ingresso', value: this.storage.getItem('new.name') || '' }, { group: 'Add Sensor', key: 'new.kind', title: 'Type', value: this.storage.getItem('new.kind') || 'contact', choices: ['contact', 'motion', 'occupancy'] }, { group: 'Add Sensor', key: 'new.create', title: 'Create sensor', type: 'boolean', description: '
|
|
34259
|
+
out.push({ group: 'Add Sensor', key: 'new.id', title: 'New Sensor ID', placeholder: 'porta-ingresso', value: this.storage.getItem('new.id') || '' }, { group: 'Add Sensor', key: 'new.name', title: 'Name', placeholder: 'Porta Ingresso', value: this.storage.getItem('new.name') || '' }, { group: 'Add Sensor', key: 'new.kind', title: 'Type', value: this.storage.getItem('new.kind') || 'contact', choices: ['contact', 'motion', 'occupancy'] }, { group: 'Add Sensor', key: 'new.create', title: 'Create sensor', type: 'boolean', description: 'Fill the fields above and toggle this on to create the sensor. After creation, restart this plugin to see the accessory listed below. To show it in HomeKit, restart the HomeKit plugin as well.' });
|
|
34260
34260
|
// ---- UI per sensori esistenti ----
|
|
34261
34261
|
for (const cfg of this.sensorsCfg) {
|
|
34262
34262
|
const gid = `Sensor: ${cfg.name} [${cfg.id}]`;
|
package/dist/plugin.zip
CHANGED
|
Binary file
|
package/package.json
CHANGED