@rfranzoi/scrypted-mqtt-securitysystem 1.0.6 → 1.0.8

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.
@@ -34127,6 +34127,19 @@ class ParadoxMqttSecuritySystem extends sdk_1.ScryptedDeviceBase {
34127
34127
  this.online = this.online ?? false;
34128
34128
  // Connect on start
34129
34129
  this.connectMqtt().catch(e => this.console.error('MQTT connect error:', e));
34130
+ // 🔻 chiusura pulita del client MQTT ai reload/stop del plugin
34131
+ process.once('SIGTERM', () => { try {
34132
+ this.client?.end(true);
34133
+ }
34134
+ catch { } });
34135
+ process.once('SIGINT', () => { try {
34136
+ this.client?.end(true);
34137
+ }
34138
+ catch { } });
34139
+ process.on('exit', () => { try {
34140
+ this.client?.end(true);
34141
+ }
34142
+ catch { } });
34130
34143
  }
34131
34144
  // --- Settings UI ---
34132
34145
  async getSettings() {
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.6",
3
+ "version": "1.0.8",
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",