iobroker.flowers 0.2.8 → 0.2.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 CHANGED
@@ -57,30 +57,34 @@ And under `flowers.X`:
57
57
 
58
58
  ## Changelog
59
59
 
60
- ### 0.2.8 (2026-03-21)
61
- * (sadam6752-tech) Added sendWeeklyReport button for manual weekly report trigger
62
- * (sadam6752-tech) Fixed repochecker issues: grid values, dependencies
63
-
64
- ### 0.2.7 (2026-03-21)
65
- * (sadam6752-tech) Fixed weekly report header; separated daily/weekly report logic
66
-
67
- ### 0.2.6 (2026-03-21)
68
- * (sadam6752-tech) Added dividers to daily/weekly report format
69
-
70
- ### 0.2.5 (2026-03-21)
71
- * (sadam6752-tech) Added sendDailyReport button for manual report trigger
72
-
73
- ### 0.2.4 (2026-03-21)
74
- * (sadam6752-tech) Fixed Profiles tab causing dirty state on open
75
-
76
- ### 0.2.3 (2026-03-21)
77
- * (sadam6752-tech) Increased Bat Min column width; allow empty threshold fields
78
-
79
- ### 0.2.2 (2026-03-21)
80
- * (sadam6752-tech) Allow empty threshold fields - profile values used as fallback
81
-
82
- ### 0.2.0 (2026-03-21)
83
- * (sadam6752-tech) Added 4 new plant profiles; translations for all 11 languages
60
+ ### 0.2.9 (2026-03-22)
61
+ - (sadam6752-tech) Automatic watering support: sensorWatering column, wateringDuration setting
62
+ - (sadam6752-tech) Fixed checkbox column width; increased battery sensor column width
63
+
64
+ ### 0.2.8 (2026-03-21)
65
+ * (sadam6752-tech) Added sendWeeklyReport button for manual weekly report trigger
66
+ * (sadam6752-tech) Fixed repochecker issues: grid values, dependencies
67
+
68
+ ### 0.2.7 (2026-03-21)
69
+ * (sadam6752-tech) Fixed weekly report header; separated daily/weekly report logic
70
+
71
+ ### 0.2.6 (2026-03-21)
72
+ * (sadam6752-tech) Added dividers to daily/weekly report format
73
+
74
+ ### 0.2.5 (2026-03-21)
75
+ * (sadam6752-tech) Added sendDailyReport button for manual report trigger
76
+
77
+ ### 0.2.4 (2026-03-21)
78
+ * (sadam6752-tech) Fixed Profiles tab causing dirty state on open
79
+
80
+ ### 0.2.3 (2026-03-21)
81
+ * (sadam6752-tech) Increased Bat Min column width; allow empty threshold fields
82
+
83
+ ### 0.2.2 (2026-03-21)
84
+ * (sadam6752-tech) Allow empty threshold fields - profile values used as fallback
85
+
86
+ ### 0.2.0 (2026-03-21)
87
+ * (sadam6752-tech) Added 4 new plant profiles; translations for all 11 languages
84
88
  ### 0.1.0 (2026-03-21)
85
89
  - Initial release: plant monitoring with Telegram notifications, configurable thresholds, night mode and periodic reports
86
90
 
@@ -53,5 +53,8 @@
53
53
  "Coffea arabica": "Coffea arabica",
54
54
  "Rhapis excelsa": "Rhapis excelsa",
55
55
  "Calathea zebrina": "Calathea zebrina",
56
- "Sansevieria Laurentii": "Sansevieria Laurentii"
56
+ "Sansevieria Laurentii": "Sansevieria Laurentii",
57
+ "Automatic Watering": "Automatische Bewässerung",
58
+ "Watering Duration (min)": "Bewässerungszeit (Min.)",
59
+ "Watering": "Bewässerung"
57
60
  }
@@ -53,5 +53,8 @@
53
53
  "Coffea arabica": "Coffea arabica",
54
54
  "Rhapis excelsa": "Rhapis excelsa",
