iobroker.hydrawise 0.0.7 → 0.0.9
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 +15 -3
- package/build/main.js +79 -8
- package/build/main.js.map +2 -2
- package/io-package.json +27 -27
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,9 +10,17 @@
|
|
|
10
10
|
[](https://nodei.co/npm/iobroker.hydrawise/)
|
|
11
11
|
|
|
12
12
|
## Changelog
|
|
13
|
-
### 0.0.
|
|
13
|
+
### 0.0.9 (2023-05-25)
|
|
14
14
|
|
|
15
|
-
- (SentiQ)
|
|
15
|
+
- (SentiQ) added more translations
|
|
16
|
+
|
|
17
|
+
### 0.0.8 (2023-05-25)
|
|
18
|
+
|
|
19
|
+
- (SentiQ) improved log messages
|
|
20
|
+
|
|
21
|
+
### 0.0.7 (2023-05-25)
|
|
22
|
+
|
|
23
|
+
- (SentiQ) fixed author
|
|
16
24
|
|
|
17
25
|
### 0.0.6 (2023-05-24)
|
|
18
26
|
|
|
@@ -32,7 +40,11 @@
|
|
|
32
40
|
|
|
33
41
|
### 0.0.2 (2023-05-23)
|
|
34
42
|
|
|
35
|
-
- (SentiQ)
|
|
43
|
+
- (SentiQ) refactoring code
|
|
44
|
+
|
|
45
|
+
### 0.0.1 (2023-01-26)
|
|
46
|
+
|
|
47
|
+
- (aDabbelju) Initial commit by adapter creator
|
|
36
48
|
|
|
37
49
|
## License
|
|
38
50
|
|
package/build/main.js
CHANGED
|
@@ -57,7 +57,19 @@ class Hydrawise extends utils.Adapter {
|
|
|
57
57
|
await this.setObjectNotExistsAsync("schedule.stopall", {
|
|
58
58
|
type: "state",
|
|
59
59
|
common: {
|
|
60
|
-
name:
|
|
60
|
+
name: {
|
|
61
|
+
en: "stop all zones",
|
|
62
|
+
de: "alle Zonen stoppen",
|
|
63
|
+
ru: "\u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0432\u0441\u0435 \u0437\u043E\u043D\u044B",
|
|
64
|
+
pt: "parar todas as zonas",
|
|
65
|
+
nl: "stop alle zones",
|
|
66
|
+
fr: "arr\xEAter toutes les zones",
|
|
67
|
+
it: "fermare tutte le zone",
|
|
68
|
+
es: "detener todas las zonas",
|
|
69
|
+
pl: "zatrzymuj\u0105 wszystkie strefy",
|
|
70
|
+
uk: "\u0437\u0443\u043F\u0438\u043D\u0438\u0442\u0438 \u0432\u0441\u0456 \u0437\u043E\u043D\u0438",
|
|
71
|
+
"zh-cn": "\u505C\u6B62\u6240\u6709\u5730\u533A"
|
|
72
|
+
},
|
|
61
73
|
type: "boolean",
|
|
62
74
|
role: "button",
|
|
63
75
|
read: false,
|
|
@@ -68,9 +80,22 @@ class Hydrawise extends utils.Adapter {
|
|
|
68
80
|
await this.setObjectNotExistsAsync("schedule.runall", {
|
|
69
81
|
type: "state",
|
|
70
82
|
common: {
|
|
71
|
-
name:
|
|
83
|
+
name: {
|
|
84
|
+
en: "run all zones for x seconds",
|
|
85
|
+
de: "alle Zonen f\xFCr x Sekunden ausf\xFChren",
|
|
86
|
+
ru: "\u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C \u0432\u0441\u0435 \u0437\u043E\u043D\u044B \u0437\u0430 x \u0441\u0435\u043A\u0443\u043D\u0434\u044B",
|
|
87
|
+
pt: "executar todas as zonas por x segundos",
|
|
88
|
+
nl: "ren alle zones voor x seconden",
|
|
89
|
+
fr: "ex\xE9cuter toutes les zones pendant x secondes",
|
|
90
|
+
it: "eseguire tutte le zone per x secondi",
|
|
91
|
+
es: "ejecutar todas las zonas durante x segundos",
|
|
92
|
+
pl: "wszystkie strefy startuj\u0105 dla x sekundy",
|
|
93
|
+
uk: "\u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u0438 \u0432\u0441\u0456 \u0437\u043E\u043D\u0438 \u0434\u043B\u044F x \u0441\u0435\u043A\u0443\u043D\u0434",
|
|
94
|
+
"zh-cn": "\u8DD1\u9053\u533A"
|
|
95
|
+
},
|
|
72
96
|
type: "number",
|
|
73
97
|
role: "value",
|
|
98
|
+
unit: "seconds",
|
|
74
99
|
read: false,
|
|
75
100
|
write: true
|
|
76
101
|
},
|
|
@@ -79,7 +104,19 @@ class Hydrawise extends utils.Adapter {
|
|
|
79
104
|
await this.setObjectNotExistsAsync("schedule.suspendall", {
|
|
80
105
|
type: "state",
|
|
81
106
|
common: {
|
|
82
|
-
name:
|
|
107
|
+
name: {
|
|
108
|
+
en: "suspend all zones for x seconds",
|
|
109
|
+
de: "alle Zonen f\xFCr x Sekunden aussetzen",
|
|
110
|
+
ru: "\u043F\u0440\u0438\u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0432\u0441\u0435 \u0437\u043E\u043D\u044B \u0437\u0430 x \u0441\u0435\u043A\u0443\u043D\u0434\u044B",
|
|
111
|
+
pt: "suspender todas as zonas por x segundos",
|
|
112
|
+
nl: "vertaling:",
|
|
113
|
+
fr: "suspendre toutes les zones pendant x secondes",
|
|
114
|
+
it: "sospendere tutte le zone per x secondi",
|
|
115
|
+
es: "suspender todas las zonas durante x segundos",
|
|
116
|
+
pl: "wszystkie strefy zawieszenia dla x sekundy",
|
|
117
|
+
uk: "\u043F\u0440\u0438\u0437\u0443\u043F\u0438\u043D\u0438\u0442\u0438 \u0432\u0441\u0456 \u0437\u043E\u043D\u0438 \u043D\u0430 x \u0441\u0435\u043A\u0443\u043D\u0434",
|
|
118
|
+
"zh-cn": "\u505C\u6B62\u6240\u6709\xD7\u4E8C\u533A"
|
|
119
|
+
},
|
|
83
120
|
type: "number",
|
|
84
121
|
role: "value",
|
|
85
122
|
read: false,
|
|
@@ -129,7 +166,19 @@ class Hydrawise extends utils.Adapter {
|
|
|
129
166
|
await this.setObjectNotExistsAsync(`schedule.${relay.name}.stopZone`, {
|
|
130
167
|
type: "state",
|
|
131
168
|
common: {
|
|
132
|
-
name:
|
|
169
|
+
name: {
|
|
170
|
+
en: "stop zone",
|
|
171
|
+
de: "Zone stoppen",
|
|
172
|
+
ru: "\u0437\u043E\u043D\u0430 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0438",
|
|
173
|
+
pt: "zona de paragem",
|
|
174
|
+
nl: "stop zone",
|
|
175
|
+
fr: "zone d ' arr\xEAt",
|
|
176
|
+
it: "zona di sosta",
|
|
177
|
+
es: "zona de parada",
|
|
178
|
+
pl: "strefa stopu",
|
|
179
|
+
uk: "\u0437\u043E\u043D\u0430 \u0437\u0443\u043F\u0438\u043D\u043A\u0438",
|
|
180
|
+
"zh-cn": "\u505C\u6B62\u5730\u533A"
|
|
181
|
+
},
|
|
133
182
|
type: "boolean",
|
|
134
183
|
role: "button",
|
|
135
184
|
read: false,
|
|
@@ -140,7 +189,19 @@ class Hydrawise extends utils.Adapter {
|
|
|
140
189
|
await this.setObjectNotExistsAsync(`schedule.${relay.name}.runZone`, {
|
|
141
190
|
type: "state",
|
|
142
191
|
common: {
|
|
143
|
-
name:
|
|
192
|
+
name: {
|
|
193
|
+
en: "run zone for x seconds",
|
|
194
|
+
de: "Zone f\xFCr x Sekunden starten",
|
|
195
|
+
ru: "\u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C \u0437\u043E\u043D\u0443 \u0437\u0430 x \u0441\u0435\u043A\u0443\u043D\u0434\u044B",
|
|
196
|
+
pt: "zona de execu\xE7\xE3o por x segundos",
|
|
197
|
+
nl: "ren zone voor x seconden",
|
|
198
|
+
fr: "zone de course pour x secondes",
|
|
199
|
+
it: "zona di corsa per x secondi",
|
|
200
|
+
es: "zona de ejecuci\xF3n por x segundos",
|
|
201
|
+
pl: "strefa x sekundy",
|
|
202
|
+
uk: "\u0437\u043E\u043D\u0430 \u0437\u0430\u043F\u0443\u0441\u043A\u0443 \u0434\u043B\u044F x \u0441\u0435\u043A\u0443\u043D\u0434",
|
|
203
|
+
"zh-cn": "\xD7\u4E8C\u533A"
|
|
204
|
+
},
|
|
144
205
|
type: "number",
|
|
145
206
|
role: "value",
|
|
146
207
|
read: false,
|
|
@@ -151,7 +212,19 @@ class Hydrawise extends utils.Adapter {
|
|
|
151
212
|
await this.setObjectNotExistsAsync(`schedule.${relay.name}.suspendZone`, {
|
|
152
213
|
type: "state",
|
|
153
214
|
common: {
|
|
154
|
-
name:
|
|
215
|
+
name: {
|
|
216
|
+
en: "suspend zone for x seconds",
|
|
217
|
+
de: "Zone f\xFCr x Sekunden aussetzen",
|
|
218
|
+
ru: "\u043F\u0440\u0438\u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0437\u043E\u043D\u0443 \u043D\u0430 x \u0441\u0435\u043A\u0443\u043D\u0434\u044B",
|
|
219
|
+
pt: "zona de suspens\xE3o por x segundos",
|
|
220
|
+
nl: "quality over quantity (qoq) releases vertaling:",
|
|
221
|
+
fr: "zone de suspension pour x secondes",
|
|
222
|
+
it: "zona di sospensione per x secondi",
|
|
223
|
+
es: "zona de suspensi\xF3n por x segundos",
|
|
224
|
+
pl: "strefa zawies\u0142a na x sekundy",
|
|
225
|
+
uk: "\u0437\u043E\u043D\u0430 \u043F\u0456\u0434\u0432\u0456\u0441\u043A\u0438 \u0434\u043B\u044F x \u0441\u0435\u043A\u0443\u043D\u0434",
|
|
226
|
+
"zh-cn": "\u505C\u6B62x\u4E8C\u533A"
|
|
227
|
+
},
|
|
155
228
|
type: "number",
|
|
156
229
|
role: "value",
|
|
157
230
|
read: false,
|
|
@@ -316,8 +389,6 @@ class Hydrawise extends utils.Adapter {
|
|
|
316
389
|
}
|
|
317
390
|
onStateChange(id, state) {
|
|
318
391
|
if (state) {
|
|
319
|
-
console.log("state", state);
|
|
320
|
-
this.log.info(`state ${id} changed: ${state.val} (ack = ${state.ack})`);
|
|
321
392
|
if (id.indexOf("stopall") !== -1) {
|
|
322
393
|
this.buildRequest("setzone.php", { api_key: this.config.apiKey, action: "stopall" });
|
|
323
394
|
} else if (id.indexOf("stop") !== -1) {
|
package/build/main.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/main.ts"],
|
|
4
|
-
"sourcesContent": ["/*\n * Created with @iobroker/create-adapter v2.3.0\n */\n\n// The adapter-core module gives you access to the core ioBroker functions\n// you need to create an adapter\nimport * as utils from \"@iobroker/adapter-core\";\nimport axios from \"axios\";\n\nconst hydrawise_url = \"https://api.hydrawise.com\";\nlet nextpollSchedule: any = null;\nlet nextpollCustomer: any = null;\nconst RELAYS: any = Object;\n\nclass Hydrawise extends utils.Adapter {\n\tpublic constructor(options: Partial<utils.AdapterOptions> = {}) {\n\t\tsuper({\n\t\t\t...options,\n\t\t\tname: \"hydrawise\",\n\t\t});\n\n\t\tthis.on(\"ready\", this.onReady.bind(this));\n\t\tthis.on(\"stateChange\", this.onStateChange.bind(this));\n\t\tthis.on(\"unload\", this.onUnload.bind(this));\n\t}\n\n\tprivate async onReady(): Promise<void> {\n\t\tif (!this.config.apiKey) {\n\t\t\tthis.log.error(\"No API-Key definded!\");\n\t\t} else {\n\t\t\tthis.log.info(\"config apiKey: \" + this.config.apiKey);\n\n\t\t\tthis.setStateChangedAsync(\"info.connection\", false, true);\n\n\t\t\tawait this.GetStatusSchedule(this.config.apiKey);\n\n\t\t\tawait this.GetCustomerDetails(this.config.apiKey);\n\n\t\t\tawait this.subscribeStatesAsync(\"*\");\n\t\t}\n\t}\n\n\tprivate async GetStatusSchedule(apiKey: string): Promise<void> {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tnextpollSchedule =\n\t\t\t\tnextpollSchedule ||\n\t\t\t\tthis.setTimeout(() => {\n\t\t\t\t\tnextpollSchedule = null;\n\t\t\t\t\tthis.GetStatusSchedule(apiKey);\n\t\t\t\t}, 60000);\n\n\t\t\tthis.buildRequest(\"statusschedule.php\", { api_key: this.config.apiKey })\n\t\t\t\t.then(async (response) => {\n\t\t\t\t\tif (response.status === 200) {\n\t\t\t\t\t\tconst content = response.data;\n\n\t\t\t\t\t\tthis.setStateChangedAsync(\"info.connection\", true, true);\n\n\t\t\t\t\t\tawait this.setObjectNotExistsAsync(\"schedule.stopall\", {\n\t\t\t\t\t\t\ttype: \"state\",\n\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\tname: \"stopall\",\n\t\t\t\t\t\t\t\ttype: \"boolean\",\n\t\t\t\t\t\t\t\trole: \"button\",\n\t\t\t\t\t\t\t\tread: false,\n\t\t\t\t\t\t\t\twrite: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tawait this.setObjectNotExistsAsync(\"schedule.runall\", {\n\t\t\t\t\t\t\ttype: \"state\",\n\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\tname: \"runall for x seconds\",\n\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t\trole: \"value\",\n\t\t\t\t\t\t\t\tread: false,\n\t\t\t\t\t\t\t\twrite: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tawait this.setObjectNotExistsAsync(\"schedule.suspendall\", {\n\t\t\t\t\t\t\ttype: \"state\",\n\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\tname: \"suspendall for x seconds\",\n\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t\trole: \"value\",\n\t\t\t\t\t\t\t\tread: false,\n\t\t\t\t\t\t\t\twrite: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tfor (const key in content) {\n\t\t\t\t\t\t\tif (key !== \"relays\" && key !== \"sensors\" && key !== \"expanders\") {\n\t\t\t\t\t\t\t\tawait this.setObjectNotExistsAsync(`schedule.${key}`, {\n\t\t\t\t\t\t\t\t\ttype: \"state\",\n\t\t\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\t\t\tname: key,\n\t\t\t\t\t\t\t\t\t\ttype: key === \"message\" ? \"string\" : \"number\",\n\t\t\t\t\t\t\t\t\t\trole: key === \"message\" ? \"text\" : \"value\",\n\t\t\t\t\t\t\t\t\t\tread: true,\n\t\t\t\t\t\t\t\t\t\twrite: false,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\tthis.setStateChangedAsync(`schedule.${key}`, content[key], true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor (const relay of content.relays) {\n\t\t\t\t\t\t\tawait this.setObjectNotExistsAsync(`schedule.${relay.name}`, {\n\t\t\t\t\t\t\t\ttype: \"channel\",\n\t\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\t\tname: relay.name,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tRELAYS[relay.name] = relay.relay_id;\n\n\t\t\t\t\t\t\tfor (const key in relay) {\n\t\t\t\t\t\t\t\tawait this.setObjectNotExistsAsync(`schedule.${relay.name}.${key}`, {\n\t\t\t\t\t\t\t\t\ttype: \"state\",\n\t\t\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\t\t\tname: key,\n\t\t\t\t\t\t\t\t\t\ttype: key === \"name\" ? \"string\" : \"number\",\n\t\t\t\t\t\t\t\t\t\trole: key === \"name\" ? \"text\" : \"value\",\n\t\t\t\t\t\t\t\t\t\tread: true,\n\t\t\t\t\t\t\t\t\t\twrite: false,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\tthis.setStateChangedAsync(`schedule.${relay.name}.${key}`, relay[key], true);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tawait this.setObjectNotExistsAsync(`schedule.${relay.name}.stopZone`, {\n\t\t\t\t\t\t\t\ttype: \"state\",\n\t\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\t\tname: \"stop zone\",\n\t\t\t\t\t\t\t\t\ttype: \"boolean\",\n\t\t\t\t\t\t\t\t\trole: \"button\",\n\t\t\t\t\t\t\t\t\tread: false,\n\t\t\t\t\t\t\t\t\twrite: true,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tawait this.setObjectNotExistsAsync(`schedule.${relay.name}.runZone`, {\n\t\t\t\t\t\t\t\ttype: \"state\",\n\t\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\t\tname: \"run zone for x seconds\",\n\t\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t\t\trole: \"value\",\n\t\t\t\t\t\t\t\t\tread: false,\n\t\t\t\t\t\t\t\t\twrite: true,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tawait this.setObjectNotExistsAsync(`schedule.${relay.name}.suspendZone`, {\n\t\t\t\t\t\t\t\ttype: \"state\",\n\t\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\t\tname: \"suspend zone for x seconds\",\n\t\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t\t\trole: \"value\",\n\t\t\t\t\t\t\t\t\tread: false,\n\t\t\t\t\t\t\t\t\twrite: true,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor (const sensor of content.sensors) {\n\t\t\t\t\t\t\tawait this.setObjectNotExistsAsync(`schedule.sensors.${sensor.input}`, {\n\t\t\t\t\t\t\t\ttype: \"channel\",\n\t\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\t\tname: \"sensors\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tfor (const key in sensor) {\n\t\t\t\t\t\t\t\tif (key !== \"relays\") {\n\t\t\t\t\t\t\t\t\tawait this.setObjectNotExistsAsync(`schedule.sensors.${sensor.input}.${key}`, {\n\t\t\t\t\t\t\t\t\t\ttype: \"state\",\n\t\t\t\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\t\t\t\tname: key,\n\t\t\t\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t\t\t\t\trole: \"value\",\n\t\t\t\t\t\t\t\t\t\t\tread: true,\n\t\t\t\t\t\t\t\t\t\t\twrite: false,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\tthis.setStateChangedAsync(\n\t\t\t\t\t\t\t\t\t\t`schedule.sensors.${sensor.input}.${key}`,\n\t\t\t\t\t\t\t\t\t\tsensor[key],\n\t\t\t\t\t\t\t\t\t\ttrue,\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tresolve(response.status);\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tthis.log.debug(`(stats) received error - API is now offline: ${JSON.stringify(error)}`);\n\n\t\t\t\t\tthis.setStateChangedAsync(\"info.connection\", false, true);\n\n\t\t\t\t\treject(error);\n\t\t\t\t});\n\t\t});\n\t}\n\n\tprivate async GetCustomerDetails(apiKey: string): Promise<void> {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tnextpollCustomer =\n\t\t\t\tnextpollCustomer ||\n\t\t\t\tthis.setTimeout(() => {\n\t\t\t\t\tnextpollCustomer = null;\n\t\t\t\t\tthis.GetCustomerDetails(apiKey);\n\t\t\t\t}, 60 * 5000);\n\n\t\t\tthis.buildRequest(\"customerdetails.php\", { api_key: this.config.apiKey })\n\t\t\t\t.then(async (response) => {\n\t\t\t\t\tif (response.status === 200) {\n\t\t\t\t\t\tconst content = response.data;\n\n\t\t\t\t\t\tthis.setStateChangedAsync(\"info.connection\", true, true);\n\n\t\t\t\t\t\tfor (const key in content) {\n\t\t\t\t\t\t\tif (key !== \"controllers\") {\n\t\t\t\t\t\t\t\tawait this.setObjectNotExistsAsync(`customer.${key}`, {\n\t\t\t\t\t\t\t\t\ttype: \"state\",\n\t\t\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\t\t\tname: key,\n\t\t\t\t\t\t\t\t\t\ttype: key === \"message\" ? \"string\" : \"number\",\n\t\t\t\t\t\t\t\t\t\trole: key === \"message\" ? \"text\" : \"value\",\n\t\t\t\t\t\t\t\t\t\tread: true,\n\t\t\t\t\t\t\t\t\t\twrite: false,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\tthis.setStateChangedAsync(`customer.${key}`, content[key], true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor (const controller of content.controllers) {\n\t\t\t\t\t\t\tawait this.setObjectNotExistsAsync(`customer.controllers.${controller.name}`, {\n\t\t\t\t\t\t\t\ttype: \"channel\",\n\t\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\t\tname: controller.name,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tfor (const key in controller) {\n\t\t\t\t\t\t\t\tawait this.setObjectNotExistsAsync(`customer.controllers.${controller.name}.${key}`, {\n\t\t\t\t\t\t\t\t\ttype: \"state\",\n\t\t\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\t\t\tname: key,\n\t\t\t\t\t\t\t\t\t\ttype: key !== \"controller_id\" ? \"string\" : \"number\",\n\t\t\t\t\t\t\t\t\t\trole: key !== \"controller_id\" ? \"text\" : \"value\",\n\t\t\t\t\t\t\t\t\t\tread: true,\n\t\t\t\t\t\t\t\t\t\twrite: false,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\tthis.setStateChangedAsync(\n\t\t\t\t\t\t\t\t\t`customer.controllers.${controller.name}.${key}`,\n\t\t\t\t\t\t\t\t\tcontroller[key],\n\t\t\t\t\t\t\t\t\ttrue,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tresolve(response.status);\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tthis.log.debug(`(stats) received error - API is now offline: ${JSON.stringify(error)}`);\n\n\t\t\t\t\tthis.setStateChangedAsync(\"info.connection\", false, true);\n\n\t\t\t\t\treject(error);\n\t\t\t\t});\n\t\t});\n\t}\n\n\tbuildRequest(service: string, params: any): Promise<any> {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst url = `/api/v1/${service}`;\n\t\t\tlet lastErrorCode = 0;\n\n\t\t\tif (params.api_key) {\n\t\t\t\tthis.log.debug(`sending GET request to \"${url}\" with params: ${JSON.stringify(params)}`);\n\n\t\t\t\taxios({\n\t\t\t\t\tmethod: \"GET\",\n\t\t\t\t\tbaseURL: hydrawise_url,\n\t\t\t\t\turl: url,\n\t\t\t\t\ttimeout: 3000,\n\t\t\t\t\tresponseType: \"json\",\n\t\t\t\t\tparams: params,\n\t\t\t\t})\n\t\t\t\t\t.then((response) => {\n\t\t\t\t\t\tthis.log.debug(\n\t\t\t\t\t\t\t`received ${response.status} response from \"${url}\" with content: ${JSON.stringify(\n\t\t\t\t\t\t\t\tresponse.data,\n\t\t\t\t\t\t\t)}`,\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// no error - clear up reminder\n\t\t\t\t\t\tlastErrorCode = 0;\n\n\t\t\t\t\t\tresolve(response);\n\t\t\t\t\t})\n\t\t\t\t\t.catch((error) => {\n\t\t\t\t\t\tif (error.response) {\n\t\t\t\t\t\t\t// The request was made and the server responded with a status code\n\n\t\t\t\t\t\t\tthis.log.warn(\n\t\t\t\t\t\t\t\t`received ${error.response.status} response from ${url} with content: ${JSON.stringify(\n\t\t\t\t\t\t\t\t\terror.response.data,\n\t\t\t\t\t\t\t\t)}`,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else if (error.request) {\n\t\t\t\t\t\t\t// The request was made but no response was received\n\t\t\t\t\t\t\t// `error.request` is an instance of XMLHttpRequest in the browser and an instance of\n\t\t\t\t\t\t\t// http.ClientRequest in node.js\n\n\t\t\t\t\t\t\t// avoid spamming of the same error when stuck in a reconnection loop\n\t\t\t\t\t\t\tif (error.code === lastErrorCode) {\n\t\t\t\t\t\t\t\tthis.log.debug(error.message);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.log.info(`error ${error.code} from ${url}: ${error.message}`);\n\t\t\t\t\t\t\t\tlastErrorCode = error.code;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Something happened in setting up the request that triggered an Error\n\t\t\t\t\t\t\tthis.log.error(error.message);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treject(error);\n\t\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(\"Device IP is not configured\");\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Is called when adapter shuts down - callback has to be called under any circumstances!\n\t */\n\tprivate onUnload(callback: () => void): void {\n\t\ttry {\n\t\t\tclearTimeout(nextpollSchedule);\n\t\t\tclearTimeout(nextpollCustomer);\n\n\t\t\tcallback();\n\t\t} catch (e) {\n\t\t\tcallback();\n\t\t}\n\t}\n\n\t/**\n\t * Is called if a subscribed state changes\n\t */\n\tprivate onStateChange(id: string, state: ioBroker.State | null | undefined): void {\n\t\tif (state) {\n\t\t\tconsole.log(\"state\", state);\n\n\t\t\t// The state was changed\n\t\t\tthis.log.info(`state ${id} changed: ${state.val} (ack = ${state.ack})`);\n\n\t\t\tif (id.indexOf(\"stopall\") !== -1) {\n\t\t\t\tthis.buildRequest(\"setzone.php\", { api_key: this.config.apiKey, action: \"stopall\" });\n\t\t\t} else if (id.indexOf(\"stop\") !== -1) {\n\t\t\t\tconst relay = id.match(/.*schedule\\.(.*)\\.stopZone/);\n\n\t\t\t\tif (relay && relay?.length > 1) {\n\t\t\t\t\tthis.buildRequest(\"setzone.php\", {\n\t\t\t\t\t\tapi_key: this.config.apiKey,\n\t\t\t\t\t\taction: \"stop\",\n\t\t\t\t\t\trelay_id: RELAYS[relay[1]],\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (id.indexOf(\"runall\") !== -1 && (state.val || state.val === 0)) {\n\t\t\t\tthis.buildRequest(\"setzone.php\", {\n\t\t\t\t\tapi_key: this.config.apiKey,\n\t\t\t\t\taction: \"runall\",\n\t\t\t\t\tperiod_id: 999,\n\t\t\t\t\tcustom: state.val,\n\t\t\t\t});\n\t\t\t} else if (id.indexOf(\"run\") !== -1 && (state.val || state.val === 0)) {\n\t\t\t\tconst relay = id.match(/.*schedule\\.(.*)\\.runZone/);\n\n\t\t\t\tif (relay && relay?.length > 1) {\n\t\t\t\t\tthis.buildRequest(\"setzone.php\", {\n\t\t\t\t\t\tapi_key: this.config.apiKey,\n\t\t\t\t\t\taction: \"run\",\n\t\t\t\t\t\tperiod_id: 999,\n\t\t\t\t\t\tcustom: state.val,\n\t\t\t\t\t\trelay_id: RELAYS[relay[1]],\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (id.indexOf(\"suspendall\") !== -1 && (state.val || state.val === 0)) {\n\t\t\t\tconst num = state.val as number;\n\n\t\t\t\tthis.buildRequest(\"setzone.php\", {\n\t\t\t\t\tapi_key: this.config.apiKey,\n\t\t\t\t\taction: \"suspendall\",\n\t\t\t\t\tperiod_id: 999,\n\t\t\t\t\tcustom: Math.trunc((state.ts + num) / 1000),\n\t\t\t\t});\n\t\t\t} else if (id.indexOf(\"suspend\") !== -1 && (state.val || state.val === 0)) {\n\t\t\t\tconst num = state.val as number;\n\t\t\t\tconst relay = id.match(/.*schedule\\.(.*)\\.suspendZone/);\n\n\t\t\t\tif (relay && relay?.length > 1) {\n\t\t\t\t\tthis.buildRequest(\"setzone.php\", {\n\t\t\t\t\t\tapi_key: this.config.apiKey,\n\t\t\t\t\t\taction: \"suspend\",\n\t\t\t\t\t\tperiod_id: 999,\n\t\t\t\t\t\tcustom: Math.trunc((state.ts + num) / 1000),\n\t\t\t\t\t\trelay_id: RELAYS[relay[1]],\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// The state was deleted\n\t\t\tthis.log.info(`state ${id} deleted`);\n\t\t}\n\t}\n}\n\nif (require.main !== module) {\n\t// Export the constructor in compact mode\n\tmodule.exports = (options: Partial<utils.AdapterOptions> | undefined) => new Hydrawise(options);\n} else {\n\t// otherwise start the instance directly\n\t(() => new Hydrawise())();\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAMA,YAAuB;AACvB,mBAAkB;AAElB,MAAM,gBAAgB;AACtB,IAAI,mBAAwB;AAC5B,IAAI,mBAAwB;AAC5B,MAAM,SAAc;AAEpB,MAAM,kBAAkB,MAAM,QAAQ;AAAA,EAC9B,YAAY,UAAyC,CAAC,GAAG;AAC/D,UAAM;AAAA,MACL,GAAG;AAAA,MACH,MAAM;AAAA,IACP,CAAC;AAED,SAAK,GAAG,SAAS,KAAK,QAAQ,KAAK,IAAI,CAAC;AACxC,SAAK,GAAG,eAAe,KAAK,cAAc,KAAK,IAAI,CAAC;AACpD,SAAK,GAAG,UAAU,KAAK,SAAS,KAAK,IAAI,CAAC;AAAA,EAC3C;AAAA,EAEA,MAAc,UAAyB;AACtC,QAAI,CAAC,KAAK,OAAO,QAAQ;AACxB,WAAK,IAAI,MAAM,sBAAsB;AAAA,IACtC,OAAO;AACN,WAAK,IAAI,KAAK,oBAAoB,KAAK,OAAO,MAAM;AAEpD,WAAK,qBAAqB,mBAAmB,OAAO,IAAI;AAExD,YAAM,KAAK,kBAAkB,KAAK,OAAO,MAAM;AAE/C,YAAM,KAAK,mBAAmB,KAAK,OAAO,MAAM;AAEhD,YAAM,KAAK,qBAAqB,GAAG;AAAA,IACpC;AAAA,EACD;AAAA,EAEA,MAAc,kBAAkB,QAA+B;AAC9D,WAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACvC,yBACC,oBACA,KAAK,WAAW,MAAM;AACrB,2BAAmB;AACnB,aAAK,kBAAkB,MAAM;AAAA,MAC9B,GAAG,GAAK;AAET,WAAK,aAAa,sBAAsB,EAAE,SAAS,KAAK,OAAO,OAAO,CAAC,EACrE,KAAK,OAAO,aAAa;AACzB,YAAI,SAAS,WAAW,KAAK;AAC5B,gBAAM,UAAU,SAAS;AAEzB,eAAK,qBAAqB,mBAAmB,MAAM,IAAI;AAEvD,gBAAM,KAAK,wBAAwB,oBAAoB;AAAA,YACtD,MAAM;AAAA,YACN,QAAQ;AAAA,cACP,MAAM;AAAA,
|
|
4
|
+
"sourcesContent": ["/*\n * Created with @iobroker/create-adapter v2.3.0\n */\n\n// The adapter-core module gives you access to the core ioBroker functions\n// you need to create an adapter\nimport * as utils from \"@iobroker/adapter-core\";\nimport axios from \"axios\";\n\nconst hydrawise_url = \"https://api.hydrawise.com\";\nlet nextpollSchedule: any = null;\nlet nextpollCustomer: any = null;\nconst RELAYS: any = Object;\n\nclass Hydrawise extends utils.Adapter {\n\tpublic constructor(options: Partial<utils.AdapterOptions> = {}) {\n\t\tsuper({\n\t\t\t...options,\n\t\t\tname: \"hydrawise\",\n\t\t});\n\n\t\tthis.on(\"ready\", this.onReady.bind(this));\n\t\tthis.on(\"stateChange\", this.onStateChange.bind(this));\n\t\tthis.on(\"unload\", this.onUnload.bind(this));\n\t}\n\n\tprivate async onReady(): Promise<void> {\n\t\tif (!this.config.apiKey) {\n\t\t\tthis.log.error(\"No API-Key definded!\");\n\t\t} else {\n\t\t\tthis.log.info(\"config apiKey: \" + this.config.apiKey);\n\n\t\t\tthis.setStateChangedAsync(\"info.connection\", false, true);\n\n\t\t\tawait this.GetStatusSchedule(this.config.apiKey);\n\n\t\t\tawait this.GetCustomerDetails(this.config.apiKey);\n\n\t\t\tawait this.subscribeStatesAsync(\"*\");\n\t\t}\n\t}\n\n\tprivate async GetStatusSchedule(apiKey: string): Promise<void> {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tnextpollSchedule =\n\t\t\t\tnextpollSchedule ||\n\t\t\t\tthis.setTimeout(() => {\n\t\t\t\t\tnextpollSchedule = null;\n\t\t\t\t\tthis.GetStatusSchedule(apiKey);\n\t\t\t\t}, 60000);\n\n\t\t\tthis.buildRequest(\"statusschedule.php\", { api_key: this.config.apiKey })\n\t\t\t\t.then(async (response) => {\n\t\t\t\t\tif (response.status === 200) {\n\t\t\t\t\t\tconst content = response.data;\n\n\t\t\t\t\t\tthis.setStateChangedAsync(\"info.connection\", true, true);\n\n\t\t\t\t\t\tawait this.setObjectNotExistsAsync(\"schedule.stopall\", {\n\t\t\t\t\t\t\ttype: \"state\",\n\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\tname: {\n\t\t\t\t\t\t\t\t\ten: \"stop all zones\",\n\t\t\t\t\t\t\t\t\tde: \"alle Zonen stoppen\",\n\t\t\t\t\t\t\t\t\tru: \"\u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0432\u0441\u0435 \u0437\u043E\u043D\u044B\",\n\t\t\t\t\t\t\t\t\tpt: \"parar todas as zonas\",\n\t\t\t\t\t\t\t\t\tnl: \"stop alle zones\",\n\t\t\t\t\t\t\t\t\tfr: \"arr\u00EAter toutes les zones\",\n\t\t\t\t\t\t\t\t\tit: \"fermare tutte le zone\",\n\t\t\t\t\t\t\t\t\tes: \"detener todas las zonas\",\n\t\t\t\t\t\t\t\t\tpl: \"zatrzymuj\u0105 wszystkie strefy\",\n\t\t\t\t\t\t\t\t\tuk: \"\u0437\u0443\u043F\u0438\u043D\u0438\u0442\u0438 \u0432\u0441\u0456 \u0437\u043E\u043D\u0438\",\n\t\t\t\t\t\t\t\t\t\"zh-cn\": \"\u505C\u6B62\u6240\u6709\u5730\u533A\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\ttype: \"boolean\",\n\t\t\t\t\t\t\t\trole: \"button\",\n\t\t\t\t\t\t\t\tread: false,\n\t\t\t\t\t\t\t\twrite: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tawait this.setObjectNotExistsAsync(\"schedule.runall\", {\n\t\t\t\t\t\t\ttype: \"state\",\n\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\tname: {\n\t\t\t\t\t\t\t\t\ten: \"run all zones for x seconds\",\n\t\t\t\t\t\t\t\t\tde: \"alle Zonen f\u00FCr x Sekunden ausf\u00FChren\",\n\t\t\t\t\t\t\t\t\tru: \"\u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C \u0432\u0441\u0435 \u0437\u043E\u043D\u044B \u0437\u0430 x \u0441\u0435\u043A\u0443\u043D\u0434\u044B\",\n\t\t\t\t\t\t\t\t\tpt: \"executar todas as zonas por x segundos\",\n\t\t\t\t\t\t\t\t\tnl: \"ren alle zones voor x seconden\",\n\t\t\t\t\t\t\t\t\tfr: \"ex\u00E9cuter toutes les zones pendant x secondes\",\n\t\t\t\t\t\t\t\t\tit: \"eseguire tutte le zone per x secondi\",\n\t\t\t\t\t\t\t\t\tes: \"ejecutar todas las zonas durante x segundos\",\n\t\t\t\t\t\t\t\t\tpl: \"wszystkie strefy startuj\u0105 dla x sekundy\",\n\t\t\t\t\t\t\t\t\tuk: \"\u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u0438 \u0432\u0441\u0456 \u0437\u043E\u043D\u0438 \u0434\u043B\u044F x \u0441\u0435\u043A\u0443\u043D\u0434\",\n\t\t\t\t\t\t\t\t\t\"zh-cn\": \"\u8DD1\u9053\u533A\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t\trole: \"value\",\n\t\t\t\t\t\t\t\tunit: \"seconds\",\n\t\t\t\t\t\t\t\tread: false,\n\t\t\t\t\t\t\t\twrite: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tawait this.setObjectNotExistsAsync(\"schedule.suspendall\", {\n\t\t\t\t\t\t\ttype: \"state\",\n\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\tname: {\n\t\t\t\t\t\t\t\t\ten: \"suspend all zones for x seconds\",\n\t\t\t\t\t\t\t\t\tde: \"alle Zonen f\u00FCr x Sekunden aussetzen\",\n\t\t\t\t\t\t\t\t\tru: \"\u043F\u0440\u0438\u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0432\u0441\u0435 \u0437\u043E\u043D\u044B \u0437\u0430 x \u0441\u0435\u043A\u0443\u043D\u0434\u044B\",\n\t\t\t\t\t\t\t\t\tpt: \"suspender todas as zonas por x segundos\",\n\t\t\t\t\t\t\t\t\tnl: \"vertaling:\",\n\t\t\t\t\t\t\t\t\tfr: \"suspendre toutes les zones pendant x secondes\",\n\t\t\t\t\t\t\t\t\tit: \"sospendere tutte le zone per x secondi\",\n\t\t\t\t\t\t\t\t\tes: \"suspender todas las zonas durante x segundos\",\n\t\t\t\t\t\t\t\t\tpl: \"wszystkie strefy zawieszenia dla x sekundy\",\n\t\t\t\t\t\t\t\t\tuk: \"\u043F\u0440\u0438\u0437\u0443\u043F\u0438\u043D\u0438\u0442\u0438 \u0432\u0441\u0456 \u0437\u043E\u043D\u0438 \u043D\u0430 x \u0441\u0435\u043A\u0443\u043D\u0434\",\n\t\t\t\t\t\t\t\t\t\"zh-cn\": \"\u505C\u6B62\u6240\u6709\u00D7\u4E8C\u533A\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t\trole: \"value\",\n\t\t\t\t\t\t\t\tread: false,\n\t\t\t\t\t\t\t\twrite: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tfor (const key in content) {\n\t\t\t\t\t\t\tif (key !== \"relays\" && key !== \"sensors\" && key !== \"expanders\") {\n\t\t\t\t\t\t\t\tawait this.setObjectNotExistsAsync(`schedule.${key}`, {\n\t\t\t\t\t\t\t\t\ttype: \"state\",\n\t\t\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\t\t\tname: key,\n\t\t\t\t\t\t\t\t\t\ttype: key === \"message\" ? \"string\" : \"number\",\n\t\t\t\t\t\t\t\t\t\trole: key === \"message\" ? \"text\" : \"value\",\n\t\t\t\t\t\t\t\t\t\tread: true,\n\t\t\t\t\t\t\t\t\t\twrite: false,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\tthis.setStateChangedAsync(`schedule.${key}`, content[key], true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor (const relay of content.relays) {\n\t\t\t\t\t\t\tawait this.setObjectNotExistsAsync(`schedule.${relay.name}`, {\n\t\t\t\t\t\t\t\ttype: \"channel\",\n\t\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\t\tname: relay.name,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tRELAYS[relay.name] = relay.relay_id;\n\n\t\t\t\t\t\t\tfor (const key in relay) {\n\t\t\t\t\t\t\t\tawait this.setObjectNotExistsAsync(`schedule.${relay.name}.${key}`, {\n\t\t\t\t\t\t\t\t\ttype: \"state\",\n\t\t\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\t\t\tname: key,\n\t\t\t\t\t\t\t\t\t\ttype: key === \"name\" ? \"string\" : \"number\",\n\t\t\t\t\t\t\t\t\t\trole: key === \"name\" ? \"text\" : \"value\",\n\t\t\t\t\t\t\t\t\t\tread: true,\n\t\t\t\t\t\t\t\t\t\twrite: false,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\tthis.setStateChangedAsync(`schedule.${relay.name}.${key}`, relay[key], true);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tawait this.setObjectNotExistsAsync(`schedule.${relay.name}.stopZone`, {\n\t\t\t\t\t\t\t\ttype: \"state\",\n\t\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\t\tname: {\n\t\t\t\t\t\t\t\t\t\ten: \"stop zone\",\n\t\t\t\t\t\t\t\t\t\tde: \"Zone stoppen\",\n\t\t\t\t\t\t\t\t\t\tru: \"\u0437\u043E\u043D\u0430 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0438\",\n\t\t\t\t\t\t\t\t\t\tpt: \"zona de paragem\",\n\t\t\t\t\t\t\t\t\t\tnl: \"stop zone\",\n\t\t\t\t\t\t\t\t\t\tfr: \"zone d ' arr\u00EAt\",\n\t\t\t\t\t\t\t\t\t\tit: \"zona di sosta\",\n\t\t\t\t\t\t\t\t\t\tes: \"zona de parada\",\n\t\t\t\t\t\t\t\t\t\tpl: \"strefa stopu\",\n\t\t\t\t\t\t\t\t\t\tuk: \"\u0437\u043E\u043D\u0430 \u0437\u0443\u043F\u0438\u043D\u043A\u0438\",\n\t\t\t\t\t\t\t\t\t\t\"zh-cn\": \"\u505C\u6B62\u5730\u533A\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\ttype: \"boolean\",\n\t\t\t\t\t\t\t\t\trole: \"button\",\n\t\t\t\t\t\t\t\t\tread: false,\n\t\t\t\t\t\t\t\t\twrite: true,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tawait this.setObjectNotExistsAsync(`schedule.${relay.name}.runZone`, {\n\t\t\t\t\t\t\t\ttype: \"state\",\n\t\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\t\tname: {\n\t\t\t\t\t\t\t\t\t\ten: \"run zone for x seconds\",\n\t\t\t\t\t\t\t\t\t\tde: \"Zone f\u00FCr x Sekunden starten\",\n\t\t\t\t\t\t\t\t\t\tru: \"\u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C \u0437\u043E\u043D\u0443 \u0437\u0430 x \u0441\u0435\u043A\u0443\u043D\u0434\u044B\",\n\t\t\t\t\t\t\t\t\t\tpt: \"zona de execu\u00E7\u00E3o por x segundos\",\n\t\t\t\t\t\t\t\t\t\tnl: \"ren zone voor x seconden\",\n\t\t\t\t\t\t\t\t\t\tfr: \"zone de course pour x secondes\",\n\t\t\t\t\t\t\t\t\t\tit: \"zona di corsa per x secondi\",\n\t\t\t\t\t\t\t\t\t\tes: \"zona de ejecuci\u00F3n por x segundos\",\n\t\t\t\t\t\t\t\t\t\tpl: \"strefa x sekundy\",\n\t\t\t\t\t\t\t\t\t\tuk: \"\u0437\u043E\u043D\u0430 \u0437\u0430\u043F\u0443\u0441\u043A\u0443 \u0434\u043B\u044F x \u0441\u0435\u043A\u0443\u043D\u0434\",\n\t\t\t\t\t\t\t\t\t\t\"zh-cn\": \"\u00D7\u4E8C\u533A\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t\t\trole: \"value\",\n\t\t\t\t\t\t\t\t\tread: false,\n\t\t\t\t\t\t\t\t\twrite: true,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tawait this.setObjectNotExistsAsync(`schedule.${relay.name}.suspendZone`, {\n\t\t\t\t\t\t\t\ttype: \"state\",\n\t\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\t\tname: {\n\t\t\t\t\t\t\t\t\t\ten: \"suspend zone for x seconds\",\n\t\t\t\t\t\t\t\t\t\tde: \"Zone f\u00FCr x Sekunden aussetzen\",\n\t\t\t\t\t\t\t\t\t\tru: \"\u043F\u0440\u0438\u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0437\u043E\u043D\u0443 \u043D\u0430 x \u0441\u0435\u043A\u0443\u043D\u0434\u044B\",\n\t\t\t\t\t\t\t\t\t\tpt: \"zona de suspens\u00E3o por x segundos\",\n\t\t\t\t\t\t\t\t\t\tnl: \"quality over quantity (qoq) releases vertaling:\",\n\t\t\t\t\t\t\t\t\t\tfr: \"zone de suspension pour x secondes\",\n\t\t\t\t\t\t\t\t\t\tit: \"zona di sospensione per x secondi\",\n\t\t\t\t\t\t\t\t\t\tes: \"zona de suspensi\u00F3n por x segundos\",\n\t\t\t\t\t\t\t\t\t\tpl: \"strefa zawies\u0142a na x sekundy\",\n\t\t\t\t\t\t\t\t\t\tuk: \"\u0437\u043E\u043D\u0430 \u043F\u0456\u0434\u0432\u0456\u0441\u043A\u0438 \u0434\u043B\u044F x \u0441\u0435\u043A\u0443\u043D\u0434\",\n\t\t\t\t\t\t\t\t\t\t\"zh-cn\": \"\u505C\u6B62x\u4E8C\u533A\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t\t\trole: \"value\",\n\t\t\t\t\t\t\t\t\tread: false,\n\t\t\t\t\t\t\t\t\twrite: true,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor (const sensor of content.sensors) {\n\t\t\t\t\t\t\tawait this.setObjectNotExistsAsync(`schedule.sensors.${sensor.input}`, {\n\t\t\t\t\t\t\t\ttype: \"channel\",\n\t\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\t\tname: \"sensors\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tfor (const key in sensor) {\n\t\t\t\t\t\t\t\tif (key !== \"relays\") {\n\t\t\t\t\t\t\t\t\tawait this.setObjectNotExistsAsync(`schedule.sensors.${sensor.input}.${key}`, {\n\t\t\t\t\t\t\t\t\t\ttype: \"state\",\n\t\t\t\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\t\t\t\tname: key,\n\t\t\t\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t\t\t\t\trole: \"value\",\n\t\t\t\t\t\t\t\t\t\t\tread: true,\n\t\t\t\t\t\t\t\t\t\t\twrite: false,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\tthis.setStateChangedAsync(\n\t\t\t\t\t\t\t\t\t\t`schedule.sensors.${sensor.input}.${key}`,\n\t\t\t\t\t\t\t\t\t\tsensor[key],\n\t\t\t\t\t\t\t\t\t\ttrue,\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tresolve(response.status);\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tthis.log.debug(`(stats) received error - API is now offline: ${JSON.stringify(error)}`);\n\n\t\t\t\t\tthis.setStateChangedAsync(\"info.connection\", false, true);\n\n\t\t\t\t\treject(error);\n\t\t\t\t});\n\t\t});\n\t}\n\n\tprivate async GetCustomerDetails(apiKey: string): Promise<void> {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tnextpollCustomer =\n\t\t\t\tnextpollCustomer ||\n\t\t\t\tthis.setTimeout(() => {\n\t\t\t\t\tnextpollCustomer = null;\n\t\t\t\t\tthis.GetCustomerDetails(apiKey);\n\t\t\t\t}, 60 * 5000);\n\n\t\t\tthis.buildRequest(\"customerdetails.php\", { api_key: this.config.apiKey })\n\t\t\t\t.then(async (response) => {\n\t\t\t\t\tif (response.status === 200) {\n\t\t\t\t\t\tconst content = response.data;\n\n\t\t\t\t\t\tthis.setStateChangedAsync(\"info.connection\", true, true);\n\n\t\t\t\t\t\tfor (const key in content) {\n\t\t\t\t\t\t\tif (key !== \"controllers\") {\n\t\t\t\t\t\t\t\tawait this.setObjectNotExistsAsync(`customer.${key}`, {\n\t\t\t\t\t\t\t\t\ttype: \"state\",\n\t\t\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\t\t\tname: key,\n\t\t\t\t\t\t\t\t\t\ttype: key === \"message\" ? \"string\" : \"number\",\n\t\t\t\t\t\t\t\t\t\trole: key === \"message\" ? \"text\" : \"value\",\n\t\t\t\t\t\t\t\t\t\tread: true,\n\t\t\t\t\t\t\t\t\t\twrite: false,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\tthis.setStateChangedAsync(`customer.${key}`, content[key], true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor (const controller of content.controllers) {\n\t\t\t\t\t\t\tawait this.setObjectNotExistsAsync(`customer.controllers.${controller.name}`, {\n\t\t\t\t\t\t\t\ttype: \"channel\",\n\t\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\t\tname: controller.name,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tfor (const key in controller) {\n\t\t\t\t\t\t\t\tawait this.setObjectNotExistsAsync(`customer.controllers.${controller.name}.${key}`, {\n\t\t\t\t\t\t\t\t\ttype: \"state\",\n\t\t\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\t\t\tname: key,\n\t\t\t\t\t\t\t\t\t\ttype: key !== \"controller_id\" ? \"string\" : \"number\",\n\t\t\t\t\t\t\t\t\t\trole: key !== \"controller_id\" ? \"text\" : \"value\",\n\t\t\t\t\t\t\t\t\t\tread: true,\n\t\t\t\t\t\t\t\t\t\twrite: false,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\tthis.setStateChangedAsync(\n\t\t\t\t\t\t\t\t\t`customer.controllers.${controller.name}.${key}`,\n\t\t\t\t\t\t\t\t\tcontroller[key],\n\t\t\t\t\t\t\t\t\ttrue,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tresolve(response.status);\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tthis.log.debug(`(stats) received error - API is now offline: ${JSON.stringify(error)}`);\n\n\t\t\t\t\tthis.setStateChangedAsync(\"info.connection\", false, true);\n\n\t\t\t\t\treject(error);\n\t\t\t\t});\n\t\t});\n\t}\n\n\tbuildRequest(service: string, params: any): Promise<any> {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst url = `/api/v1/${service}`;\n\t\t\tlet lastErrorCode = 0;\n\n\t\t\tif (params.api_key) {\n\t\t\t\tthis.log.debug(`sending GET request to \"${url}\" with params: ${JSON.stringify(params)}`);\n\n\t\t\t\taxios({\n\t\t\t\t\tmethod: \"GET\",\n\t\t\t\t\tbaseURL: hydrawise_url,\n\t\t\t\t\turl: url,\n\t\t\t\t\ttimeout: 3000,\n\t\t\t\t\tresponseType: \"json\",\n\t\t\t\t\tparams: params,\n\t\t\t\t})\n\t\t\t\t\t.then((response) => {\n\t\t\t\t\t\tthis.log.debug(\n\t\t\t\t\t\t\t`received ${response.status} response from \"${url}\" with content: ${JSON.stringify(\n\t\t\t\t\t\t\t\tresponse.data,\n\t\t\t\t\t\t\t)}`,\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// no error - clear up reminder\n\t\t\t\t\t\tlastErrorCode = 0;\n\n\t\t\t\t\t\tresolve(response);\n\t\t\t\t\t})\n\t\t\t\t\t.catch((error) => {\n\t\t\t\t\t\tif (error.response) {\n\t\t\t\t\t\t\t// The request was made and the server responded with a status code\n\n\t\t\t\t\t\t\tthis.log.warn(\n\t\t\t\t\t\t\t\t`received ${error.response.status} response from ${url} with content: ${JSON.stringify(\n\t\t\t\t\t\t\t\t\terror.response.data,\n\t\t\t\t\t\t\t\t)}`,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else if (error.request) {\n\t\t\t\t\t\t\t// The request was made but no response was received\n\t\t\t\t\t\t\t// `error.request` is an instance of XMLHttpRequest in the browser and an instance of\n\t\t\t\t\t\t\t// http.ClientRequest in node.js\n\n\t\t\t\t\t\t\t// avoid spamming of the same error when stuck in a reconnection loop\n\t\t\t\t\t\t\tif (error.code === lastErrorCode) {\n\t\t\t\t\t\t\t\tthis.log.debug(error.message);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.log.info(`error ${error.code} from ${url}: ${error.message}`);\n\t\t\t\t\t\t\t\tlastErrorCode = error.code;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Something happened in setting up the request that triggered an Error\n\t\t\t\t\t\t\tthis.log.error(error.message);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treject(error);\n\t\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(\"Device IP is not configured\");\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Is called when adapter shuts down - callback has to be called under any circumstances!\n\t */\n\tprivate onUnload(callback: () => void): void {\n\t\ttry {\n\t\t\tclearTimeout(nextpollSchedule);\n\t\t\tclearTimeout(nextpollCustomer);\n\n\t\t\tcallback();\n\t\t} catch (e) {\n\t\t\tcallback();\n\t\t}\n\t}\n\n\t/**\n\t * Is called if a subscribed state changes\n\t */\n\tprivate onStateChange(id: string, state: ioBroker.State | null | undefined): void {\n\t\tif (state) {\n\t\t\tif (id.indexOf(\"stopall\") !== -1) {\n\t\t\t\tthis.buildRequest(\"setzone.php\", { api_key: this.config.apiKey, action: \"stopall\" });\n\t\t\t} else if (id.indexOf(\"stop\") !== -1) {\n\t\t\t\tconst relay = id.match(/.*schedule\\.(.*)\\.stopZone/);\n\n\t\t\t\tif (relay && relay?.length > 1) {\n\t\t\t\t\tthis.buildRequest(\"setzone.php\", {\n\t\t\t\t\t\tapi_key: this.config.apiKey,\n\t\t\t\t\t\taction: \"stop\",\n\t\t\t\t\t\trelay_id: RELAYS[relay[1]],\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (id.indexOf(\"runall\") !== -1 && (state.val || state.val === 0)) {\n\t\t\t\tthis.buildRequest(\"setzone.php\", {\n\t\t\t\t\tapi_key: this.config.apiKey,\n\t\t\t\t\taction: \"runall\",\n\t\t\t\t\tperiod_id: 999,\n\t\t\t\t\tcustom: state.val,\n\t\t\t\t});\n\t\t\t} else if (id.indexOf(\"run\") !== -1 && (state.val || state.val === 0)) {\n\t\t\t\tconst relay = id.match(/.*schedule\\.(.*)\\.runZone/);\n\n\t\t\t\tif (relay && relay?.length > 1) {\n\t\t\t\t\tthis.buildRequest(\"setzone.php\", {\n\t\t\t\t\t\tapi_key: this.config.apiKey,\n\t\t\t\t\t\taction: \"run\",\n\t\t\t\t\t\tperiod_id: 999,\n\t\t\t\t\t\tcustom: state.val,\n\t\t\t\t\t\trelay_id: RELAYS[relay[1]],\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (id.indexOf(\"suspendall\") !== -1 && (state.val || state.val === 0)) {\n\t\t\t\tconst num = state.val as number;\n\n\t\t\t\tthis.buildRequest(\"setzone.php\", {\n\t\t\t\t\tapi_key: this.config.apiKey,\n\t\t\t\t\taction: \"suspendall\",\n\t\t\t\t\tperiod_id: 999,\n\t\t\t\t\tcustom: Math.trunc((state.ts + num) / 1000),\n\t\t\t\t});\n\t\t\t} else if (id.indexOf(\"suspend\") !== -1 && (state.val || state.val === 0)) {\n\t\t\t\tconst num = state.val as number;\n\t\t\t\tconst relay = id.match(/.*schedule\\.(.*)\\.suspendZone/);\n\n\t\t\t\tif (relay && relay?.length > 1) {\n\t\t\t\t\tthis.buildRequest(\"setzone.php\", {\n\t\t\t\t\t\tapi_key: this.config.apiKey,\n\t\t\t\t\t\taction: \"suspend\",\n\t\t\t\t\t\tperiod_id: 999,\n\t\t\t\t\t\tcustom: Math.trunc((state.ts + num) / 1000),\n\t\t\t\t\t\trelay_id: RELAYS[relay[1]],\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// The state was deleted\n\t\t\tthis.log.info(`state ${id} deleted`);\n\t\t}\n\t}\n}\n\nif (require.main !== module) {\n\t// Export the constructor in compact mode\n\tmodule.exports = (options: Partial<utils.AdapterOptions> | undefined) => new Hydrawise(options);\n} else {\n\t// otherwise start the instance directly\n\t(() => new Hydrawise())();\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAMA,YAAuB;AACvB,mBAAkB;AAElB,MAAM,gBAAgB;AACtB,IAAI,mBAAwB;AAC5B,IAAI,mBAAwB;AAC5B,MAAM,SAAc;AAEpB,MAAM,kBAAkB,MAAM,QAAQ;AAAA,EAC9B,YAAY,UAAyC,CAAC,GAAG;AAC/D,UAAM;AAAA,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OAAO,MAAM,KAAK,OAAO,GAAI;AAAA,YAC1C,UAAU,OAAO,MAAM;AAAA,UACxB,CAAC;AAAA,QACF;AAAA,MACD;AAAA,IACD,OAAO;AAEN,WAAK,IAAI,KAAK,SAAS,YAAY;AAAA,IACpC;AAAA,EACD;AACD;AAEA,IAAI,QAAQ,SAAS,QAAQ;AAE5B,SAAO,UAAU,CAAC,YAAuD,IAAI,UAAU,OAAO;AAC/F,OAAO;AAEN,GAAC,MAAM,IAAI,UAAU,GAAG;AACzB;",
|
|
6
6
|
"names": ["axios"]
|
|
7
7
|
}
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "hydrawise",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.9",
|
|
5
5
|
"news": {
|
|
6
|
+
"0.0.9": {
|
|
7
|
+
"en": "added more translations",
|
|
8
|
+
"de": "weitere übersetzungen",
|
|
9
|
+
"ru": "добавлены больше переводов",
|
|
10
|
+
"pt": "adicionado mais traduções",
|
|
11
|
+
"nl": "vertaling:",
|
|
12
|
+
"fr": "ajouté plus de traductions",
|
|
13
|
+
"it": "aggiunto più traduzioni",
|
|
14
|
+
"es": "añadido más traducciones",
|
|
15
|
+
"pl": "dodano więcej tłumaczeń",
|
|
16
|
+
"uk": "додано більше перекладів",
|
|
17
|
+
"zh-cn": "增加的翻译"
|
|
18
|
+
},
|
|
19
|
+
"0.0.8": {
|
|
20
|
+
"en": "improving log messages",
|
|
21
|
+
"de": "verbesserung der log-nachrichten",
|
|
22
|
+
"ru": "улучшение лог-сообщений",
|
|
23
|
+
"pt": "melhorar as mensagens de log",
|
|
24
|
+
"nl": "het verbeteren van logberichten",
|
|
25
|
+
"fr": "améliorer les messages journaux",
|
|
26
|
+
"it": "migliorare i messaggi di log",
|
|
27
|
+
"es": "mejorar los mensajes de registro",
|
|
28
|
+
"pl": "udoskonalać",
|
|
29
|
+
"uk": "поліпшення повідомлень журналу",
|
|
30
|
+
"zh-cn": "b. 改进信息"
|
|
31
|
+
},
|
|
6
32
|
"0.0.7": {
|
|
7
33
|
"en": "improving log messages",
|
|
8
34
|
"de": "verbesserung der log-nachrichten",
|
|
@@ -67,32 +93,6 @@
|
|
|
67
93
|
"pl": "kontrola strefy",
|
|
68
94
|
"uk": "додано контроль зони",
|
|
69
95
|
"zh-cn": "附加区管制"
|
|
70
|
-
},
|
|
71
|
-
"0.0.2": {
|
|
72
|
-
"en": "Refactoring",
|
|
73
|
-
"de": "Herstellung",
|
|
74
|
-
"ru": "Рефакторинг",
|
|
75
|
-
"pt": "Refactoring",
|
|
76
|
-
"nl": "Refactor",
|
|
77
|
-
"fr": "Refactoring",
|
|
78
|
-
"it": "Refactoring",
|
|
79
|
-
"es": "Refactoring",
|
|
80
|
-
"pl": "Refaktor",
|
|
81
|
-
"uk": "Рефакторинг",
|
|
82
|
-
"zh-cn": "评 注"
|
|
83
|
-
},
|
|
84
|
-
"0.0.1": {
|
|
85
|
-
"en": "initial release",
|
|
86
|
-
"de": "Erstveröffentlichung",
|
|
87
|
-
"ru": "Начальная версия",
|
|
88
|
-
"pt": "lançamento inicial",
|
|
89
|
-
"nl": "Eerste uitgave",
|
|
90
|
-
"fr": "Première version",
|
|
91
|
-
"it": "Versione iniziale",
|
|
92
|
-
"es": "Versión inicial",
|
|
93
|
-
"pl": "Pierwsze wydanie",
|
|
94
|
-
"uk": "початковий реліз",
|
|
95
|
-
"zh-cn": "首次出版"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|