Skip to content

Commit

Permalink
feat: add sendToSleep timeout support
Browse files Browse the repository at this point in the history
Fixes #3301
  • Loading branch information
robertsLando committed Sep 26, 2023
1 parent e713cfc commit b321ff7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/ZwaveClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,7 @@ export type ZwaveConfig = {
maxFiles?: number
logLevel?: LogManager.LogLevel
commandsTimeout?: number
sendToSleepTimeout?: number
enableStatistics?: boolean
disclaimerVersion?: number
options?: ZWaveOptions
Expand Down Expand Up @@ -2115,6 +2116,7 @@ class ZwaveClient extends TypedEventEmitter<ZwaveClientEventCallbacks> {
},
timeouts: {
report: this.cfg.higherReportsTimeout ? 10000 : undefined,
sendToSleep: this.cfg.sendToSleepTimeout,
},
userAgent: {
[pkgjson.name]: pkgjson.version,
Expand Down
1 change: 1 addition & 0 deletions src/stores/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const useBaseStore = defineStore('base', {
port: '/dev/zwave',
allowBootloaderOnly: false,
commandsTimeout: 30,
sendToSleepTimeout: 250,
logLevel: 'debug',
rf: {
region: undefined,
Expand Down
13 changes: 13 additions & 0 deletions src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,19 @@
type="number"
></v-text-field>
</v-col>
<v-col cols="6">
<v-text-field
v-model.number="
newZwave.sendToSleepTimeout
"
label="Send to sleep timeout"
:rules="[rules.required]"
required
suffix="seconds"
hint="How long to wait without pending commands before sending a node back to sleep"
type="number"
></v-text-field>
</v-col>
<v-col cols="6">
<v-text-field
v-model.number="
Expand Down

0 comments on commit b321ff7

Please sign in to comment.