iobroker.sonoff 4.2.1 → 5.1.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.
Files changed (42) hide show
  1. package/README.md +39 -24
  2. package/admin/i18n/de.json +3 -1
  3. package/admin/i18n/en.json +3 -1
  4. package/admin/i18n/es.json +4 -2
  5. package/admin/i18n/fr.json +4 -2
  6. package/admin/i18n/it.json +5 -3
  7. package/admin/i18n/nl.json +5 -3
  8. package/admin/i18n/pl.json +4 -2
  9. package/admin/i18n/pt.json +4 -2
  10. package/admin/i18n/ru.json +6 -4
  11. package/admin/i18n/uk.json +5 -3
  12. package/admin/i18n/zh-cn.json +4 -2
  13. package/admin/jsonConfig.json +10 -0
  14. package/build/lib/datapoints.js +213 -114
  15. package/build/lib/datapoints.js.map +1 -1
  16. package/build/lib/deviceManager.js +437 -24
  17. package/build/lib/deviceManager.js.map +1 -1
  18. package/build/lib/discovery.js +206 -0
  19. package/build/lib/discovery.js.map +1 -0
  20. package/build/lib/firmware.js +65 -0
  21. package/build/lib/firmware.js.map +1 -0
  22. package/build/lib/i18n/de.json +33 -1
  23. package/build/lib/i18n/en.json +33 -1
  24. package/build/lib/i18n/es.json +33 -1
  25. package/build/lib/i18n/fr.json +33 -1
  26. package/build/lib/i18n/it.json +33 -1
  27. package/build/lib/i18n/nl.json +33 -1
  28. package/build/lib/i18n/pl.json +33 -1
  29. package/build/lib/i18n/pt.json +33 -1
  30. package/build/lib/i18n/ru.json +33 -1
  31. package/build/lib/i18n/uk.json +33 -1
  32. package/build/lib/i18n/zh-cn.json +33 -1
  33. package/build/lib/mqttBase.js +115 -18
  34. package/build/lib/mqttBase.js.map +1 -1
  35. package/build/lib/server.js +11 -1
  36. package/build/lib/server.js.map +1 -1
  37. package/build/lib/usedResources.js +67 -0
  38. package/build/lib/usedResources.js.map +1 -0
  39. package/build/main.js +20 -0
  40. package/build/main.js.map +1 -1
  41. package/io-package.json +86 -28
  42. package/package.json +3 -3
package/README.md CHANGED
@@ -162,11 +162,50 @@ States:
162
162
  * `modeLedExor` - exor for white LEDs and color LEDs => if the white LEDs are switched on, color LEDs are switched off and vice versa (default true)
163
163
  * `modeReadColors` - allow for color read from MQTT (default false)
164
164
 
