iobroker.mqtt-plus 1.6.1 → 1.6.2

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 proxy
3
+ Copyright (c) 2026 proxy <zumloeschen@ich.ms>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,124 +1,101 @@
1
- <p align="center">
2
- <img src="admin/mqtt-plus.png" alt="MQTT Plus Logo" width="96">
3
- </p>
4
-
5
- <h1 align="center">ioBroker.mqtt-plus</h1>
6
-
7
- <p align="center">
8
- <a href="LICENSE"><img alt="License" src="https://img.shields.io/badge/License-MIT-blue"></a>
9
- <img alt="Version" src="https://img.shields.io/badge/Version-1.6.1-informational">
10
- <img alt="js-controller" src="https://img.shields.io/badge/js--controller-%3E%3D6.0.11-informational">
11
- <img alt="Node" src="https://img.shields.io/badge/Node.js-%3E%3D18-informational">
12
- <img alt="Tests" src="https://img.shields.io/badge/Tests-not%20implemented-yellow">
13
- </p>
14
-
15
- **mqtt-plus** ist ein Adapter für [ioBroker](https://www.iobroker.net/), der ioBroker-Datenpunkte
16
- mit dem Namespace eines bereits installierten MQTT-Client-Adapters (z. B. `mqtt.0`) spiegelt.
17
- Er legt die nötige Ordnerstruktur automatisch an, konvertiert Werte live, bietet ein
18
- abgesichertes Web-Dashboard für Backup/Restore und kann Daten zusätzlich per HTTP(S) an einen
19
- externen Webhook senden.
20
-
21
- `mqtt-plus` spricht selbst kein MQTT-Protokoll — Verbindung, QoS und `retain` zum eigentlichen
22
- Broker liegen vollständig beim separat installierten MQTT-Adapter, auf dessen Namespace
23
- `mqtt-plus` nur liest/schreibt.
24
-
25
- ## Funktionsumfang
26
-
27
- * **Bidirektionale Spiegelung** — `out` (IOB → MQTT), `in` (MQTT → IOB) oder `both`.
28
- * **Topic-Modus pro Mapping** — `single` (ein gemeinsames Topic) oder `dual` nach üblicher
29
- MQTT-Konvention (Status auf `<topic>`, Befehle auf `<topic>/set`).
30
- * **Typ-Konvertierung** — Runden, Bool ↔ Zahl oder automatische Erkennung des Zieltyps, in
31
- beide Richtungen.
32
- * **Unverfälschte Zeitstempel** — der Spiegel übernimmt `ts`/`lc`/`q` der Quelle statt bei
33
- jedem Kopiervorgang ein neues "jetzt" zu setzen. Inaktive Quellen (Alter oder Qualität)
34
- werden erkannt und nicht künstlich frisch gehalten; drei Sync-Modi pro Mapping erlauben
35
- Ausnahmen für selten meldende Sensoren oder bewusst immer frische Ziele.
36
- * **Force-Sync** — vergleicht Quelle und Ziel direkt und heilt nur echte Abweichungen, z. B.
37
- nach einem Neustart oder Verbindungsabbruch.
38
- * **Ack-Filter pro Mapping** — für Datenpunkte ohne echtes Gerät dahinter
1
+ ![Logo](admin/mqtt-plus.png)
2
+ # ioBroker.mqtt-plus
3
+
4
+ [![NPM version](https://img.shields.io/npm/v/iobroker.mqtt-plus.svg)](https://www.npmjs.com/package/iobroker.mqtt-plus)
5
+ [![Downloads](https://img.shields.io/npm/dm/iobroker.mqtt-plus.svg)](https://www.npmjs.com/package/iobroker.mqtt-plus)
6
+ ![Number of Installations](https://iobroker.live/badges/mqtt-plus-installed.svg)
7
+ ![Current version in stable repository](https://iobroker.live/badges/mqtt-plus-stable.svg)
8
+
9
+ [![NPM](https://nodei.co/npm/iobroker.mqtt-plus.png?downloads=true)](https://nodei.co/npm/iobroker.mqtt-plus/)
10
+
11
+ **Tests:** ![Test and Release](https://github.com/Proxyyy87/ioBroker.mqtt-plus/workflows/Test%20and%20Release/badge.svg)
12
+
13
+ ## mqtt-plus adapter for ioBroker
14
+
15
+ **mqtt-plus** mirrors ioBroker states into the namespace of an already installed MQTT client
16
+ adapter (e.g. `mqtt.0`) and back. It creates the required folder structure automatically,
17
+ converts values on the fly, provides a secured web dashboard for backup/restore and can
18
+ additionally push the data to an external webhook via HTTP(S).
19
+
20
+ `mqtt-plus` does not speak the MQTT protocol itself. Connection, QoS and `retain` towards the
21
+ broker are handled entirely by the separately installed MQTT adapter; `mqtt-plus` only reads
22
+ and writes states in its namespace.
23
+
24
+ ### Features
25
+
26
+ * **Bidirectional mirroring** – `out` (ioBroker → MQTT), `in` (MQTT → ioBroker) or `both`.
27
+ * **Topic mode per mapping** – `single` (one shared topic) or `dual` following the common MQTT
28
+ convention (state on `<topic>`, commands on `<topic>/set`).
29
+ * **Type conversion** – rounding, boolean ↔ number or automatic detection of the target type,
30
+ in both directions.
31
+ * **Unaltered timestamps** – the mirror takes over `ts`/`lc`/`q` of the source instead of
32
+ setting a new "now" on every copy. Inactive sources (age or quality) are detected and not kept
33
+ artificially fresh. Three sync modes per mapping allow exceptions for rarely reporting sensors
34
+ or targets that should always look fresh.
35
+ * **Force sync** – compares source and target directly and only heals real deviations, e.g.
36
+ after a restart or a lost connection.
37
+ * **Ack filter per mapping** – for states without a real device behind them
39
38
  (`0_userdata.0.*`, `alias.0.*`).
40
- * **Abgesichertes Web-Dashboard** — Basic-Auth mit Brute-Force-Sperre, optional HTTPS,
41
- CSRF-/CORS-Schutz. Live-Status, JSON-Struktur-Vorschau, Backup & Restore.
42
- * **Remote Sync** — sendet die Daten zyklisch oder manuell per HTTP(S) POST an einen externen
43
- Webhook, Payload frei per Template konfigurierbar, TLS-Prüfung immer aktiv (optionale eigene
44
- CA für interne/selbstsignierte Ziele).
45
- * **Admin 7 Ready** — modernes `jsonConfig` mit responsiven Elementen.
39
+ * **Secured web dashboard** – basic auth with brute-force lockout, optional HTTPS, CSRF/CORS
40
+ protection. Live status, JSON structure preview, backup & restore.
41
+ * **Remote sync** – sends the data periodically or on demand via HTTP(S) POST to an external
42
+ webhook. The payload is freely configurable via template; TLS verification is always active
43
+ (an own CA can be configured for internal/self-signed targets).
46
44
 
47
- Die vollständige Konfigurationsanleitung inklusive aller Details zu Topic-Modus, Echo-Schutz,
48
- Sync-Modus und Remote-Sync-Templates steht in **[admin/readme.md](admin/readme.md)** — das ist
49
- derselbe Text, den ioBroker Admin auch in der Instanz-Ansicht anzeigt.
45
+ ### Requirements
50
46
 
51
- ## Status der Aufnahme ins offizielle ioBroker-Repository
47
+ * js-controller >= 6.0.11
48
+ * Admin >= 7.6.20
49
+ * Node.js >= 22
50
+ * An installed and configured MQTT client adapter (e.g.
51
+ [ioBroker.mqtt](https://github.com/ioBroker/ioBroker.mqtt)) whose namespace is used as target
52
+ prefix.
52
53
 
53
- `mqtt-plus` ist derzeit **nicht** Teil des offiziellen ioBroker-`latest`-Repositories und noch
54
- nicht auf npm veröffentlicht — Installation läuft bis dahin ausschließlich direkt aus diesem
55
- Git-Repository (siehe [Installation](#installation)). Der offizielle
56
- [ioBroker Adapter-Checker](https://adapter-check.iobroker.in/) läuft bereits fehlerfrei bis auf
57
- die Prüfungen, die zwingend eine vorherige npm-Veröffentlichung voraussetzen. Bis zur Aufnahme
58
- fehlen noch:
54
+ ### Configuration
59
55
 
60
- 1. `npm publish` — Veröffentlichung auf dem npm-Registry.
61
- 2. Ein Pull Request gegen [ioBroker/ioBroker.repositories](https://github.com/ioBroker/ioBroker.repositories),
62
- der den Adapter in die `latest`-Liste einträgt.
56
+ The complete configuration guide (topic mode, echo protection, sync mode, remote sync
57
+ templates) is available in German in [admin/readme.md](admin/readme.md) – this is the same text
58
+ that ioBroker Admin shows in the instance view.
63
59
 
64
- ## Installation
65
-
66
- Installation direkt aus diesem Repository:
67
-
68
- **Über die Admin-Oberfläche:**
69
- Instanzen → "+" → Reiter *Benutzerdefiniert* → GitHub-URL eintragen:
70
-
71
- ```
72
- https://github.com/Proxyyy87/ioBroker.mqtt-plus/
73
- ```
74
-
75
- **Über die Kommandozeile:**
76
-
77
- ```bash
78
- iobroker url https://github.com/Proxyyy87/ioBroker.mqtt-plus/tarball/main mqtt-plus
79
- ```
80
-
81
- Beim Installieren aus dem Git-Repository wird TypeScript automatisch kompiliert
82
- (`npm`-`prepare`-Skript) — ein manueller Build-Schritt ist nicht nötig.
83
-
84
- Vorausgesetzt wird ein bereits eingerichteter MQTT-Client-Adapter (z. B.
85
- [ioBroker.mqtt](https://github.com/ioBroker/ioBroker.mqtt)), dessen Namespace `mqtt-plus` als
86
- Ziel-Präfix verwendet.
87
-
88
- ## Entwicklung
89
-
90
- ```bash
91
- git clone https://github.com/Proxyyy87/ioBroker.mqtt-plus.git
92
- cd ioBroker.mqtt-plus
93
- npm install
94
- npm run build # kompiliert src/*.ts nach build/
95
- npm run watch # kompiliert bei Änderungen automatisch neu
96
- ```
97
-
98
- **Wichtig für Pull Requests:** Der Ordner `build/` wird bewusst mitversioniert (nicht per
99
- `.gitignore` ausgeschlossen), weil der offizielle ioBroker Adapter-Checker die Datei `main`
100
- (`build/main.js`) direkt aus dem Repository lädt, ohne vorher `npm install`/`prepare`
101
- auszuführen. Nach jeder Änderung an `src/*.ts` also `npm run build` laufen lassen und den
102
- aktualisierten `build/`-Ordner mit committen.
103
-
104
- Technisch basiert der Adapter auf TypeScript, `@iobroker/adapter-core` und `axios`; das
105
- Web-Dashboard und der HTTP(S)-Server sind mit Bordmitteln von Node.js (`http`/`https`)
106
- umgesetzt, ohne zusätzliches Web-Framework. `@iobroker/testing` ist als devDependency
107
- vorbereitet, aktuell gibt es aber noch keine automatisierten Tests (siehe Test-Badge oben).
60
+ The adapter is currently in the review process for the official ioBroker repository.
108
61
 
109
62
  ## Changelog
110
-
111
- Die vollständige Versionshistorie steht in [`io-package.json`](io-package.json) unter
112
- `common.news`. Die letzten Versionen:
113
-
114
- * **1.6.1** — Sync-Modus pro Mapping (`Standard`, `Jede Meldung weiterreichen`,
115
- `Force wie vor 1.6.0`); Mapping-Einstellungen als aufklappbare Liste mit zwei kurzen Zeilen
116
- pro Eintrag statt einer breiten Tabelle.
117
- * **1.6.0** — Zeitstempel (`ts`/`lc`/`q`) werden beim Spiegeln durchgereicht statt überschrieben;
118
- Start, Update-Intervall und Force-Sync überspringen inaktive Quellen; Force-Sync schreibt nur
119
- tatsächlich abweichende Werte; neue Remote-Sync-Platzhalter `%LC%`, `%ACK%`, `%Q%`.
120
- * **1.5.x** — Topic-Modus `dual` (Status/Befehl auf getrennten Topics) pro Mapping.
121
-
122
- ## Lizenz
123
-
124
- MIT — siehe [LICENSE](LICENSE).
63
+ <!--
64
+ Placeholder for the next version (at the beginning of the line):
65
+ ### **WORK IN PROGRESS**
66
+ -->
67
+ ### 1.6.2 (2026-09-22)
68
+ * (proxy) Web server retries several times if the port is still in use (e.g. during an update)
69
+ instead of shutting the instance down permanently
70
+ * (proxy) Compact mode compatibility: removed `process.exit()`, adapter timers are used for delays
71
+ * (proxy) Node.js 22 is required as minimum, dependencies updated
72
+ * (proxy) Admin configuration validated against the official jsonConfig schema
73
+ * (proxy) Translations for all supported languages, GitHub Actions workflow for tests and release
74
+
75
+ ### 1.6.1 (2026-09-22)
76
+ * (proxy) Per-mapping sync mode: "standard", "pass every update" (same value with a newer
77
+ timestamp is mirrored, for rarely changing sensors) or "force as before 1.6.0"
78
+ * (proxy) Mapping settings are shown as accordion with two short rows per entry
79
+
80
+ ## License
81
+ MIT License
82
+
83
+ Copyright (c) 2026 proxy <zumloeschen@ich.ms>
84
+
85
+ Permission is hereby granted, free of charge, to any person obtaining a copy
86
+ of this software and associated documentation files (the "Software"), to deal
87
+ in the Software without restriction, including without limitation the rights
88
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
89
+ copies of the Software, and to permit persons to whom the Software is
90
+ furnished to do so, subject to the following conditions:
91
+
92
+ The above copyright notice and this permission notice shall be included in all
93
+ copies or substantial portions of the Software.
94
+
95
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
96
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
97
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
98
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
99
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
100
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
101
+ SOFTWARE.