iobroker.sprinklecontrol 1.0.1 → 1.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/io-package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "sprinklecontrol",
4
- "version": "1.0.1",
4
+ "version": "1.0.3",
5
5
  "titleLang": {
6
6
  "en": "Sprinkler Control",
7
7
  "de": "Sprinklersteuerung",
@@ -19,6 +19,32 @@
19
19
  "Dirk Peter <dirk.peter@freenet.de>"
20
20
  ],
21
21
  "news": {
22
+ "1.0.3": {
23
+ "en": "Pressure relief valve added after irrigation.",
24
+ "de": "Druckentlastungsventil nach Bewässerung hinzugefügt.",
25
+ "ru": "Клапан сброса давления добавляют после орошения.",
26
+ "pt": "Válvula de alívio de pressão adicionada após irrigação.",
27
+ "nl": "Overdrukklep toegevoegd na irrigatie.",
28
+ "fr": "Vanne de décompression ajoutée après irrigation.",
29
+ "it": "Valvola di pressione aggiunta dopo l'irrigazione.",
30
+ "es": "Válvula de alivio de presión añadido después del riego.",
31
+ "pl": "Ciśnienie zaworu nadmiarowego dodane po nawadnianiu.",
32
+ "uk": "Клапан для зняття тиску додається після поливу.",
33
+ "zh-cn": "灌溉后增加了减压阀."
34
+ },
35
+ "1.0.2": {
36
+ "en": "Added times for the irrigation ban",
37
+ "de": "Zusätzliche Zeiten für das Bewässerungsverbot",
38
+ "ru": "Добавлено время для запрета ирригации",
39
+ "pt": "Tempos adicionais para a proibição da irrigação",
40
+ "nl": "Toegevoegde tijden voor het irrigatieverbod",
41
+ "fr": "Ajout de temps pour l'interdiction d'irrigation",
42
+ "it": "Aggiunti i tempi per il divieto di irrigazione",
43
+ "es": "Tiempos adicionales para la prohibición de riego",
44
+ "pl": "Dodano czasy zakazu nawadniania",
45
+ "uk": "Додані часи для поливу заборони",
46
+ "zh-cn": "灌溉禁令增加的时间"
47
+ },
22
48
  "1.0.1": {
23
49
  "en": "Add Homematic ON_TIME\nAdapter configuration revised\nioBroker-Bot [E4041], [E4043] completed",
24
50
  "de": "Homematic ON TIME hinzufügen\nAdapterkonfiguration überarbeitet\nioBroker-Bot [E4041], [E4043] abgeschlossen",
@@ -83,19 +109,6 @@
83
109
  "pl": "Skorygowany czas zaworu",
84
110
  "uk": "Терміни клапана, виправлені",
85
111
  "zh-cn": "阀门时间得到纠正"
86
- },
87
- "0.2.16": {
88
- "en": "issue #95 Pump lead time added",
89
- "de": "ausgabe #95 Pumpe Lieferzeit hinzugefügt",
90
- "ru": "#95 Время работы насоса добавлено",
91
- "pt": "número de edição #95 Tempo de lançamento da bomba adicionado",
92
- "nl": "nummer #95 Pump doorlooptijd toegevoegd",
93
- "fr": "numéro 95 Temps d'avance de la pompe ajouté",
94
- "it": "numero #95 Pump lead time aggiunto",
95
- "es": "#95 Tiempo de inicio de bomba añadido",
96
- "pl": "wydanie # 95 Dodany czas ołowiu pompy",
97
- "uk": "problem #95 Насос додано час",
98
- "zh-cn": "增加了泵前准备时间"
99
112
  }
100
113
  },