165
+ ## Roles of the objects since 5.0
166
+ Since version 5.0 the objects get roles which the type-detector recognizes correctly, so that adapters like Alexa (iot), Matter, Material or devices find the right devices: a relay as light or socket, a light with its color, dimmer and effect, a temperature sensor and so on. Before, e.g. `Wifi_Channel` or `MqttPort` were detected as dimmer and `POWER` of an RGB light was replaced by `WW_POWER`.
167
+
168
+ **The behavior of the existing objects can change:**
169
+
170
+ * The roles of the existing objects are updated as soon as the device sends the value again. Only the roles which the older versions set are changed, a role changed by you (e.g. `switch.light` on `POWER`) is kept. The ID, the name, the history settings and the value stay as they are.
171
+ * Visualizations, scripts or aliases which select the states by their role can find other states now.
172
+ * `Switch1`...`Switch28` are the inputs of the device and so read-only now.
173
+ * The most important changes:
174
+ * network and firmware information: `info.ip`, `info.name`, `info.firmware`, `info.hardware`, ...
175
+ * diagnostic values (`Heap`, `LoadAvg`, `Wifi_Channel`, `HTTP_API`, ...): `info.status`, `UptimeSec`: `value.interval`, `Wifi_Signal`: `value.rssi`
176
+ * `POWER`, `POWER1`... with `switch.power`: `switch`
177
+ * `RGB_POWER`, `WW_POWER`, `CW_POWER`: `switch.mode.color`, `switch.mode.white`, `switch.mode.coldwhite`, `Fade`, `modeLedExor`, `modeReadColors`: `switch.setting`, `Scheme`: `level.effect`, `CT`: `level.color.temperature`
178
+ * `Today`, `Yesterday`: `value.energy.consumed`, `Vcc`: `value.voltage.vcc`, `DewPoint`: `value.temperature.dewpoint`
179
+ * automatically created states: texts `text`, writable numbers `state` (before `level`)
180
+
181
+ A device with several relays (`POWER1`, `POWER2`, ...) in one channel is still detected only as one device, as the type-detector finds every device type only once per channel.
182
+
183
+ ## Device manager
184
+ The devices are shown in the device manager of the admin with their relays, dimmers, colors, shutters and settings, which can be controlled directly there.
185
+
186
+ **Firmware update:** if "Check for firmware updates" is enabled (default), the adapter reads the latest Tasmota release from GitHub once a day. A Tasmota device with an older firmware shows the update indicator and the action "Update firmware". It sends `Upgrade 1` to the device, which downloads the firmware from its own OTA URL (by default the official release of its build variant, e.g. `tasmota` or `tasmota32`) and restarts. The dialog waits until the device reports the new version, at most 5 minutes. Development builds are not offered to be "updated" to the release they are based on.
187
+
188
+ **Search for devices:** the action "Search for devices" of the instance asks every address of the local networks (the /24 network of each own address) via the web interface of Tasmota for its status - the official Tasmota builds do not announce themselves by mDNS. The found devices are listed with their current MQTT settings, the ones already connected with this instance separately. For the selected devices the adapter enables MQTT and writes the MQTT server, port, user and password (`Backlog SetOption3 1; MqttHost ...; MqttPort ...; MqttUser ...; MqttPassword ...`). The settings are prefilled with the own address and the port and credentials of the built-in server, in bridge mode with the external broker. The devices restart and appear in the list as soon as they are connected. Devices with a web password require it in the form. If ioBroker runs in a Docker container without host network, only the network of the container is searched.
189
+
190
+ The device card shows the connection and the Wi-Fi signal (`Wifi_Signal` in dBm) live.
191
+
165
192
  <!--
166
193
  Placeholder for the next version (at the beginning of the line):
167
194
  ### **WORK IN PROGRESS**
168
195
  -->
169
196
  ## Changelog