55
55
  "Calathea zebrina": "Calathea zebrina",
56
- "Sansevieria Laurentii": "Sansevieria Laurentii"
56
+ "Sansevieria Laurentii": "Sansevieria Laurentii",
57
+ "Automatic Watering": "Automatic Watering",
58
+ "Watering Duration (min)": "Watering Duration (min)",
59
+ "Watering": "Watering"
57
60
  }
@@ -53,5 +53,8 @@
53
53
  "Coffea arabica": "Coffea arabica",
54
54
  "Rhapis excelsa": "Rhapis excelsa",
55
55
  "Calathea zebrina": "Calathea zebrina",
56
- "Sansevieria Laurentii": "Sansevieria Laurentii"
56
+ "Sansevieria Laurentii": "Sansevieria Laurentii",
57
+ "Automatic Watering": "Riego automático",
58
+ "Watering Duration (min)": "Duración del riego (min)",
59
+ "Watering": "Riego"
57
60
  }
@@ -53,5 +53,8 @@
53
53
  "Coffea arabica": "Coffea arabica",
54
54
  "Rhapis excelsa": "Rhapis excelsa",
55
55
  "Calathea zebrina": "Calathea zebrina",
56
- "Sansevieria Laurentii": "Sansevieria Laurentii"
56
+ "Sansevieria Laurentii": "Sansevieria Laurentii",
57
+ "Automatic Watering": "Arrosage automatique",
58
+ "Watering Duration (min)": "Durée d arrosage (min)",
59
+ "Watering": "Arrosage"
57
60
  }
@@ -53,5 +53,8 @@
53
53
  "Coffea arabica": "Coffea arabica",
54
54
  "Rhapis excelsa": "Rhapis excelsa",
55
55
  "Calathea zebrina": "Calathea zebrina",
56
- "Sansevieria Laurentii": "Sansevieria Laurentii"
56
+ "Sansevieria Laurentii": "Sansevieria Laurentii",
57
+ "Automatic Watering": "Irrigazione automatica",
58
+ "Watering Duration (min)": "Durata irrigazione (min)",
59
+ "Watering": "Irrigazione"
57
60
  }
@@ -53,5 +53,8 @@
53
53
  "Coffea arabica": "Coffea arabica",
54
54
  "Rhapis excelsa": "Rhapis excelsa",
55
55
  "Calathea zebrina": "Calathea zebrina",
56
- "Sansevieria Laurentii": "Sansevieria Laurentii"
56
+ "Sansevieria Laurentii": "Sansevieria Laurentii",
57
+ "Automatic Watering": "Automatisch water geven",
58
+ "Watering Duration (min)": "Bewateringstijd (min)",
59
+ "Watering": "Bewatering"
57
60
  }
@@ -53,5 +53,8 @@
53
53
  "Coffea arabica": "Coffea arabica",
54
54
  "Rhapis excelsa": "Rhapis excelsa",
55
55
  "Calathea zebrina": "Calathea zebrina",
56
- "Sansevieria Laurentii": "Sansevieria Laurentii"
56
+ "Sansevieria Laurentii": "Sansevieria Laurentii",
57
+ "Automatic Watering": "Automatyczne podlewanie",
58
+ "Watering Duration (min)": "Czas podlewania (min)",
59
+ "Watering": "Podlewanie"
57
60
  }
@@ -53,5 +53,8 @@
53
53
  "Coffea arabica": "Coffea arabica",
54
54
  "Rhapis excelsa": "Rhapis excelsa",
55
55
  "Calathea zebrina": "Calathea zebrina",
56
- "Sansevieria Laurentii": "Sansevieria Laurentii"
56
+ "Sansevieria Laurentii": "Sansevieria Laurentii",
57
+ "Automatic Watering": "Rega automática",
58
+ "Watering Duration (min)": "Duração da rega (min)",
59
+ "Watering": "Rega"
57
60
  }
@@ -53,5 +53,8 @@
53
53
  "Coffea arabica": "Coffea arabica",
