iobroker.sonoff 3.1.2 → 3.3.0
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/LICENSE +1 -1
- package/README.md +29 -2
- package/admin/i18n/de/translations.json +33 -21
- package/admin/i18n/en/translations.json +14 -2
- package/admin/i18n/es/translations.json +13 -1
- package/admin/i18n/fr/translations.json +13 -1
- package/admin/i18n/it/translations.json +13 -1
- package/admin/i18n/nl/translations.json +13 -1
- package/admin/i18n/pl/translations.json +13 -1
- package/admin/i18n/pt/translations.json +13 -1
- package/admin/i18n/ru/translations.json +13 -1
- package/admin/i18n/uk/translations.json +13 -1
- package/admin/i18n/zh-cn/translations.json +13 -1
- package/admin/jsonConfig.json +146 -28
- package/admin/words.js +36 -24
- package/io-package.json +36 -29
- package/lib/datapoints.js +368 -207
- package/lib/server.js +561 -244
- package/main.js +10 -7
- package/package.json +10 -8
package/main.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
2
|
* ioBroker sonoff Adapter
|
|
4
3
|
*
|
|
5
4
|
* (c) 2017-2024 bluefox
|
|
6
5
|
*
|
|
7
6
|
* MIT License
|
|
8
|
-
*
|
|
9
7
|
*/
|
|
10
8
|
'use strict';
|
|
11
9
|
|
|
@@ -77,17 +75,22 @@ function startAdapter(options) {
|
|
|
77
75
|
|
|
78
76
|
function main() {
|
|
79
77
|
adapter.config.TELE_SENSOR = adapter.config.TELE_SENSOR === true || adapter.config.TELE_SENSOR === 'true';
|
|
80
|
-
adapter.config.TELE_STATE
|
|
78
|
+
adapter.config.TELE_STATE = adapter.config.TELE_STATE === true || adapter.config.TELE_STATE === 'true';
|
|
81
79
|
adapter.config.STAT_RESULT = adapter.config.STAT_RESULT === true || adapter.config.STAT_RESULT === 'true';
|
|
82
|
-
adapter.config.OBJ_TREE
|
|
80
|
+
adapter.config.OBJ_TREE = adapter.config.OBJ_TREE === true || adapter.config.OBJ_TREE === 'true';
|
|
83
81
|
|
|
84
82
|
// subscribe for all own variables
|
|
85
83
|
adapter.subscribeStates('*');
|
|
86
84
|
|
|
87
85
|
// read all states and set alive to false
|
|
88
|
-
adapter.getStatesOf(
|
|
89
|
-
|
|
90
|
-
|
|
86
|
+
adapter.getStatesOf(
|
|
87
|
+
'',
|
|
88
|
+
'',
|
|
89
|
+
(err, states) =>
|
|
90
|
+
states &&
|
|
91
|
+
states.length &&
|
|
92
|
+
states.forEach(state => state._id.match(/\.alive$/) && adapter.setForeignState(state._id, false, true)),
|
|
93
|
+
);
|
|
91
94
|
|
|
92
95
|
server = new Server(adapter);
|
|
93
96
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.sonoff",
|
|
3
3
|
"description": "The adapter allows to send and receive MQTT messages from ioBroker and to be a broker.",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.3.0",
|
|
5
5
|
"author": "bluefox <dogafox@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/ioBroker/ioBroker.sonoff",
|
|
7
7
|
"repository": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"esp"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@iobroker/adapter-core": "^3.
|
|
19
|
+
"@iobroker/adapter-core": "^3.3.2",
|
|
20
20
|
"mqtt-connection": "^4.1.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
@@ -24,12 +24,13 @@
|
|
|
24
24
|
"@alcalzone/release-script-plugin-iobroker": "^3.7.2",
|
|
25
25
|
"@alcalzone/release-script-plugin-license": "^3.7.0",
|
|
26
26
|
"@alcalzone/release-script-plugin-manual-review": "^3.7.0",
|
|
27
|
-
"@iobroker/adapter-dev": "^1.
|
|
28
|
-
"@iobroker/
|
|
29
|
-
"@iobroker/testing": "^
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
27
|
+
"@iobroker/adapter-dev": "^1.4.0",
|
|
28
|
+
"@iobroker/eslint-config": "^2.1.0",
|
|
29
|
+
"@iobroker/legacy-testing": "^2.0.2",
|
|
30
|
+
"@iobroker/testing": "^5.1.1",
|
|
31
|
+
"chai": "^4.5.0",
|
|
32
|
+
"mocha": "^11.7.2",
|
|
33
|
+
"mqtt": "^5.14.0"
|
|
33
34
|
},
|
|
34
35
|
"bugs": {
|
|
35
36
|
"url": "https://github.com/ioBroker/ioBroker.sonoff/issues"
|
|
@@ -44,6 +45,7 @@
|
|
|
44
45
|
],
|
|
45
46
|
"scripts": {
|
|
46
47
|
"test": "node node_modules/mocha/bin/mocha --exit",
|
|
48
|
+
"lint": "eslint -c eslint.config.mjs .",
|
|
47
49
|
"release": "release-script",
|
|
48
50
|
"release-patch": "release-script patch --yes",
|
|
49
51
|
"release-minor": "release-script minor --yes",
|