197
+ ### 5.1.0 (2026-10-13)
198
+ * (@GermanBluefox) Device manager: firmware update of Tasmota devices. The latest release is read from GitHub once a day (option "Check for firmware updates"), devices with an older firmware show the update indicator. The update is started with `Upgrade 1`, so the device downloads the firmware from its own OTA URL
199
+ * (@GermanBluefox) Device manager: search for Tasmota devices in the network and connect them with ioBroker (enables MQTT and writes server, port, user and password)
200
+ * (@GermanBluefox) Device manager: the connection state and the Wi-Fi signal are updated live, the signal is shown in dBm (`Wifi_Signal`) instead of the link quality in percent. Toggles like `Fade` are switches instead of buttons
201
+ * (@GermanBluefox) The devices are linked with their `alive` state (`common.statusStates`), so admin shows in the object tree whether a device is connected
202
+ * (@GermanBluefox) The port of the built-in MQTT server is reported to js-controller 8 as a used resource (`common.declareUsedResources`), so admin shows which ports are occupied. In bridge mode no port is reported. If the port is already used, the log names the instance that occupies it
203
+
204
+ ### 5.0.0 (2026-10-13)
205
+ * (@GermanBluefox) Breaking change: the roles of the objects change, see [Roles of the objects since 5.0](#roles-of-the-objects-since-50)
206
+ * (@GermanBluefox) Better roles for the type-detector: diagnostic values (e.g. `Wifi_Channel`, `Heap`, `MqttPort`) are not detected as dimmer, blind or window anymore, `POWER` is the switch of RGB lights and `switch.power` of the relays is migrated to `switch`, `Scheme` is the light effect. The roles of the existing objects are updated, roles changed by the user are kept
207
+ * (@GermanBluefox) `Switch1`...`Switch28` (inputs of the device) are read-only sensors now
208
+
170
209
  ### 4.2.1 (2026-09-14)
171
210
  * (@patricknitsch) Fixed Device Manager showing no devices at all if a data point exists twice, e.g. `POWER` and `STATE.POWER` (#604)
172
211
  * (@patricknitsch) Fixed writing to nested data points, e.g. `STATE.POWER1` with "Create object tree" enabled
@@ -195,30 +234,6 @@ States:
195
234
  * (@Apollon77/@copilot) Added PulseTime1-PulseTime16 datapoint support - users can now read and set PulseTime values directly from ioBroker to control relay auto-off timers
196
235
  * (@GermanBluefox) Breaking: a minimal supported Node.js version is now 22
197
236
 
198
- ### 3.3.0 (2025-09-20)
199
- * (@Apollon77/@copilot) **IMPORTANT**: Commands now correctly use `cmnd/` prefix instead of `tele/` prefix
200
- * (@Apollon77/@copilot) Added configuration for advanced MQTT settings
201
- * (@Apollon77/@copilot) Fixed shutter command mapping to use the correct Tasmota format - Transforms Shutter1_Position to ShutterPosition1 for proper device control
202
- * (@Apollon77/@copilot) Fixed IRHVAC Power, Light and Mode fields showing NULL instead of actual string values
203
- * (@Apollon77/@copilot) Added Zigbee device control support for Tasmota coordinators - users can now control Zigbee devices (Power/Dimmer) through ioBroker states via automatic ZbSend command generation
204
- * (@Apollon77/@copilot) Added support for Tasmota tele/MARGINS messages enabling integration of PowerLow, PowerHigh, and PowerDelta limits
205
- * (@Apollon77/@copilot) Fixed POW R2 energy datapoints not being created by enabling TELE_STATE by default
206
- * (@Apollon77/@copilot) Fixed pressure and temperature unit display to respect PressureUnit and TempUnit from Tasmota MQTT messages
207
- * (@Apollon77/@copilot) Added support for decoupled button actions in Tasmota devices - creates Button1-Button8 datapoints for button events
208
- * (@Apollon77/@copilot) Fixed RESULT message processing bug where tele/*/RESULT messages were incorrectly processed as WAKEUP instead of RESULT
209
- * (@Apollon77/@copilot) Fixed the deprecated value.power.consumption role for ENERGY_Power datapoint to improve device detection
210
- * (@Apollon77/@copilot) Added support for SHUTTER5-SHUTTER16 datapoints for ESP32 shutter32 devices
211
- * (@Apollon77/@copilot) Updated admin UI responsive design to use ioBroker standard values for mobile compatibility
212
- * (@Apollon77/@copilot) Added support for Sonoff B1 (RGB LED) and Sonoff SC (Environmental Sensor) devices with proper value ranges
213
- * (@Apollon77/@copilot) Added meaningful state labels for Scheme datapoint (color animation schemes)
214
- * (@Apollon77/@copilot) Added a configuration option to suppress "not connected" warnings for temporarily offline devices
215
- * (@Apollon77/@copilot) Added Switch5-Switch28 datapoint definitions for consistent boolean mapping
216
- * (@Apollon77/@copilot) Fixed a write flag for all Switch datapoints to enable proper control from ioBroker
217
-
218
- ### 3.2.1 (2024-10-07)
219
-
220
- * (bluefox) Sanitize the IDs of the clients
221
-
222
237
  ## License
223
238
 
224
239
  The MIT License (MIT)
@@ -87,5 +87,7 @@
87
87
  "connected": "verbunden",
88
88
  "e.g. mqtt://192.168.1.100:1883 or mqtts://broker:8883": "z.B. mqtt://192.168.1.100:1883 oder mqtts://broker:8883",
89
89
  "ms": "ms",
90
- "sec": "Sek."
90
+ "sec": "Sekunde",
91
+ "Check for firmware updates": "Nach Firmware-Updates suchen",
92
+ "Reads the latest Tasmota release from GitHub once a day, so the device manager can update the devices": "Liest einmal täglich die neueste Tasmota-Version von GitHub, damit der Gerätemanager die Geräte aktualisieren kann"
91
93
  }
@@ -87,5 +87,7 @@
87
87
  "connected": "connected",
88
88
  "e.g. mqtt://192.168.1.100:1883 or mqtts://broker:8883": "e.g. mqtt://192.168.1.100:1883 or mqtts://broker:8883",
89
89
  "ms": "ms",
90
- "sec": "sec"
90
+ "sec": "sec",
91
+ "Check for firmware updates": "Check for firmware updates",
92
+ "Reads the latest Tasmota release from GitHub once a day, so the device manager can update the devices": "Reads the latest Tasmota release from GitHub once a day, so the device manager can update the devices"
91
93
  }
@@ -86,6 +86,8 @@
86
86
  "chars": "caracteres",
87
87
  "connected": "conectado",
88
88
  "e.g. mqtt://192.168.1.100:1883 or mqtts://broker:8883": "ej. mqtt://192.168.1.100:1883 o mqtts://broker:8883",
89
- "ms": "Sra",
90
- "sec": "s"
89
+ "ms": "EM",
90
+ "sec": "segundo",
91
+ "Check for firmware updates": "Buscar actualizaciones de firmware",
92
+ "Reads the latest Tasmota release from GitHub once a day, so the device manager can update the devices": "Lee una vez al día la última versión de Tasmota desde GitHub, para que el administrador de dispositivos pueda actualizar los dispositivos"
91
93
  }
@@ -86,6 +86,8 @@
86
86
  "chars": "chars",
87
87
  "connected": "connecté",
88
88
  "e.g. mqtt://192.168.1.100:1883 or mqtts://broker:8883": "ex. mqtt://192.168.1.100:1883 ou mqtts://broker:8883",
89
- "ms": "Mme",
90
- "sec": "s"
89
+ "ms": "MS",
90
+ "sec": "seconde",
91
+ "Check for firmware updates": "Rechercher des mises à jour du firmware",
92
+ "Reads the latest Tasmota release from GitHub once a day, so the device manager can update the devices": "Lit une fois par jour la dernière version de Tasmota sur GitHub, afin que le gestionnaire d'appareils puisse mettre à jour les appareils"
91
93
  }
@@ -7,7 +7,7 @@
7
7
  "Check the certificate of the broker": "Verificare il certificato del broker",
8
8
  "Clean session": "Sessione pulita",
9
9
  "Client": "Client/abbonato",
10
- "Client ID": "ID client",
10
+ "Client ID": "ID cliente",
11
11
  "Client ID:": "Identificativo cliente",
12
12
  "Client timeout": "Timeout del cliente",
13
13
  "Comma separated list. Standard full topic: tele/#, stat/# - device first: +/tele/+, +/stat/+": "Elenco separato da virgole. FullTopic standard: tele/#, stat/# - dispositivo per primo: +/tele/+, +/stat/+",
@@ -86,6 +86,8 @@
86
86
  "chars": "caratteri",
87
87
  "connected": "collegato",
88
88
  "e.g. mqtt://192.168.1.100:1883 or mqtts://broker:8883": "es. mqtt://192.168.1.100:1883 o mqtts://broker:8883",
89
- "ms": "Signorina",
90
- "sec": "s"
89
+ "ms": "SM",
90
+ "sec": "sicurezza",
91
+ "Check for firmware updates": "Controlla aggiornamenti del firmware",
92
+ "Reads the latest Tasmota release from GitHub once a day, so the device manager can update the devices": "Legge una volta al giorno l'ultima versione di Tasmota da GitHub, così il gestore dispositivi può aggiornare i dispositivi"
91
93
  }
@@ -11,7 +11,7 @@
11
11
  "Client ID:": "ID do Cliente",
12
12
  "Client timeout": "Client time-out",
13
13
  "Comma separated list. Standard full topic: tele/#, stat/# - device first: +/tele/+, +/stat/+": "Door komma's gescheiden lijst. Standaard FullTopic: tele/#, stat/# - apparaat eerst: +/tele/+, +/stat/+",
14
- "Connection": "Conexão",
14
+ "Connection": "Verbinding",
15
15
  "Connection settings": "Configurações de conexão",
16
16
  "Create object tree": "Maak een objectboom",
17
17
  "Deactivate it for self-signed certificates": "Deactiveer dit voor zelfondertekende certificaten",
@@ -86,6 +86,8 @@
86
86
  "chars": "caracteres",
87
87
  "connected": "conectado",
88
88
  "e.g. mqtt://192.168.1.100:1883 or mqtts://broker:8883": "bijv. mqtt://192.168.1.100:1883 of mqtts://broker:8883",
89
- "ms": "Senhora",
90
- "sec": "sec"
89
+ "ms": "mevrouw",
90
+ "sec": "sec",
91
+ "Check for firmware updates": "Controleren op firmware-updates",
92
+ "Reads the latest Tasmota release from GitHub once a day, so the device manager can update the devices": "Leest eenmaal per dag de nieuwste Tasmota-versie van GitHub, zodat de apparaatbeheerder de apparaten kan bijwerken"
91
93
  }
@@ -86,6 +86,8 @@
86
86
  "chars": "znaki",
87
87
  "connected": "połączony",
88
88
  "e.g. mqtt://192.168.1.100:1883 or mqtts://broker:8883": "np. mqtt://192.168.1.100:1883 lub mqtts://broker:8883",
89
- "ms": "ms",
90
- "sec": "s"
89
+ "ms": "SM",
90
+ "sec": "sek",
91
+ "Check for firmware updates": "Sprawdzaj aktualizacje oprogramowania",
92
+ "Reads the latest Tasmota release from GitHub once a day, so the device manager can update the devices": "Raz dziennie odczytuje najnowszą wersję Tasmota z GitHub, aby menedżer urządzeń mógł aktualizować urządzenia"
91
93
  }
@@ -86,6 +86,8 @@
86
86
  "chars": "caracteres",
87
87
  "connected": "conectado",
88
88
  "e.g. mqtt://192.168.1.100:1883 or mqtts://broker:8883": "ex. mqtt://192.168.1.100:1883 ou mqtts://broker:8883",
89
- "ms": "Senhora",
90
- "sec": "s"
89
+ "ms": "EM",
90
+ "sec": "seg",
91
+ "Check for firmware updates": "Verificar atualizações de firmware",
92
+ "Reads the latest Tasmota release from GitHub once a day, so the device manager can update the devices": "Lê a versão mais recente do Tasmota no GitHub uma vez por dia, para que o gerenciador de dispositivos possa atualizar os dispositivos"
91
93
  }
@@ -7,11 +7,11 @@
7
7
  "Check the certificate of the broker": "Проверять сертификат брокера",
8
8
  "Clean session": "Чистая сессия",
9
9
  "Client": "Клиент/подписчик",
10
- "Client ID": "Идентификатор клиента",
10
+ "Client ID": "ID клиента",
11
11
  "Client ID:": "ID Клиента",
12
12
  "Client timeout": "Время ожидания клиента",
13
13
  "Comma separated list. Standard full topic: tele/#, stat/# - device first: +/tele/+, +/stat/+": "Список через запятую. Стандартный FullTopic: tele/#, stat/# - сначала устройство: +/tele/+, +/stat/+",
14
- "Connection": "Соединение",
14
+ "Connection": "Подключение",
15
15
  "Connection settings": "Настройки соединения",
16
16
  "Create object tree": "Создать дерево объектов",
17
17
  "Deactivate it for self-signed certificates": "Отключите для самоподписанных сертификатов",
@@ -86,6 +86,8 @@
86
86
  "chars": "символов",
87
87
  "connected": "успешно",
88
88
  "e.g. mqtt://192.168.1.100:1883 or mqtts://broker:8883": "например mqtt://192.168.1.100:1883 или mqtts://broker:8883",
89
- "ms": "мс",
90
- "sec": "сек"
89
+ "ms": "РС",
90
+ "sec": "сек",
91
+ "Check for firmware updates": "Проверять обновления прошивки",
92
+ "Reads the latest Tasmota release from GitHub once a day, so the device manager can update the devices": "Раз в день считывает последнюю версию Tasmota с GitHub, чтобы менеджер устройств мог обновлять устройства"
91
93
  }
@@ -7,11 +7,11 @@
7
7
  "Check the certificate of the broker": "Перевіряти сертифікат брокера",
8
8
  "Clean session": "Чиста сесія",
9
9
  "Client": "Клієнт/абонент",
10
- "Client ID": "Ідентифікатор клієнта",
10
+ "Client ID": "ID клієнта",
11
11
  "Client ID:": "ID клієнта",
12
12
  "Client timeout": "Час очікування клієнта",
13
13
  "Comma separated list. Standard full topic: tele/#, stat/# - device first: +/tele/+, +/stat/+": "Список через кому. Стандартний FullTopic: tele/#, stat/# - спочатку пристрій: +/tele/+, +/stat/+",
14
- "Connection": "Підключення",
14
+ "Connection": "З'єднання",
15
15
  "Connection settings": "Налаштування підключення",
16
16
  "Create object tree": "Створення дерева об'єктів",
17
17
  "Deactivate it for self-signed certificates": "Вимкніть для самопідписаних сертифікатів",
@@ -87,5 +87,7 @@
87
87
  "connected": "підключений",
88
88
  "e.g. mqtt://192.168.1.100:1883 or mqtts://broker:8883": "наприклад mqtt://192.168.1.100:1883 або mqtts://broker:8883",
89
89
  "ms": "РС",
90
- "sec": "с"
90
+ "sec": "сек",
91
+ "Check for firmware updates": "Перевіряти оновлення прошивки",
92
+ "Reads the latest Tasmota release from GitHub once a day, so the device manager can update the devices": "Раз на день зчитує останню версію Tasmota з GitHub, щоб менеджер пристроїв міг оновлювати пристрої"
91
93
  }
@@ -86,6 +86,8 @@
86
86
  "chars": "字符",
87
87
  "connected": "连接的",
88
88
  "e.g. mqtt://192.168.1.100:1883 or mqtts://broker:8883": "例如 mqtt://192.168.1.100:1883 或 mqtts://broker:8883",
89
- "ms": "毫秒",
90
- "sec": "秒"
89
+ "ms": "多发性硬化症",
90
+ "sec": "秒",
91
+ "Check for firmware updates": "检查固件更新",
92
+ "Reads the latest Tasmota release from GitHub once a day, so the device manager can update the devices": "每天从 GitHub 读取一次最新的 Tasmota 版本,以便设备管理器可以更新设备"
91
93
  }
@@ -333,6 +333,16 @@
333
333
  "lg": 4,
334
334
  "xl": 4
335
335
  },
336
+ "checkFirmware": {
337
+ "type": "checkbox",
338
+ "label": "Check for firmware updates",
339
+ "help": "Reads the latest Tasmota release from GitHub once a day, so the device manager can update the devices",
340
+ "xs": 12,
341
+ "sm": 12,
342
+ "md": 6,
343
+ "lg": 4,
344
+ "xl": 4
345
+ },
336
346
  "_header5": {
337
347
  "newLine": true,
338
348
  "type": "header",