54
54
  "Rhapis excelsa": "Rhapis excelsa",
55
55
  "Calathea zebrina": "Calathea zebrina",
56
- "Sansevieria Laurentii": "Sansevieria Laurentii"
56
+ "Sansevieria Laurentii": "Sansevieria Laurentii",
57
+ "Automatic Watering": "Автополив",
58
+ "Watering Duration (min)": "Время полива (мин.)",
59
+ "Watering": "Полив"
57
60
  }
@@ -53,5 +53,8 @@
53
53
  "Coffea arabica": "Coffea arabica",
54
54
  "Rhapis excelsa": "Rhapis excelsa",
55
55
  "Calathea zebrina": "Calathea zebrina",
56
- "Sansevieria Laurentii": "Sansevieria Laurentii"
56
+ "Sansevieria Laurentii": "Sansevieria Laurentii",
57
+ "Automatic Watering": "Автополив",
58
+ "Watering Duration (min)": "Час поливу (хв.)",
59
+ "Watering": "Полив"
57
60
  }
@@ -53,5 +53,8 @@
53
53
  "Coffea arabica": "咖啡阿拉比卡",
54
54
  "Rhapis excelsa": "棕竹",
55
55
  "Calathea zebrina": "斑马竹芋",
56
- "Sansevieria Laurentii": "金边虎尾兰"
56
+ "Sansevieria Laurentii": "金边虎尾兰",
57
+ "Automatic Watering": "自动浇水",
58
+ "Watering Duration (min)": "浇水时长(分钟)",
59
+ "Watering": "浇水"
57
60
  }
@@ -116,6 +116,23 @@
116
116
  "lg": 3,
117
117
  "xl": 3
118
118
  },
119
+ "_wateringHeader": {
120
+ "type": "header",
121
+ "text": "Automatic Watering",
122
+ "size": 3
123
+ },
124
+ "wateringDuration": {
125
+ "type": "number",
126
+ "label": "Watering Duration (min)",
127
+ "min": 1,
128
+ "max": 60,
129
+ "default": 3,
130
+ "xs": 12,
131
+ "sm": 6,
132
+ "md": 4,
133
+ "lg": 3,
134
+ "xl": 3
135
+ },
119
136
  "_nightHeader": {
120
137
  "type": "header",
121
138
  "text": "Night Mode",
@@ -265,6 +282,12 @@
265
282
  "lg": 12,
266
283
  "xl": 12,
267
284
  "items": [
285
+ {
286
+ "type": "checkbox",
287
+ "title": "",
288
+ "attr": "enabled",
289
+ "width": "10px"
290
+ },
268
291
  {
269
292
  "type": "text",
270
293
  "title": "Name",
@@ -275,7 +298,7 @@
275
298
  "type": "text",
276
299
  "title": "Location",
277
300
  "attr": "location",
278
- "width": "9%"
301
+ "width": "10%"
279
302
  },
280
303
  {
281
304
  "type": "select",
@@ -361,7 +384,13 @@
361
384
  "type": "objectId",
362
385
  "title": "Battery Sensor",
363
386
  "attr": "sensorBattery",
364
- "width": "9%"
387
+ "width": "14%"
388
+ },
389
+ {
390
+ "type": "objectId",
391
+ "title": "Watering",
392
+ "attr": "sensorWatering",
393
+ "width": "10%"
365
394
  },
366
395
  {
367
396
  "type": "text",
@@ -395,14 +424,8 @@
395
424
  "type": "text",
396
425
  "title": "Bat Min %",
397
426
  "attr": "batteryMin",
398
- "width": "7%",
427
+ "width": "9%",
399
428
  "placeholder": "—"
400
- },
401
- {
402
- "type": "checkbox",
403
- "title": "Enabled",
404
- "attr": "enabled",
405
- "width": "4%"
406
429
  }
407
430
  ]
408
431
  }
