Skip to content

Commit

Permalink
fix: Fix no checkinInterval after restart if device has no `genPoll…
Browse files Browse the repository at this point in the history
…Ctl` cluster (#1119)

When modernExtend.quirkCheckinInterval() got added, this used to work. But now the restoring of the value from database was behinda check on inputClusters.genPollCtrl.
This modernExtend was added for devices with a fixed checkin interval (e.g. lumi devices and there near frequent genBasic messages) but that do not expose genPollCtrl.
  • Loading branch information
sjorge authored Jul 17, 2024
1 parent f2d5ee8 commit ca1dd1f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/controller/model/device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -515,10 +515,11 @@ class Device extends Entity {
// default for devices that support genPollCtrl cluster (RX off when idle): 1 day
pendingRequestTimeout = 86400000;
/* istanbul ignore else */
if (entry.hasOwnProperty('checkinInterval')) {
// if the checkin interval is known, messages expire by default after one checkin interval
pendingRequestTimeout = entry.checkinInterval * 1000; // milliseconds
}
}
// always load value from database available (modernExtend.quirkCheckinInterval() exists for devices without genPollCtl)
if (entry.hasOwnProperty('checkinInterval')) {
// if the checkin interval is known, messages expire by default after one checkin interval
pendingRequestTimeout = entry.checkinInterval * 1000; // milliseconds
}
logger.debug(`Request Queue (${ieeeAddr}): default expiration timeout set to ${pendingRequestTimeout}`, NS);

Expand Down

0 comments on commit ca1dd1f

Please sign in to comment.