hoffmation-base 2.21.0 → 2.21.1
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.
|
@@ -99,7 +99,9 @@ class Dachs {
|
|
|
99
99
|
this.settings.initializeFromDb(this);
|
|
100
100
|
}
|
|
101
101
|
loadData() {
|
|
102
|
-
this.client
|
|
102
|
+
this.client
|
|
103
|
+
.fetchAllKeys()
|
|
104
|
+
.then((data) => {
|
|
103
105
|
var _a, _b;
|
|
104
106
|
this.queuedValue = null;
|
|
105
107
|
this.fetchedData = data;
|
|
@@ -121,6 +123,9 @@ class Dachs {
|
|
|
121
123
|
this._tempHeatStorage = (_b = this.fetchedData['Hka_Mw1.Temp.sbFuehler1']) !== null && _b !== void 0 ? _b : 0;
|
|
122
124
|
this.heatStorageTempSensor.update(this._tempHeatStorage);
|
|
123
125
|
this.persist();
|
|
126
|
+
})
|
|
127
|
+
.catch((error) => {
|
|
128
|
+
this.log(models_1.LogLevel.Error, `Error while fetching data: ${error}`);
|
|
124
129
|
});
|
|
125
130
|
}
|
|
126
131
|
persist() {
|
|
@@ -14,7 +14,18 @@ class GooveeService {
|
|
|
14
14
|
static initialize() {
|
|
15
15
|
log_service_1.ServerLogService.writeLog(models_1.LogLevel.Debug, `Initializing Goovee-Service`);
|
|
16
16
|
this.all = [];
|
|
17
|
-
this.goveeApi = new theimo1221_govee_lan_control_1.default(
|
|
17
|
+
this.goveeApi = new theimo1221_govee_lan_control_1.default({
|
|
18
|
+
discoverInterval: 10 * 60 * 1000, // 10 minutes is enough
|
|
19
|
+
logger: (message) => {
|
|
20
|
+
log_service_1.ServerLogService.writeLog(models_1.LogLevel.Debug, `Govee: ${message}`);
|
|
21
|
+
},
|
|
22
|
+
errorLogger: (message) => {
|
|
23
|
+
if (message.startsWith('UDP Socket was not')) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
log_service_1.ServerLogService.writeLog(models_1.LogLevel.Error, `Govee: ${message}`);
|
|
27
|
+
},
|
|
28
|
+
});
|
|
18
29
|
this.goveeApi.on('deviceAdded', (device) => {
|
|
19
30
|
log_service_1.ServerLogService.writeLog(models_1.LogLevel.Info, `GoveeDevice ${device.deviceID} joined`);
|
|
20
31
|
GooveeService.initializeDevice(device);
|