package/io-package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "flowers",
4
- "version": "0.2.8",
4
+ "version": "0.2.9",
5
5
  "news": {
6
+ "0.2.9": {
7
+ "en": "Automatic watering support; UI column width fixes",
8
+ "de": "Automatische Bewässerung; UI-Spaltenbreiten korrigiert",
9
+ "ru": "Автополив; исправлены ширины колонок UI",
10
+ "fr": "Arrosage automatique; corrections largeurs colonnes UI",
11
+ "it": "Irrigazione automatica; correzioni larghezze colonne UI",
12
+ "es": "Riego automático; correcciones anchos columnas UI",
13
+ "pl": "Automatyczne podlewanie; poprawki szerokości kolumn UI",
14
+ "pt": "Rega automática; correções larguras colunas UI",
15
+ "nl": "Automatisch bewateren; UI kolombreedtes gecorrigeerd",
16
+ "uk": "Автополив; виправлено ширини колонок UI",
17
+ "zh-cn": "自动浇水支持;修复UI列宽"
18
+ },
6
19
  "0.2.8": {
7
20
  "en": "Added sendWeeklyReport button; fixed repochecker issues",
8
21
  "de": "Schaltflaeche sendWeeklyReport hinzugefuegt; Repochecker-Fehler behoben",
@@ -15,84 +28,6 @@
15
28
  "nl": "Knop sendWeeklyReport toegevoegd; repochecker fouten opgelost",
16
29
  "uk": "Додано кнопку sendWeeklyReport; виправлено помилки repochecker",
17
30
  "zh-cn": "添加sendWeeklyReport按钮;修复repochecker问题"
18
- },
19
- "0.2.7": {
20
- "en": "Fixed weekly report header; separated daily/weekly report logic",
21
- "de": "Wochenbericht-Kopfzeile korrigiert; Tages-/Wochenbericht-Logik getrennt",
22
- "ru": "Исправлен заголовок недельного отчёта; разделена логика дневного/недельного отчёта",
23
- "fr": "En-tête du rapport hebdomadaire corrigé; logique rapport quotidien/hebdomadaire séparée",
24
- "it": "Intestazione report settimanale corretta; logica report giornaliero/settimanale separata",
25
- "es": "Encabezado de informe semanal corregido; lógica de informe diario/semanal separada",
26
- "pl": "Poprawiono nagłówek raportu tygodniowego; rozdzielono logikę raportów dziennych/tygodniowych",
27
- "pt": "Cabeçalho do relatório semanal corrigido; lógica de relatório diário/semanal separada",
28
- "nl": "Koptekst wekelijks rapport gecorrigeerd; logica dagelijks/wekelijks rapport gescheiden",
29
- "uk": "Виправлено заголовок тижневого звіту; розділено логіку денного/тижневого звіту",
30
- "zh-cn": "修复每周报告标题;分离每日/每周报告逻辑"
31
- },
32
- "0.2.6": {
33
- "en": "Added dividers to daily/weekly report format",
34
- "de": "Trennlinien zum Tages-/Wochenbericht-Format hinzugefügt",
35
- "ru": "Добавлены разделители в формат дневного/недельного отчёта",
36
- "fr": "Séparateurs ajoutés au format du rapport quotidien/hebdomadaire",
37
- "it": "Separatori aggiunti al formato del report giornaliero/settimanale",
38
- "es": "Separadores añadidos al formato de informe diario/semanal",
39
- "pl": "Dodano separatory do formatu raportu dziennego/tygodniowego",
40
- "pt": "Separadores adicionados ao formato de relatório diário/semanal",
41
- "nl": "Scheidingstekens toegevoegd aan dagelijks/wekelijks rapportformaat",
42
- "uk": "Додано роздільники до формату денного/тижневого звіту",
43
- "zh-cn": "在每日/每周报告格式中添加分隔符"
44
- },
45
- "0.2.5": {
46
- "en": "Added sendDailyReport button object for manual report trigger",
47
- "de": "Schaltfläche sendDailyReport für manuellen Berichtsauslöser hinzugefügt",
48
- "ru": "Добавлена кнопка sendDailyReport для ручного запуска отчёта",
49
- "fr": "Bouton sendDailyReport ajouté pour déclenchement manuel du rapport",
50
- "it": "Aggiunto pulsante sendDailyReport per attivazione manuale del report",
51
- "es": "Botón sendDailyReport añadido para activación manual del informe",
52
- "pl": "Dodano przycisk sendDailyReport do ręcznego wyzwalania raportu",
53
- "pt": "Botão sendDailyReport adicionado para acionamento manual do relatório",
54
- "nl": "Knop sendDailyReport toegevoegd voor handmatige rapportactivering",
55
- "uk": "Додано кнопку sendDailyReport для ручного запуску звіту",
56
- "zh-cn": "添加sendDailyReport按钮对象用于手动触发报告"
57
- },
58
- "0.2.4": {
59
- "en": "Fixed Profiles tab causing dirty state on open",
60
- "de": "Fehler behoben: Profile-Tab aktivierte Speichern-Schaltfläche beim Öffnen",
61
- "ru": "Исправлена вкладка Профили — больше не активирует кнопку сохранения при открытии",
62
- "fr": "Correction de l'onglet Profils activant l'état modifié à l'ouverture",
63
- "it": "Corretto tab Profili che causava stato modificato all'apertura",
64
- "es": "Corregida pestaña Perfiles que activaba estado sucio al abrir",
65
- "pl": "Naprawiono zakładkę Profile powodującą stan brudny przy otwarciu",
66
- "pt": "Corrigida aba Perfis causando estado sujo ao abrir",
67
- "nl": "Profielen tabblad veroorzaakte vuile staat bij openen opgelost",
68
- "uk": "Виправлено вкладку Профілі — більше не активує кнопку збереження при відкритті",
69
- "zh-cn": "修复配置文件选项卡打开时触发脏状态的问题"
70
- },
71
- "0.2.3": {
72
- "en": "Increased Bat Min column width; allow empty threshold fields",
73
- "de": "Bat-Min-Spaltenbreite erhöht; leere Schwellenwertfelder erlaubt",
74
- "ru": "Увеличена ширина колонки Bat Min; разрешены пустые поля порогов",
75
- "fr": "Largeur colonne Bat Min augmentée; champs de seuil vides autorisés",
76
- "it": "Larghezza colonna Bat Min aumentata; campi soglia vuoti consentiti",
77
- "es": "Ancho columna Bat Min aumentado; campos de umbral vacíos permitidos",
78
- "pl": "Zwiększono szerokość kolumny Bat Min; dozwolone puste pola progów",
79
- "pt": "Largura da coluna Bat Min aumentada; campos de limite vazios permitidos",
80
- "nl": "Breedte kolom Bat Min vergroot; lege drempelwaarde velden toegestaan",
81
- "uk": "Збільшено ширину колонки Bat Min; дозволено порожні поля порогів",
82
- "zh-cn": "增加Bat Min列宽;允许空阈值字段"
83
- },
84
- "0.2.2": {
85
- "en": "Allow empty threshold fields — profile values used as fallback",
86
- "de": "Leere Schwellenwertfelder erlaubt — Profilwerte als Fallback verwendet",
87
- "ru": "Разрешены пустые поля порогов — используются значения профиля как запасные",
88
- "fr": "Champs de seuil vides autorisés — valeurs de profil utilisées comme repli",
89
- "it": "Campi soglia vuoti consentiti — valori profilo usati come fallback",
90
- "es": "Campos de umbral vacíos permitidos — valores de perfil usados como respaldo",
91
- "pl": "Dozwolone puste pola progów — wartości profilu używane jako zapasowe",
92
- "pt": "Campos de limite vazios permitidos — valores de perfil usados como fallback",
93
- "nl": "Lege drempelwaarde velden toegestaan — profielwaarden als terugval gebruikt",
94
- "uk": "Дозволено порожні поля порогів — значення профілю використовуються як запасні",
95
- "zh-cn": "允许空阈值字段 — 使用配置文件值作为后备"
96
31
  }
97
32
  },
