hoffmation-base 0.1.36 → 0.1.37
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/config/iConfig.d.ts +0 -1
- package/lib/server/devices/button.d.ts +24 -0
- package/lib/server/devices/button.js +97 -0
- package/lib/server/devices/deviceType.d.ts +1 -0
- package/lib/server/devices/deviceType.js +1 -0
- package/lib/server/devices/devices.js +4 -0
- package/lib/server/devices/groups/praesenzGroup.d.ts +6 -0
- package/lib/server/devices/groups/praesenzGroup.js +14 -5
- package/lib/server/devices/groups/tasterGroup.d.ts +2 -2
- package/lib/server/devices/groups/tasterGroup.js +9 -7
- package/lib/server/devices/hmIPDevices/hmIpTaster.d.ts +13 -7
- package/lib/server/devices/hmIPDevices/hmIpTaster.js +34 -21
- package/lib/server/devices/hmIPDevices/hmIpWippe.d.ts +13 -6
- package/lib/server/devices/hmIPDevices/hmIpWippe.js +27 -9
- package/lib/server/devices/iButtonSwitch.d.ts +13 -0
- package/lib/server/devices/{iTaster.js → iButtonSwitch.js} +0 -0
- package/lib/server/devices/index.d.ts +2 -2
- package/lib/server/devices/index.js +2 -2
- package/lib/server/devices/zigbee/index.d.ts +2 -0
- package/lib/server/devices/zigbee/index.js +2 -0
- package/lib/server/devices/zigbee/zigbeeAqaraOpple3Switch.d.ts +19 -0
- package/lib/server/devices/zigbee/zigbeeAqaraOpple3Switch.js +105 -0
- package/lib/server/devices/zigbee/zigbeeIlluShutter.js +4 -0
- package/lib/server/devices/zigbee/zigbeeSwitch.d.ts +19 -0
- package/lib/server/devices/zigbee/zigbeeSwitch.js +13 -0
- package/lib/server/services/Telegram/telegram-Commands.js +1 -1
- package/lib/server/services/news-service.js +6 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -14
- package/lib/server/devices/iTaster.d.ts +0 -7
- package/lib/server/devices/taste.d.ts +0 -15
- package/lib/server/devices/taste.js +0 -64
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hoffmation-base",
|
|
3
3
|
"description": "Base Libraries and functions for own Hoffmation projects",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.37",
|
|
5
5
|
"files": [
|
|
6
6
|
"lib/**/*"
|
|
7
7
|
],
|
|
@@ -28,24 +28,24 @@
|
|
|
28
28
|
"test": "npm run lint-check-all && npm run jest"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@babel/runtime": "^7.
|
|
31
|
+
"@babel/runtime": "^7.17.0",
|
|
32
32
|
"@svrooij/sonos": "^2.5.0-beta.4",
|
|
33
33
|
"@types/debug": "^4.1.7",
|
|
34
|
-
"@types/iobroker": "^
|
|
34
|
+
"@types/iobroker": "^4.0.0",
|
|
35
35
|
"@types/jest": "^27.4.0",
|
|
36
36
|
"@types/lodash": "^4.14.178",
|
|
37
37
|
"@types/mongodb": "^4.0.7",
|
|
38
|
-
"@types/node": "17.0.
|
|
38
|
+
"@types/node": "17.0.15",
|
|
39
39
|
"@types/node-fetch": "^3.0.3",
|
|
40
|
-
"@types/node-telegram-bot-api": "^0.53.
|
|
40
|
+
"@types/node-telegram-bot-api": "^0.53.6",
|
|
41
41
|
"@types/socket.io-client": "^1.4.36",
|
|
42
42
|
"@types/xml2js": "^0.4.9",
|
|
43
|
-
"aws-sdk": "2.
|
|
43
|
+
"aws-sdk": "2.1069.0",
|
|
44
44
|
"get-mp3-duration": "^1.0.0",
|
|
45
45
|
"https": "^1.0.0",
|
|
46
46
|
"lodash": "^4.17.21",
|
|
47
|
-
"mongodb": "^4.
|
|
48
|
-
"node-fetch": "3.
|
|
47
|
+
"mongodb": "^4.3.1",
|
|
48
|
+
"node-fetch": "3.2.0",
|
|
49
49
|
"node-ical": "^0.14.1",
|
|
50
50
|
"node-telegram-bot-api": "^0.56.0",
|
|
51
51
|
"rss-parser": "^3.12.0",
|
|
@@ -53,17 +53,17 @@
|
|
|
53
53
|
"sunrise-sunset-js": "^2.2.1"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
57
|
-
"@typescript-eslint/parser": "^5.
|
|
58
|
-
"autoprefixer": "^10.4.
|
|
56
|
+
"@typescript-eslint/eslint-plugin": "^5.10.2",
|
|
57
|
+
"@typescript-eslint/parser": "^5.10.2",
|
|
58
|
+
"autoprefixer": "^10.4.2",
|
|
59
59
|
"coveralls": "^3.1.1",
|
|
60
|
-
"eslint": "^8.
|
|
60
|
+
"eslint": "^8.8.0",
|
|
61
61
|
"eslint-config-prettier": "^8.3.0",
|
|
62
62
|
"eslint-plugin-prettier": "4.0.0",
|
|
63
63
|
"eslint-plugin-unused-imports": "^2.0.0",
|
|
64
|
-
"jest": "^27.
|
|
64
|
+
"jest": "^27.5.0",
|
|
65
65
|
"prettier": "^2.5.1",
|
|
66
|
-
"ts-jest": "^27.1.
|
|
66
|
+
"ts-jest": "^27.1.3",
|
|
67
67
|
"typescript": "^4.5.4"
|
|
68
68
|
}
|
|
69
69
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare class Taste {
|
|
2
|
-
updateIndex: number;
|
|
3
|
-
shortPressed: boolean;
|
|
4
|
-
longPressed: boolean;
|
|
5
|
-
private _shortCallback;
|
|
6
|
-
private _longCallback;
|
|
7
|
-
private _shortResetTimeout;
|
|
8
|
-
private _longResetTimeout;
|
|
9
|
-
constructor(updateIndex: number);
|
|
10
|
-
addShortCallback(pCallback: (pValue: boolean) => void, description?: string): void;
|
|
11
|
-
addLongCallback(pCallback: (pValue: boolean) => void, description?: string): void;
|
|
12
|
-
getDescription(): string;
|
|
13
|
-
updateShort(pValue: boolean): void;
|
|
14
|
-
updateLong(pValue: boolean): void;
|
|
15
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Taste = void 0;
|
|
4
|
-
const utils_1 = require("../services/utils/utils");
|
|
5
|
-
class Taste {
|
|
6
|
-
constructor(updateIndex) {
|
|
7
|
-
this.updateIndex = updateIndex;
|
|
8
|
-
this.shortPressed = false;
|
|
9
|
-
this.longPressed = false;
|
|
10
|
-
this._shortCallback = [];
|
|
11
|
-
this._longCallback = [];
|
|
12
|
-
this._shortResetTimeout = null;
|
|
13
|
-
this._longResetTimeout = null;
|
|
14
|
-
}
|
|
15
|
-
addShortCallback(pCallback, description = 'Not described') {
|
|
16
|
-
this._shortCallback.push({ cb: pCallback, description: description });
|
|
17
|
-
}
|
|
18
|
-
addLongCallback(pCallback, description = 'Not described') {
|
|
19
|
-
this._longCallback.push({ cb: pCallback, description: description });
|
|
20
|
-
}
|
|
21
|
-
getDescription() {
|
|
22
|
-
const description = [];
|
|
23
|
-
for (const c of this._shortCallback) {
|
|
24
|
-
description.push(`Short Press: "${c.description}"`);
|
|
25
|
-
}
|
|
26
|
-
for (const c of this._longCallback) {
|
|
27
|
-
description.push(`Long Press: "${c.description}"`);
|
|
28
|
-
}
|
|
29
|
-
return description.join('\n');
|
|
30
|
-
}
|
|
31
|
-
updateShort(pValue) {
|
|
32
|
-
if (pValue === this.shortPressed) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
this.shortPressed = pValue;
|
|
36
|
-
for (const c of this._shortCallback) {
|
|
37
|
-
c.cb(pValue);
|
|
38
|
-
}
|
|
39
|
-
if (!pValue) {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
this._shortResetTimeout !== null && clearTimeout(this._shortResetTimeout);
|
|
43
|
-
this._shortResetTimeout = utils_1.Utils.guardedTimeout(() => {
|
|
44
|
-
this.updateShort(false);
|
|
45
|
-
}, 1000, this);
|
|
46
|
-
}
|
|
47
|
-
updateLong(pValue) {
|
|
48
|
-
if (pValue === this.longPressed) {
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
this.longPressed = pValue;
|
|
52
|
-
for (const c of this._longCallback) {
|
|
53
|
-
c.cb(pValue);
|
|
54
|
-
}
|
|
55
|
-
if (!pValue) {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
this._longResetTimeout !== null && clearTimeout(this._longResetTimeout);
|
|
59
|
-
this._longResetTimeout = utils_1.Utils.guardedTimeout(() => {
|
|
60
|
-
this.updateLong(false);
|
|
61
|
-
}, 5000, this);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
exports.Taste = Taste;
|