@rfranzoi/scrypted-mqtt-securitysystem 1.0.11 → 1.0.13
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/dist/main.nodejs.js +8 -6
- package/dist/plugin.zip +0 -0
- package/package.json +1 -1
package/dist/main.nodejs.js
CHANGED
|
@@ -34086,21 +34086,23 @@ const DEFAULT_OUTGOING = {
|
|
|
34086
34086
|
[sdk_1.SecuritySystemMode.AwayArmed]: 'arm_away',
|
|
34087
34087
|
[sdk_1.SecuritySystemMode.NightArmed]: 'arm_night',
|
|
34088
34088
|
};
|
|
34089
|
-
/** Common incoming synonyms → SecuritySystemMode
|
|
34089
|
+
/** Common incoming synonyms → SecuritySystemMode
|
|
34090
|
+
* (FIX: gli stati transitori non alterano la modalità) */
|
|
34090
34091
|
function payloadToMode(payload) {
|
|
34091
34092
|
if (payload == null)
|
|
34092
34093
|
return;
|
|
34093
34094
|
const p = normalize(payload.toString());
|
|
34095
|
+
// final modes
|
|
34094
34096
|
if (['disarm', 'disarmed', 'off', '0', 'idle', 'ready'].includes(p))
|
|
34095
34097
|
return sdk_1.SecuritySystemMode.Disarmed;
|
|
34096
34098
|
if (['arm_home', 'home', 'stay', 'armed_home'].includes(p))
|
|
34097
34099
|
return sdk_1.SecuritySystemMode.HomeArmed;
|
|
34098
|
-
if (['arm_away', 'away', 'armed_away', '
|
|
34100
|
+
if (['arm_away', 'away', 'armed_away', 'away_armed'].includes(p))
|
|
34099
34101
|
return sdk_1.SecuritySystemMode.AwayArmed;
|
|
34100
|
-
if (['arm_night', 'night', 'armed_night'].includes(p))
|
|
34102
|
+
if (['arm_night', 'night', 'armed_night', 'sleep', 'arm_sleep', 'armed_sleep'].includes(p))
|
|
34101
34103
|
return sdk_1.SecuritySystemMode.NightArmed;
|
|
34102
|
-
//
|
|
34103
|
-
if (['entry_delay', 'pending', 'arming'].includes(p))
|
|
34104
|
+
// transitional / ignore for mode changes
|
|
34105
|
+
if (['entry_delay', 'exit_delay', 'pending', 'arming', 'disarming'].includes(p))
|
|
34104
34106
|
return undefined;
|
|
34105
34107
|
return undefined;
|
|
34106
34108
|
}
|
|
@@ -34127,7 +34129,7 @@ class ParadoxMqttSecuritySystem extends sdk_1.ScryptedDeviceBase {
|
|
|
34127
34129
|
this.online = this.online ?? false;
|
|
34128
34130
|
// Connect on start
|
|
34129
34131
|
this.connectMqtt().catch(e => this.console.error('MQTT connect error:', e));
|
|
34130
|
-
//
|
|
34132
|
+
// chiusura pulita del client MQTT ai reload/stop del plugin
|
|
34131
34133
|
process.once('SIGTERM', () => { try {
|
|
34132
34134
|
this.client?.end(true);
|
|
34133
34135
|
}
|
package/dist/plugin.zip
CHANGED
|
Binary file
|
package/package.json
CHANGED