@riddix/hamh 2.1.0-alpha.543 → 2.1.0-alpha.545
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/README.md
CHANGED
|
@@ -219,6 +219,9 @@ For more details, see the [Robot Vacuum Documentation](https://riddix.github.io/
|
|
|
219
219
|
|
|
220
220
|
### Home Assistant Add-on (Recommended)
|
|
221
221
|
|
|
222
|
+
[](https://my.home-assistant.io/redirect/supervisor_addon/?addon=3fd9e6b0_hamh&repository_url=https%3A%2F%2Fgithub.com%2Friddix%2Fhome-assistant-addons)
|
|
223
|
+
|
|
224
|
+
### Manual steps (testing versions, etc.)
|
|
222
225
|
Add this repository to your Add-on Store:
|
|
223
226
|
|
|
224
227
|
```
|
package/dist/backend/cli.js
CHANGED
|
@@ -167234,6 +167234,11 @@ var Bridge = class {
|
|
|
167234
167234
|
await this.endpointManager.startPlugins();
|
|
167235
167235
|
this.setStatus({ code: BridgeStatus.Running });
|
|
167236
167236
|
this.startAutoForceSyncIfEnabled();
|
|
167237
|
+
if (this.dataProvider.featureFlags?.autoForceSync) {
|
|
167238
|
+
this.forceSync().catch((e) => {
|
|
167239
|
+
this.log.warn("Startup force sync failed:", e);
|
|
167240
|
+
});
|
|
167241
|
+
}
|
|
167237
167242
|
this.wireSessionDiagnostics();
|
|
167238
167243
|
logMemoryUsage(this.log, "bridge running");
|
|
167239
167244
|
diagnosticEventBus.emit("bridge_started", `Bridge started`, {
|
|
@@ -175714,7 +175719,9 @@ var RvcRunModeServerBase = class extends RvcRunModeServer {
|
|
|
175714
175719
|
}
|
|
175715
175720
|
}
|
|
175716
175721
|
/**
|
|
175717
|
-
* Safely update ServiceArea.currentArea.
|
|
175722
|
+
* Safely update ServiceArea.currentArea and progress.
|
|
175723
|
+
* When areaId is set, marks it as Operating in progress.
|
|
175724
|
+
* When areaId is null (Idle), marks all Operating/Pending as Completed.
|
|
175718
175725
|
* No-op if ServiceArea is not available on this endpoint.
|
|
175719
175726
|
*/
|
|
175720
175727
|
trySetCurrentArea(areaId) {
|
|
@@ -175724,9 +175731,32 @@ var RvcRunModeServerBase = class extends RvcRunModeServer {
|
|
|
175724
175731
|
serviceArea.state.currentArea = areaId;
|
|
175725
175732
|
logger189.debug(`currentArea set to ${areaId}`);
|
|
175726
175733
|
}
|
|
175734
|
+
this.updateProgress(serviceArea, areaId);
|
|
175727
175735
|
} catch {
|
|
175728
175736
|
}
|
|
175729
175737
|
}
|
|
175738
|
+
/**
|
|
175739
|
+
* Update progress entries to reflect the current operating area.
|
|
175740
|
+
* - null: mark all Operating/Pending entries as Completed (cleaning done)
|
|
175741
|
+
* - areaId: mark that area as Operating
|
|
175742
|
+
*
|
|
175743
|
+
* Note: progress is available because our ServiceAreaServerBase enables
|
|
175744
|
+
* ProgressReporting, but the base ServiceAreaBehavior type doesn't expose it.
|
|
175745
|
+
*/
|
|
175746
|
+
updateProgress(serviceArea, areaId) {
|
|
175747
|
+
const state = serviceArea.state;
|
|
175748
|
+
const progress = state.progress;
|
|
175749
|
+
if (!progress || progress.length === 0) return;
|
|
175750
|
+
if (areaId === null) {
|
|
175751
|
+
state.progress = progress.map(
|
|
175752
|
+
(p) => p.status === ServiceArea3.OperationalStatus.Operating || p.status === ServiceArea3.OperationalStatus.Pending ? { ...p, status: ServiceArea3.OperationalStatus.Completed } : p
|
|
175753
|
+
);
|
|
175754
|
+
} else {
|
|
175755
|
+
state.progress = progress.map(
|
|
175756
|
+
(p) => p.areaId === areaId && p.status === ServiceArea3.OperationalStatus.Pending ? { ...p, status: ServiceArea3.OperationalStatus.Operating } : p
|
|
175757
|
+
);
|
|
175758
|
+
}
|
|
175759
|
+
}
|
|
175730
175760
|
/**
|
|
175731
175761
|
* Find the ServiceArea area ID that corresponds to a run mode value
|
|
175732
175762
|
* by matching the mode label to the area location name.
|
|
@@ -176011,7 +176041,10 @@ init_esm();
|
|
|
176011
176041
|
// src/matter/behaviors/service-area-server.ts
|
|
176012
176042
|
init_esm();
|
|
176013
176043
|
var logger190 = Logger.get("ServiceAreaServer");
|
|
176014
|
-
var
|
|
176044
|
+
var ServiceAreaWithProgress = ServiceAreaBehavior.with(
|
|
176045
|
+
ServiceArea3.Feature.ProgressReporting
|
|
176046
|
+
);
|
|
176047
|
+
var ServiceAreaServerBase = class extends ServiceAreaWithProgress {
|
|
176015
176048
|
selectAreas(request) {
|
|
176016
176049
|
const { newAreas } = request;
|
|
176017
176050
|
logger190.info(
|
|
@@ -176030,6 +176063,10 @@ var ServiceAreaServerBase = class extends ServiceAreaBehavior {
|
|
|
176030
176063
|
};
|
|
176031
176064
|
}
|
|
176032
176065
|
this.state.selectedAreas = uniqueAreas;
|
|
176066
|
+
this.state.progress = uniqueAreas.map((areaId) => ({
|
|
176067
|
+
areaId,
|
|
176068
|
+
status: ServiceArea3.OperationalStatus.Pending
|
|
176069
|
+
}));
|
|
176033
176070
|
logger190.info(
|
|
176034
176071
|
`ServiceArea: Stored ${uniqueAreas.length} areas for cleaning: ${uniqueAreas.join(", ")}`
|
|
176035
176072
|
);
|
|
@@ -176046,7 +176083,7 @@ var ServiceAreaServerBase = class extends ServiceAreaBehavior {
|
|
|
176046
176083
|
}
|
|
176047
176084
|
};
|
|
176048
176085
|
((ServiceAreaServerBase2) => {
|
|
176049
|
-
class State extends
|
|
176086
|
+
class State extends ServiceAreaWithProgress.State {
|
|
176050
176087
|
}
|
|
176051
176088
|
ServiceAreaServerBase2.State = State;
|
|
176052
176089
|
})(ServiceAreaServerBase || (ServiceAreaServerBase = {}));
|
|
@@ -176057,11 +176094,15 @@ function ServiceAreaServer2(initialState) {
|
|
|
176057
176094
|
return ServiceAreaServerBase.set({
|
|
176058
176095
|
supportedAreas: initialState.supportedAreas,
|
|
176059
176096
|
selectedAreas: initialState.selectedAreas ?? [],
|
|
176060
|
-
currentArea: initialState.currentArea ?? null
|
|
176097
|
+
currentArea: initialState.currentArea ?? null,
|
|
176098
|
+
progress: []
|
|
176061
176099
|
});
|
|
176062
176100
|
}
|
|
176063
|
-
var
|
|
176064
|
-
|
|
176101
|
+
var ServiceAreaWithMapsAndProgress = ServiceAreaBehavior.with(
|
|
176102
|
+
ServiceArea3.Feature.Maps,
|
|
176103
|
+
ServiceArea3.Feature.ProgressReporting
|
|
176104
|
+
);
|
|
176105
|
+
var ServiceAreaServerWithMapsBase = class extends ServiceAreaWithMapsAndProgress {
|
|
176065
176106
|
selectAreas(request) {
|
|
176066
176107
|
const { newAreas } = request;
|
|
176067
176108
|
logger190.info(
|
|
@@ -176080,6 +176121,10 @@ var ServiceAreaServerWithMapsBase = class extends ServiceAreaWithMaps {
|
|
|
176080
176121
|
};
|
|
176081
176122
|
}
|
|
176082
176123
|
this.state.selectedAreas = uniqueAreas;
|
|
176124
|
+
this.state.progress = uniqueAreas.map((areaId) => ({
|
|
176125
|
+
areaId,
|
|
176126
|
+
status: ServiceArea3.OperationalStatus.Pending
|
|
176127
|
+
}));
|
|
176083
176128
|
logger190.info(
|
|
176084
176129
|
`ServiceArea: Stored ${uniqueAreas.length} areas for cleaning: ${uniqueAreas.join(", ")}`
|
|
176085
176130
|
);
|
|
@@ -176096,7 +176141,7 @@ var ServiceAreaServerWithMapsBase = class extends ServiceAreaWithMaps {
|
|
|
176096
176141
|
}
|
|
176097
176142
|
};
|
|
176098
176143
|
((ServiceAreaServerWithMapsBase2) => {
|
|
176099
|
-
class State extends
|
|
176144
|
+
class State extends ServiceAreaWithMapsAndProgress.State {
|
|
176100
176145
|
}
|
|
176101
176146
|
ServiceAreaServerWithMapsBase2.State = State;
|
|
176102
176147
|
})(ServiceAreaServerWithMapsBase || (ServiceAreaServerWithMapsBase = {}));
|
|
@@ -176114,7 +176159,8 @@ function ServiceAreaServerWithMaps(initialState) {
|
|
|
176114
176159
|
supportedAreas: initialState.supportedAreas,
|
|
176115
176160
|
supportedMaps: initialState.supportedMaps,
|
|
176116
176161
|
selectedAreas: initialState.selectedAreas ?? [],
|
|
176117
|
-
currentArea: initialState.currentArea ?? null
|
|
176162
|
+
currentArea: initialState.currentArea ?? null,
|
|
176163
|
+
progress: []
|
|
176118
176164
|
});
|
|
176119
176165
|
}
|
|
176120
176166
|
|
|
@@ -180222,6 +180268,11 @@ var ServerModeBridge = class {
|
|
|
180222
180268
|
await this.server.start();
|
|
180223
180269
|
this.setStatus({ code: BridgeStatus.Running });
|
|
180224
180270
|
this.startAutoForceSyncIfEnabled();
|
|
180271
|
+
if (this.dataProvider.featureFlags?.autoForceSync) {
|
|
180272
|
+
this.forceSync().catch((e) => {
|
|
180273
|
+
this.log.warn("Startup force sync failed:", e);
|
|
180274
|
+
});
|
|
180275
|
+
}
|
|
180225
180276
|
this.wireSessionDiagnostics();
|
|
180226
180277
|
this.scheduleWarmStart();
|
|
180227
180278
|
logMemoryUsage(this.log, "server mode bridge running");
|