hoffmation-base 3.0.0-beta.6 → 3.0.0-beta.8
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/lib/server/devices/zigbee/zigbeeSodaHandle.d.ts +1 -1
- package/lib/server/devices/zigbee/zigbeeSodaHandle.js +2 -2
- package/lib/server/services/Sonos/mp3-server.js +6 -0
- package/lib/server/services/Telegram/telegram-service.js +9 -0
- package/lib/server/services/https-service.js +3 -0
- package/lib/server/services/weather/weather-service.js +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ import { HumiditySensor, TemperatureSensor } from '../sharedFunctions';
|
|
|
5
5
|
import { HumiditySensorChangeAction, TemperatureSensorChangeAction } from '../../../models';
|
|
6
6
|
/**
|
|
7
7
|
* A smart window handle with integrated temperature and humidity sensor.
|
|
8
|
-
* As the temperature sensor is so close to the window it might be off, which is why the correction coefficient is set to 0.
|
|
8
|
+
* As the temperature sensor is so close to the window it might be off, which is why the correction coefficient is set to 0.21°C per outdoor diff to 21°C
|
|
9
9
|
*/
|
|
10
10
|
export declare class ZigbeeSodaHandle extends ZigbeeWindowHandle implements iTemperatureSensor, iHumiditySensor {
|
|
11
11
|
/** @inheritDoc */
|
|
@@ -8,7 +8,7 @@ const sharedFunctions_1 = require("../sharedFunctions");
|
|
|
8
8
|
const models_1 = require("../../../models");
|
|
9
9
|
/**
|
|
10
10
|
* A smart window handle with integrated temperature and humidity sensor.
|
|
11
|
-
* As the temperature sensor is so close to the window it might be off, which is why the correction coefficient is set to 0.
|
|
11
|
+
* As the temperature sensor is so close to the window it might be off, which is why the correction coefficient is set to 0.21°C per outdoor diff to 21°C
|
|
12
12
|
*/
|
|
13
13
|
class ZigbeeSodaHandle extends BaseDevices_1.ZigbeeWindowHandle {
|
|
14
14
|
constructor(pInfo) {
|
|
@@ -19,7 +19,7 @@ class ZigbeeSodaHandle extends BaseDevices_1.ZigbeeWindowHandle {
|
|
|
19
19
|
this.humiditySensor = new sharedFunctions_1.HumiditySensor(this);
|
|
20
20
|
this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.humiditySensor);
|
|
21
21
|
this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.temperatureSensor);
|
|
22
|
-
this.temperatureSensor.outdoorTemperatureCorrectionCoefficient = 0.
|
|
22
|
+
this.temperatureSensor.outdoorTemperatureCorrectionCoefficient = 0.21;
|
|
23
23
|
}
|
|
24
24
|
/** @inheritDoc */
|
|
25
25
|
get roomTemperature() {
|
|
@@ -44,6 +44,12 @@ class MP3Server {
|
|
|
44
44
|
response.end('ungültige Anfrage', 'utf-8');
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
|
+
req.on('error', (e) => {
|
|
48
|
+
log_service_1.ServerLogService.writeLog(models_1.LogLevel.Warn, `MP3-Server HTTP Error: ${e}`);
|
|
49
|
+
});
|
|
50
|
+
response.on('error', (e) => {
|
|
51
|
+
log_service_1.ServerLogService.writeLog(models_1.LogLevel.Warn, `MP3-Server HTTP Error: ${e}`);
|
|
52
|
+
});
|
|
47
53
|
const q = url.parse(req.url, true).query;
|
|
48
54
|
const fName = q.fname;
|
|
49
55
|
if (!fName || fName.indexOf('.') >= 0) {
|
|
@@ -45,6 +45,15 @@ class TelegramService {
|
|
|
45
45
|
log_service_1.ServerLogService.writeLog(models_1.LogLevel.Debug, `Telegram Polling Error: ${e.message}`);
|
|
46
46
|
log_service_1.ServerLogService.writeLog(models_1.LogLevel.Trace, `Telegram Polling Error stack: ${e.stack}`);
|
|
47
47
|
});
|
|
48
|
+
this.bot.on('webhook_error', (e) => {
|
|
49
|
+
/*
|
|
50
|
+
if (!this.reinitiliazeWithTimeout()) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
*/
|
|
54
|
+
log_service_1.ServerLogService.writeLog(models_1.LogLevel.Debug, `Telegram Webhook Error: ${e.message}`);
|
|
55
|
+
log_service_1.ServerLogService.writeLog(models_1.LogLevel.Trace, `Telegram Webhook Error stack: ${e.stack}`);
|
|
56
|
+
});
|
|
48
57
|
TelegramService.addMessageCallback(new telegramMessageCalback_1.TelegramMessageCallback('helpCommand', /\/help/, async (m) => {
|
|
49
58
|
if (m.from === undefined)
|
|
50
59
|
return true;
|
|
@@ -44,6 +44,9 @@ class HTTPSService {
|
|
|
44
44
|
var _a;
|
|
45
45
|
responseCallback(responseData.join(''), (_a = res.statusCode) !== null && _a !== void 0 ? _a : 0);
|
|
46
46
|
});
|
|
47
|
+
res.on('error', (e) => {
|
|
48
|
+
log_service_1.ServerLogService.writeLog(models_1.LogLevel.Error, `HTTPS Error: ${e}`);
|
|
49
|
+
});
|
|
47
50
|
});
|
|
48
51
|
req.on('error', (e) => {
|
|
49
52
|
log_service_1.ServerLogService.writeLog(models_1.LogLevel.DeepTrace, `HTTPS Error: ${e}`);
|
|
@@ -219,6 +219,7 @@ class WeatherService {
|
|
|
219
219
|
}
|
|
220
220
|
const host = 'api.openweathermap.org';
|
|
221
221
|
const path = `/data/3.0/onecall?lat=${WeatherService.latitude}&lon=${WeatherService.longitude}&appid=${WeatherService.appID}&units=metric&lang=de`;
|
|
222
|
+
log_service_1.ServerLogService.writeLog(models_1.LogLevel.Debug, 'Send WeatherAPi Request for data update.');
|
|
222
223
|
https_service_1.HTTPSService.request(new HTTPSOptions_1.HTTPSOptions(host, path, {}, 'GET', 443), '', 5, (response) => {
|
|
223
224
|
log_service_1.ServerLogService.writeLog(models_1.LogLevel.Debug, 'WeatherAPi Response erhalten');
|
|
224
225
|
log_service_1.ServerLogService.writeLog(models_1.LogLevel.DeepTrace, `WeatherAPi Response: ${response}`);
|