101
114
  "desc": {
@@ -157,6 +170,7 @@
157
170
  "triggerControlVoltage": "",
158
171
  "maximumParallelValves": "5",
159
172
  "switchingDistance": "0.5",
173
+ "pressureRelief": false,
160
174
  "pumpSelection": "mainPump",
161
175
  "triggerMainPump": "hm-rpc.0.MEQ1234567.1.STATE",
162
176
  "triggerMainPumpPower": "2000",
@@ -174,6 +188,9 @@
174
188
  "triggerAddStartTimeETpCur": "3.5",
175
189
  "triggerAddStartTimeETpToday": "30",
176
190
  "addWateringStartTime": "18:00",
191
+ "enableTimeBasedRestriction": false,
192
+ "startOfInterruption": "10:00",
193
+ "endOfInterruption": "18:00",
177
194
  "publicWeekend": true,
178
195
  "weekEndLiving": "07:30",
179
196
  "publicHolidays": false,
@@ -3,8 +3,7 @@
3
3
  info: log aufbau evaporation.js: #3.*
4
4
  */
5
5
  const myConfig = require('./myConfig.js'); // myConfig → Speichern und abrufen von Konfigurationsdaten der Ventile
6
- const formatTime = require('./tools').formatTime; // tools => laden von Hilfsfunktionen
7
- const trend = require('./tools').trend; // tools => laden von Hilfsfunktionen
6
+ const tools = require('./tools').tools; // tools => laden von Hilfsfunktionen
8
7
 
9
8
  let adapter;
10
9
 
@@ -90,7 +89,7 @@ const ExtraTerStrTab = {
90
89
  * anhand der Tabelle "ExtraTerStrTab"
91
90
  */
92
91
  function extraTerStr () { // latitude Breitengrad
93
- const dayNr = formatTime().dayNr;
92
+ const dayNr = tools.formatTime().dayNr;
94
93
  /**
95
94
  * - unterer Tabellenwert der Latitude
96
95
  */
@@ -115,15 +114,15 @@ function extraTerStr () { // latitude Breitengrad
115
114
  }
116
115
  }
117
116
 
118
- toDayExtraTerStr = trend(
117
+ toDayExtraTerStr = tools.trend(
119
118
  lowerLatitude,
120
119
  upperLatitude,
121
- trend(ExtraTerStrTab.Tag[currentMonth], ExtraTerStrTab.Tag[followMonth], ExtraTerStrTab[lowerLatitude.toString()][currentMonth], ExtraTerStrTab[lowerLatitude.toString()][followMonth], dayNr),
122
- trend(ExtraTerStrTab.Tag[currentMonth], ExtraTerStrTab.Tag[followMonth], ExtraTerStrTab[upperLatitude.toString()][currentMonth], ExtraTerStrTab[upperLatitude.toString()][followMonth], dayNr),
120
+ tools.trend(ExtraTerStrTab.Tag[currentMonth], ExtraTerStrTab.Tag[followMonth], ExtraTerStrTab[lowerLatitude.toString()][currentMonth], ExtraTerStrTab[lowerLatitude.toString()][followMonth], dayNr),
121
+ tools.trend(ExtraTerStrTab.Tag[currentMonth], ExtraTerStrTab.Tag[followMonth], ExtraTerStrTab[upperLatitude.toString()][currentMonth], ExtraTerStrTab[upperLatitude.toString()][followMonth], dayNr),
123
122
  +adapter.config.latitude
124
123
  );
125
124
 
126
- minExtraTerStr = trend(
125
+ minExtraTerStr = tools.trend(
127
126
  lowerLatitude,
128
127
  upperLatitude,
129
128
  ExtraTerStrTab[lowerLatitude.toString()][11], //alter Wert 11
@@ -131,7 +130,7 @@ function extraTerStr () { // latitude Breitengrad
131
130
  +adapter.config.latitude
132
131
  );
133
132
 
134
- maxExtraTerStr = trend(
133
+ maxExtraTerStr = tools.trend(
135
134
  lowerLatitude,
136
135
  upperLatitude,
137
136
  ExtraTerStrTab[lowerLatitude.toString()][5],
@@ -474,11 +473,11 @@ const evaporation = {
474
473
  if (ETpTodayNum < 136) { // 16. Mai
475
474
  return 1;
476
475
  }else if (ETpTodayNum < 171) { // 20. Juni
477
- return trend(136, 170,1, maxExtension / 100, ETpTodayNum);
476
+ return tools.trend(136, 170,1, maxExtension / 100, ETpTodayNum);
478
477
  } else if (ETpTodayNum < 186) { // 5. Juli
479
478
  return maxExtension / 100;
480
479
  }else if (ETpTodayNum < 241) { // 29. August
481
- return trend(186, 240,maxExtension / 100, 1, ETpTodayNum);
480
+ return tools.trend(186, 240,maxExtension / 100, 1, ETpTodayNum);
482
481
  }else {
483
482
  return 1;
484
483
  }
package/lib/myConfig.js CHANGED
@@ -4,9 +4,7 @@
4
4
  /*
5
5
  info: log aufbau myConfig.js: #1.*
6
6
  */
7
- const trend = require('./tools').trend; // tools => laden von Hilfsfunktionen
8
- const formatTime = require('./tools').formatTime; // tools => laden von Hilfsfunktionen
9
- const idStateControl = require('./tools').idStateControl; // tools => laden der Hilfsfunktionen idStateControl
7
+ const tools = require('./tools').tools; // tools => laden von Hilfsfunktionen
10
8
 
11
9
  /**
12
10
  * The adapter instance
@@ -134,7 +132,7 @@ const myConfig = {
134
132
  }
135
133
 
136
134
  // abonnieren der Statusänderungen des Objekts (reagiert auf Änderung des 'Ventils' der einzelnen Bewässerungskreise zur Fehlerkontrolle bzw. Verbrauchsermittlung)
137
- newEntry.control = await idStateControl(adapter, res.name);
135
+ newEntry.control = await tools.idStateControl(adapter, res.name);
138
136
 
139
137
  /* Abonnieren der Statusänderungen des Objekts (reagieren auf Änderung des 'Ventils'
140
138
  der einzelnen Bewässerungskreise zur Fehlerkontrolle bzw. Verbrauchsermittlung) */
@@ -256,7 +254,7 @@ const myConfig = {
256
254
  myVal = newVal;
257
255
  }
258
256
 
259
- myConfig.config[mySprinkleID].analog.pct = Math.round(10 * trend(myConfig.config[mySprinkleID].analog.analogZPct, myConfig.config[mySprinkleID].analog.analogOHPct, 0, 100, myVal)) / 10;
257
+ myConfig.config[mySprinkleID].analog.pct = Math.round(10 * tools.trend(myConfig.config[mySprinkleID].analog.analogZPct, myConfig.config[mySprinkleID].analog.analogOHPct, 0, 100, myVal)) / 10;
260
258
  adapter.setState(`sprinkle.${ [myConfig.config[mySprinkleID].objectName] }.actualSoilMoisture`, {
261
259
  val: myConfig.config[mySprinkleID].analog.pct,
262
260
  ack: true
@@ -293,7 +291,7 @@ const myConfig = {
293
291
  if (myConfig.config[mySprinkleID].fixDay.startDay === 'threeRd' || // Next Start in 3 Tagen
294
292
  myConfig.config[mySprinkleID].fixDay.startDay === 'twoNd') { // Next Start in 2 Tagen
295
293
  try {
296
- const today = await formatTime().day;
294
+ const today = await tools.formatTime().day;
297
295
  const id = `${adapter.namespace}.sprinkle.${myConfig.config[mySprinkleID].objectName}.actualSoilMoisture`;
298
296
  let curDay, nextDay;
299
297
  /** Wert von actualSoilMoisture auslesen */