From f956deb066c5d2b39e2562259d3d6a46baacd03b Mon Sep 17 00:00:00 2001 From: Daniel Lando Date: Tue, 14 Nov 2023 17:13:38 +0100 Subject: [PATCH] feat: add setting to disable controller recovery feature (#3423) --- lib/ZwaveClient.ts | 9 ++++++++- src/stores/base.js | 1 + src/views/Settings.vue | 10 ++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/lib/ZwaveClient.ts b/lib/ZwaveClient.ts index 5844279830..0c46b71409 100644 --- a/lib/ZwaveClient.ts +++ b/lib/ZwaveClient.ts @@ -582,6 +582,7 @@ export type ZwaveConfig = { serverServiceDiscoveryDisabled?: boolean maxNodeEventsQueueSize?: number higherReportsTimeout?: boolean + disableControllerRecovery?: boolean rf?: { region?: RFRegion txPower?: { @@ -2122,6 +2123,12 @@ class ZwaveClient extends TypedEventEmitter { sendToSleep: this.cfg.sendToSleepTimeout, response: this.cfg.responseTimeout, }, + features: { + unresponsiveControllerRecovery: this.cfg + .disableControllerRecovery + ? false + : true, + }, userAgent: { [pkgjson.name]: pkgjson.version, }, @@ -2151,7 +2158,7 @@ class ZwaveClient extends TypedEventEmitter { // when not set let zwavejs handle this based on the environment if (typeof this.cfg.enableSoftReset === 'boolean') { - zwaveOptions.enableSoftReset = this.cfg.enableSoftReset + zwaveOptions.features.softReset = this.cfg.enableSoftReset } if (this.cfg.scales) { diff --git a/src/stores/base.js b/src/stores/base.js index 640668d7af..94437e227d 100644 --- a/src/stores/base.js +++ b/src/stores/base.js @@ -47,6 +47,7 @@ const useBaseStore = defineStore('base', { serverHost: undefined, maxNodeEventsQueueSize: 100, higherReportsTimeout: false, + disableControllerRecovery: false, }, backup: { storeBackup: false, diff --git a/src/views/Settings.vue b/src/views/Settings.vue index 7a15bc3d49..182180d204 100644 --- a/src/views/Settings.vue +++ b/src/views/Settings.vue @@ -858,6 +858,16 @@ " > + + +