@riddix/hamh 2.1.0-alpha.572 → 2.1.0-alpha.574
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/backend/cli.js
CHANGED
|
@@ -177986,21 +177986,6 @@ var advertisedOperationalStates = [
|
|
|
177986
177986
|
OperationalState4.Docked
|
|
177987
177987
|
];
|
|
177988
177988
|
var RvcOperationalStateServerBase = class extends RvcOperationalStateServer {
|
|
177989
|
-
/**
|
|
177990
|
-
* Alternating nonce that forces a structural difference in operationalError
|
|
177991
|
-
* on every update call. matter.js's Datasource uses isDeepEqual to detect
|
|
177992
|
-
* attribute changes — writing the same value is silently ignored, so no
|
|
177993
|
-
* subscription report is generated. By toggling errorStateDetails between
|
|
177994
|
-
* absent and "" (an optional, semantically meaningless field when
|
|
177995
|
-
* errorStateId is NoError), we guarantee the struct is never deep-equal to
|
|
177996
|
-
* its predecessor, which makes matter.js emit attrsChanged and produce a
|
|
177997
|
-
* subscription report.
|
|
177998
|
-
*
|
|
177999
|
-
* This works around a matter.js 0.16.x bug where the subscription
|
|
178000
|
-
* heartbeat timer (sendInterval) fails to fire for certain sessions,
|
|
178001
|
-
* causing Apple Home (iOS via Apple TV proxy) to show "Updating...".
|
|
178002
|
-
*/
|
|
178003
|
-
keepaliveNonce = false;
|
|
178004
177989
|
async initialize() {
|
|
178005
177990
|
this.state.operationalStateList = advertisedOperationalStates.map((id) => ({
|
|
178006
177991
|
operationalStateId: id
|
|
@@ -178021,12 +178006,11 @@ var RvcOperationalStateServerBase = class extends RvcOperationalStateServer {
|
|
|
178021
178006
|
this.agent
|
|
178022
178007
|
);
|
|
178023
178008
|
const previousState = this.state.operationalState;
|
|
178024
|
-
this.keepaliveNonce = !this.keepaliveNonce;
|
|
178025
178009
|
const errorStateId = newState === OperationalState4.Error ? ErrorState.Stuck : ErrorState.NoError;
|
|
178026
|
-
const operationalError = {
|
|
178027
|
-
|
|
178028
|
-
|
|
178029
|
-
}
|
|
178010
|
+
const operationalError = {
|
|
178011
|
+
errorStateId,
|
|
178012
|
+
errorStateDetails: String(Date.now())
|
|
178013
|
+
};
|
|
178030
178014
|
applyPatchState(
|
|
178031
178015
|
this.state,
|
|
178032
178016
|
{
|
|
@@ -181312,10 +181296,9 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
|
|
|
181312
181296
|
await super.delete();
|
|
181313
181297
|
}
|
|
181314
181298
|
/**
|
|
181315
|
-
*
|
|
181316
|
-
*
|
|
181317
|
-
*
|
|
181318
|
-
* guaranteeing matter.js emits attrsChanged → subscription report.
|
|
181299
|
+
* Force a non-empty subscription report by writing a unique
|
|
181300
|
+
* errorStateDetails to the RvcOperationalState cluster via
|
|
181301
|
+
* setStateOf (the same path used by all matter.js state updates).
|
|
181319
181302
|
*
|
|
181320
181303
|
* errorStateDetails (id 2) has conformance "O" (always optional)
|
|
181321
181304
|
* unlike errorStateLabel (id 1) which requires errorStateId 128-191.
|
|
@@ -181325,13 +181308,12 @@ var ServerModeVacuumEndpoint = class _ServerModeVacuumEndpoint extends EntityEnd
|
|
|
181325
181308
|
this.keepaliveCounter++;
|
|
181326
181309
|
const counter = this.keepaliveCounter;
|
|
181327
181310
|
logger203.info(`Keepalive #${counter} for ${this.entityId}`);
|
|
181328
|
-
|
|
181329
|
-
|
|
181330
|
-
|
|
181331
|
-
|
|
181332
|
-
errorStateId,
|
|
181311
|
+
const currentError = this.stateOf(RvcOperationalStateServer).operationalError;
|
|
181312
|
+
await this.setStateOf(RvcOperationalStateServer, {
|
|
181313
|
+
operationalError: {
|
|
181314
|
+
errorStateId: currentError.errorStateId,
|
|
181333
181315
|
errorStateDetails: `k${counter}`
|
|
181334
|
-
}
|
|
181316
|
+
}
|
|
181335
181317
|
});
|
|
181336
181318
|
logger203.info(`Keepalive #${counter} committed for ${this.entityId}`);
|
|
181337
181319
|
} catch (e) {
|