iobroker.faikout 0.0.14 → 0.0.15
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/README.md +3 -0
- package/io-package.json +14 -1
- package/lib/broker.js +5 -2
- package/main.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -70,6 +70,9 @@ module's **Extra** settings makes it report immediately.
|
|
|
70
70
|
### **WORK IN PROGRESS**
|
|
71
71
|
-->
|
|
72
72
|
|
|
73
|
+
### 0.0.15
|
|
74
|
+
- The MQTT broker's shutdown timeout uses the adapter's `setTimeout` (repository checker E5005).
|
|
75
|
+
|
|
73
76
|
### 0.0.14
|
|
74
77
|
- **Breaking:** the consumption subtree uses English IDs: `consumption.{total|heating|cooling}.{currentHour|lastHour|today|yesterday|thisMonth|lastMonth}`
|
|
75
78
|
and `hoursJson`/`daysJson`/`monthsJson` (entries keyed `hour`/`day`/`month`). On start the adapter copies the last values of the
|
package/io-package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "faikout",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.15",
|
|
5
5
|
"titleLang": {
|
|
6
6
|
"en": "Faikout",
|
|
7
7
|
"de": "Faikout",
|
|
@@ -68,6 +68,19 @@
|
|
|
68
68
|
}
|
|
69
69
|
],
|
|
70
70
|
"news": {
|
|
71
|
+
"0.0.15": {
|
|
72
|
+
"en": "Shutdown timeout of the MQTT broker uses the adapter timer (checker E5005)",
|
|
73
|
+
"de": "Abschalt-Zeitlimit des MQTT-Brokers nutzt den Adapter-Zeitgeber (Checker E5005)",
|
|
74
|
+
"ru": "Shutdown timeout of the MQTT broker uses the adapter timer (checker E5005)",
|
|
75
|
+
"pt": "Shutdown timeout of the MQTT broker uses the adapter timer (checker E5005)",
|
|
76
|
+
"nl": "Shutdown timeout of the MQTT broker uses the adapter timer (checker E5005)",
|
|
77
|
+
"fr": "Shutdown timeout of the MQTT broker uses the adapter timer (checker E5005)",
|
|
78
|
+
"it": "Shutdown timeout of the MQTT broker uses the adapter timer (checker E5005)",
|
|
79
|
+
"es": "Shutdown timeout of the MQTT broker uses the adapter timer (checker E5005)",
|
|
80
|
+
"pl": "Shutdown timeout of the MQTT broker uses the adapter timer (checker E5005)",
|
|
81
|
+
"uk": "Shutdown timeout of the MQTT broker uses the adapter timer (checker E5005)",
|
|
82
|
+
"zh-cn": "Shutdown timeout of the MQTT broker uses the adapter timer (checker E5005)"
|
|
83
|
+
},
|
|
71
84
|
"0.0.14": {
|
|
72
85
|
"en": "Consumption states renamed to English IDs (consumption.total.today ...), existing values are migrated; status.autoe can be written; complete translations of admin and widgets",
|
|
73
86
|
"de": "Verbrauchsdatenpunkte auf englische IDs umbenannt (consumption.total.today ...), vorhandene Werte werden übernommen; status.autoe ist beschreibbar; vollständige Übersetzungen von Admin und Widgets",
|
package/lib/broker.js
CHANGED
|
@@ -22,6 +22,8 @@ class FaikoutBroker {
|
|
|
22
22
|
* @param {string} [opts.user] Optionaler Benutzername; leer = keine Anmeldung noetig
|
|
23
23
|
* @param {string} [opts.pass] Passwort dazu
|
|
24
24
|
* @param {object} opts.log Logger des Adapters
|
|
25
|
+
* @param {{setTimeout: (cb: () => void, ms: number) => unknown, clearTimeout: (t: unknown) => void}} opts.timer Zeitgeber des Adapters
|
|
26
|
+
* (adapter.setTimeout statt des nackten setTimeout - der Adapter raeumt sie beim Beenden selbst ab)
|
|
25
27
|
* @param {(topic:string, payload:Buffer)=>void} opts.onMessage je eingehender Nachricht
|
|
26
28
|
* @param {(clientId:string, verbunden:boolean)=>void} [opts.onClient] bei An- und Abmeldung eines Moduls
|
|
27
29
|
*/
|
|
@@ -30,6 +32,7 @@ class FaikoutBroker {
|
|
|
30
32
|
this.user = opts.user || '';
|
|
31
33
|
this.pass = opts.pass || '';
|
|
32
34
|
this.log = opts.log;
|
|
35
|
+
this.timer = opts.timer;
|
|
33
36
|
this.onMessage = opts.onMessage;
|
|
34
37
|
this.onClient = opts.onClient || (() => {});
|
|
35
38
|
this.broker = null;
|
|
@@ -147,12 +150,12 @@ class FaikoutBroker {
|
|
|
147
150
|
const ende = () => {
|
|
148
151
|
if (!erledigt) {
|
|
149
152
|
erledigt = true;
|
|
150
|
-
clearTimeout(notbremse);
|
|
153
|
+
this.timer.clearTimeout(notbremse);
|
|
151
154
|
resolve();
|
|
152
155
|
}
|
|
153
156
|
};
|
|
154
157
|
// Obergrenze: Das Beenden darf den Adapter nie blockieren (Unload-Zeitlimit).
|
|
155
|
-
const notbremse = setTimeout(ende, 2000);
|
|
158
|
+
const notbremse = this.timer.setTimeout(ende, 2000);
|
|
156
159
|
const server = this.server;
|
|
157
160
|
const broker = this.broker;
|
|
158
161
|
this.server = null;
|
package/main.js
CHANGED