98
33
  "titleLang": {
@@ -177,6 +112,7 @@
177
112
  "weeklyReportEnabled": false,
178
113
  "weeklyReportDay": "1",
179
114
  "weeklyReportTime": "10:00",
115
+ "wateringDuration": 3,
180
116
  "plants": []
181
117
  },
182
118
  "objects": [],
@@ -16,10 +16,10 @@ class MonitorService {
16
16
  this.adapter = adapter;
17
17
  this.notif = notificationManager;
18
18
  this.lang = lang || "en";
19
- // last known sensor values: key = stateId, value = { val, ts }
20
19
  this.sensorValues = {};
21
- // last seen timestamps per plant (for offline detection)
22
20
  this.lastSeen = {};
21
+ // active watering timers: key = plant.name, value = true if watering in progress
22
+ this._wateringActive = {};
23
23
  }
24
24
 
25
25
  /**
@@ -166,6 +166,7 @@ class MonitorService {
166
166
  msg("humidity_low", this.lang, label, val, thresholds.humidityMin),
167
167
  `${plant.name}:humidity_low`,
168
168
  );
169
+ await this._startWatering(plant);
169
170
  } else if (val > thresholds.humidityMax) {
170
171
  await this.notif.send(
171
172
  msg("humidity_high", this.lang, label, val, thresholds.humidityMax),
@@ -232,10 +233,7 @@ class MonitorService {
232
233
  async _checkOffline(plant) {
233
234
  const offlineHours = parseInt(this.adapter.config.offlineThreshold) || 3;
234
235
  const last = this.lastSeen[plant.name];
235
- if (!last) {
236
- return;
237
- }
238
-
236
+ if (!last) return;
239
237
  const diffHours = (Date.now() - last) / (1000 * 60 * 60);
240
238
  if (diffHours >= offlineHours) {
241
239
  const label = `${plant.name}${plant.location ? ` (${plant.location})` : ""}`;
@@ -246,6 +244,41 @@ class MonitorService {
246
244
  }
247
245
  }
248
246
 
247
+ /**
248
+ * Start automatic watering for a plant if configured and not already active.
249
+ *
250
+ * @param {object} plant
251
+ */
252
+ async _startWatering(plant) {
253
+ if (!plant.sensorWatering) return;
254
+ if (this._wateringActive[plant.name]) {
255
+ this.adapter.log.debug(`MonitorService: watering already active for "${plant.name}", skipping`);
256
+ return;
257
+ }
258
+
259
+ const durationMin = parseInt(this.adapter.config.wateringDuration) || 3;
260
+ const durationMs = durationMin * 60 * 1000;
261
+
262
+ try {
263
+ await this.adapter.setForeignStateAsync(plant.sensorWatering, { val: true, ack: false });
264
+ this._wateringActive[plant.name] = true;
265
+ this.adapter.log.info(`MonitorService: watering started for "${plant.name}" (${durationMin} min)`);
266
+
267
+ this.adapter.setTimeout(async () => {
268
+ try {
269
+ await this.adapter.setForeignStateAsync(plant.sensorWatering, { val: false, ack: false });
270
+ this.adapter.log.info(`MonitorService: watering stopped for "${plant.name}"`);
271
+ } catch (err) {
272
+ this.adapter.log.warn(`MonitorService: failed to stop watering for "${plant.name}": ${err.message}`);
273
+ }
274
+ this._wateringActive[plant.name] = false;
275
+ }, durationMs);
276
+ } catch (err) {
277
+ this.adapter.log.warn(`MonitorService: failed to start watering for "${plant.name}": ${err.message}`);
278
+ this._wateringActive[plant.name] = false;
279
+ }
280
+ }
281
+
249
282
  /**
250
283
  * Update or create a state for a plant sensor value.
251
284
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.flowers",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "description": "ioBroker adapter for monitoring indoor plants via soil moisture, temperature and battery sensors with Telegram notifications",
5
5
  "author": {
6
6
  "name": "sadam6752-tech",