hoffmation-base 3.0.1 → 3.0.3
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/dachs/lib/dachsHttpClient.js +17 -7
- package/lib/server/devices/device-cluster.js +0 -3
- package/lib/server/devices/deviceType.d.ts +0 -1
- package/lib/server/devices/deviceType.js +0 -1
- package/lib/server/devices/tv/tvDeviceType.d.ts +1 -2
- package/lib/server/devices/tv/tvDeviceType.js +0 -1
- package/lib/server/devices/zigbee/zigbeeAquaraVibra.js +17 -7
- package/lib/server/services/Sonos/mp3-server.js +17 -7
- package/lib/server/services/Sonos/polly-service.js +17 -7
- package/lib/server/services/govee/govee-service.js +17 -7
- package/lib/server/services/https-service.js +17 -7
- package/lib/server/services/news-service.js +17 -7
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +24 -30
- package/lib/server/devices/tv/samsungTv.d.ts +0 -16
- package/lib/server/devices/tv/samsungTv.js +0 -83
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": "3.0.
|
|
4
|
+
"version": "3.0.3",
|
|
5
5
|
"files": [
|
|
6
6
|
"lib/**/*"
|
|
7
7
|
],
|
|
@@ -48,55 +48,49 @@
|
|
|
48
48
|
"manual-test-unifi": "tsc && ts-node ./manualTests/unifi-test.ts"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"@types/jest": "^29.5.13",
|
|
55
|
-
"@types/lodash": "^4.17.10",
|
|
56
|
-
"@types/node": "22.7.5",
|
|
57
|
-
"@types/node-telegram-bot-api": "^0.64.7",
|
|
58
|
-
"@types/pg": "^8.11.10",
|
|
59
|
-
"@types/socket.io-client": "^1.4.36",
|
|
60
|
-
"@types/xml2js": "^0.4.14",
|
|
61
|
-
"aws-sdk": "2.1691.0",
|
|
62
|
-
"axios": "^1.7.7",
|
|
51
|
+
"@svrooij/sonos": "^2.6.0-beta.11",
|
|
52
|
+
"aws-sdk": "2.1692.0",
|
|
53
|
+
"axios": "^1.7.9",
|
|
63
54
|
"daikin-controller": "^2.1.0",
|
|
64
55
|
"get-mp3-duration": "^1.0.0",
|
|
65
|
-
"https": "^1.0.0",
|
|
66
56
|
"lodash": "^4.17.21",
|
|
67
|
-
"node-
|
|
68
|
-
"node-
|
|
69
|
-
"node-merlin-wrt-api": "^0.0.2-alpha.5",
|
|
57
|
+
"node-ical": "^0.20.1",
|
|
58
|
+
"node-merlin-wrt-api": "^0.1.0",
|
|
70
59
|
"node-telegram-bot-api": "^0.66.0",
|
|
71
60
|
"node-unifi": "2.5.1",
|
|
72
|
-
"pg": "^8.13.
|
|
61
|
+
"pg": "^8.13.1",
|
|
73
62
|
"rss-parser": "^3.13.0",
|
|
74
|
-
"samsung-tv-control": "^1.14.0",
|
|
75
63
|
"socket.io-client": "2.5.0",
|
|
76
64
|
"suncalc": "1.9.0",
|
|
77
65
|
"sunrise-sunset-js": "^2.2.1",
|
|
78
|
-
"tibber-api": "^5.
|
|
66
|
+
"tibber-api": "^5.3.1",
|
|
79
67
|
"victron-mqtt-consumer": "^0.1.14"
|
|
80
68
|
},
|
|
81
69
|
"devDependencies": {
|
|
70
|
+
"@iobroker/types": "^7.0.6",
|
|
71
|
+
"@types/debug": "^4.1.12",
|
|
72
|
+
"@types/jest": "^29.5.14",
|
|
73
|
+
"@types/lodash": "^4.17.13",
|
|
74
|
+
"@types/node": "^22.10.3",
|
|
75
|
+
"@types/node-telegram-bot-api": "^0.64.7",
|
|
76
|
+
"@types/pg": "^8.11.10",
|
|
77
|
+
"@types/socket.io-client": "^1.4.36",
|
|
82
78
|
"@alcalzone/release-script": "^3.8.0",
|
|
83
|
-
"@eslint/eslintrc": "^3.
|
|
84
|
-
"@eslint/js": "^9.
|
|
79
|
+
"@eslint/eslintrc": "^3.2.0",
|
|
80
|
+
"@eslint/js": "^9.17.0",
|
|
85
81
|
"@types/node-ssdp": "^4.0.4",
|
|
86
82
|
"@types/suncalc": "^1.9.2",
|
|
87
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
88
|
-
"@typescript-eslint/parser": "^8.
|
|
89
|
-
"
|
|
90
|
-
"coveralls": "^3.1.1",
|
|
91
|
-
"eslint": "9.12.0",
|
|
83
|
+
"@typescript-eslint/eslint-plugin": "^8.19.0",
|
|
84
|
+
"@typescript-eslint/parser": "^8.19.0",
|
|
85
|
+
"eslint": "^9.17.0",
|
|
92
86
|
"eslint-config-prettier": "^9.1.0",
|
|
93
|
-
"eslint-plugin-jsdoc": "^50.
|
|
87
|
+
"eslint-plugin-jsdoc": "^50.6.1",
|
|
94
88
|
"eslint-plugin-prettier": "5.2.1",
|
|
95
89
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
96
90
|
"jest": "^29.7.0",
|
|
97
|
-
"prettier": "^3.
|
|
91
|
+
"prettier": "^3.4.2",
|
|
98
92
|
"ts-jest": "^29.2.5",
|
|
99
93
|
"ts-node": "^10.9.2",
|
|
100
|
-
"typescript": "^5.
|
|
94
|
+
"typescript": "^5.7.2"
|
|
101
95
|
}
|
|
102
96
|
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { TvDevice } from './tvDevice';
|
|
2
|
-
import { DeviceType } from '../deviceType';
|
|
3
|
-
export declare class SamsungTv extends TvDevice {
|
|
4
|
-
/** @inheritDoc */
|
|
5
|
-
deviceType: DeviceType;
|
|
6
|
-
private _device;
|
|
7
|
-
constructor(name: string, roomName: string, ip: string, mac: string, token: string);
|
|
8
|
-
private _on;
|
|
9
|
-
get on(): boolean;
|
|
10
|
-
automaticCheck(): void;
|
|
11
|
-
turnOff(): void;
|
|
12
|
-
turnOn(): void;
|
|
13
|
-
volumeDown(): void;
|
|
14
|
-
volumeUp(): void;
|
|
15
|
-
private sendKey;
|
|
16
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.SamsungTv = void 0;
|
|
27
|
-
const tvDevice_1 = require("./tvDevice");
|
|
28
|
-
const deviceType_1 = require("../deviceType");
|
|
29
|
-
const tvDeviceType_1 = require("./tvDeviceType");
|
|
30
|
-
const samsung_tv_control_1 = __importStar(require("samsung-tv-control"));
|
|
31
|
-
const models_1 = require("../../../models");
|
|
32
|
-
class SamsungTv extends tvDevice_1.TvDevice {
|
|
33
|
-
constructor(name, roomName, ip, mac, token) {
|
|
34
|
-
super(name, roomName, ip, tvDeviceType_1.TvDeviceType.Samsung);
|
|
35
|
-
/** @inheritDoc */
|
|
36
|
-
this.deviceType = deviceType_1.DeviceType.SamsungTv;
|
|
37
|
-
this._on = false;
|
|
38
|
-
this._device = new samsung_tv_control_1.default({
|
|
39
|
-
debug: false,
|
|
40
|
-
ip: ip,
|
|
41
|
-
mac: mac,
|
|
42
|
-
nameApp: 'hoffmation',
|
|
43
|
-
port: 8001,
|
|
44
|
-
token: token,
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
get on() {
|
|
48
|
-
return this._on;
|
|
49
|
-
}
|
|
50
|
-
automaticCheck() {
|
|
51
|
-
this._device
|
|
52
|
-
.isAvailable()
|
|
53
|
-
.then((available) => {
|
|
54
|
-
this._on = available;
|
|
55
|
-
})
|
|
56
|
-
.catch((reason) => {
|
|
57
|
-
this.log(models_1.LogLevel.Warn, `Available check failed ${reason}`);
|
|
58
|
-
})
|
|
59
|
-
.finally(() => {
|
|
60
|
-
super.automaticCheck();
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
turnOff() {
|
|
64
|
-
this.sendKey(samsung_tv_control_1.KEYS.KEY_POWER);
|
|
65
|
-
}
|
|
66
|
-
turnOn() {
|
|
67
|
-
void this._device.turnOn();
|
|
68
|
-
}
|
|
69
|
-
volumeDown() {
|
|
70
|
-
this.sendKey(samsung_tv_control_1.KEYS.KEY_VOLDOWN);
|
|
71
|
-
}
|
|
72
|
-
volumeUp() {
|
|
73
|
-
this.sendKey(samsung_tv_control_1.KEYS.KEY_VOLUP);
|
|
74
|
-
}
|
|
75
|
-
sendKey(key) {
|
|
76
|
-
this._device.sendKey(key, (err, _res) => {
|
|
77
|
-
if (err) {
|
|
78
|
-
this.log(models_1.LogLevel.Warn, `SendKeyFailed: ${err}`);
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
exports.SamsungTv = SamsungTv;
|