Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. [Erledigt]BME280 mit ESP8266 von MQTT auf Webserver als Text

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    [Erledigt]BME280 mit ESP8266 von MQTT auf Webserver als Text

    This topic has been deleted. Only users with topic management privileges can see it.
    • mickym
      mickym Most Active @jabba76 last edited by

      @jabba76 Ab 23 Uhr habe ich bissi mehr Zeit - dann mach ich Dir einen Vorschlag. 😉

      J 1 Reply Last reply Reply Quote 0
      • J
        jabba76 @mickym last edited by jabba76

        @mickym

        Ok keine Eile weiß nicht, ob ich noch da bin dann schaue ich mir das morgen an.

        Die Payload von dem zweiten Sensor sind die gleichen nur halt esp02 steht da

        Vielen Dank

        mickym 2 Replies Last reply Reply Quote 0
        • mickym
          mickym Most Active @jabba76 last edited by mickym

          @jabba76 So ich hab Dir jetzt mal auf die schnelle was gebastelt - aber ich bin kein HTML Spezi.

          Grundsätzlich habe ich mal mit Inject Nodes - Deine JSON Nachrichten simuliert - Du musst für einen Sensor mindestens alle 3 - 1 mal betätigen - später werden die Werte nur noch aktualisiert.

          Das Ganze dann in einer Template Node verarbeitet wie gewünscht.

          Da Du ja JSON Strings rausbekommst - habe ich auch Strings genommen, ansonsten wenn Du Objekte bekommst ist es noch besser.

          Also die oberen 3 Inject Nodes simulieren den ersten Sensor mit den JSON Strings die Du gepostet hast, die unteren 3 einen 2.Sensor bei dem ich nur die Werte leicht geändert habe:

          4e67f24b-f696-46d6-bab2-9cbfde85183a-image.png

          Die Ausgabe dieser blauen Template Nodes sieht dann wie folgt aus - wie gesagt Du brauchst ja nur Text und ich habe keine Formatierungen vorgenommen, um es schön zu machen:

          9ed00b4b-aff9-4d12-9cb7-2261f280ce8f-image.png

          Wenn Du die Sensordaten dann noch quasi in mehreren Objekten zusammenfassen willst kannst Du dann auch Tabellen erstellen - deshalb hier mal die beiden nochmals in eine Nachricht zusammengefasst - wobei ich einfach mal Deinen Sensor esp02 - als Sensor im Bad genommen habe, esp01 als Sensor im Wohnzimmer. 😉

          Hier also grafisch der vollständige Flow:

          4937934b-f7a9-41f8-9842-d6a462e6b45b-image.png

          Dann könnte die Payload aus mehreren Objekten bestehen, wie Du aus dem Output der letzten debug Node siehst:

          8bfd10da-db7d-4639-a6c8-670fbfab0657-image.png

          Eine Tabelle aus dem eben gezeigten Objekt würde man dann ungefähr so aussehen:

          31b1cc5f-fbc4-4d93-ab5f-d1b0ad4db822-image.png

          Und zum Schluß noch der Flow zum Importieren, damit Du selbst damit spielen kannst und mit Deinen Sensoren füttern kannst:

          [
             {
                 "id": "a23951ac.62498",
                 "type": "inject",
                 "z": "6e170384.60c96c",
                 "name": "esp01/temperature",
                 "props": [
                     {
                         "p": "payload"
                     }
                 ],
                 "repeat": "",
                 "crontab": "",
                 "once": false,
                 "onceDelay": 0.1,
                 "topic": "",
                 "payload": "{\"topic\":\"esp01/temperature\",\"payload\":\"27.71\",\"qos\":1,\"retain\":true,\"_topic\":\"esp01/temperature\",\"_msgid\":\"9c900137.efb7b\"}",
                 "payloadType": "str",
                 "x": 2430,
                 "y": 2900,
                 "wires": [
                     [
                         "34511f41.1fc9d"
                     ]
                 ]
             },
             {
                 "id": "896f66a7.b2e9c8",
                 "type": "inject",
                 "z": "6e170384.60c96c",
                 "name": "esp01/humidity",
                 "props": [
                     {
                         "p": "payload"
                     }
                 ],
                 "repeat": "",
                 "crontab": "",
                 "once": false,
                 "onceDelay": 0.1,
                 "topic": "",
                 "payload": "{\"topic\":\"esp01/humidity\",\"payload\":\"46.65\",\"qos\":1,\"retain\":true,\"_topic\":\"esp01/humidity\",\"_msgid\":\"3d6f2cec.f64da4\"}",
                 "payloadType": "str",
                 "x": 2420,
                 "y": 2980,
                 "wires": [
                     [
                         "34511f41.1fc9d"
                     ]
                 ]
             },
             {
                 "id": "a887368c.b8a4f8",
                 "type": "inject",
                 "z": "6e170384.60c96c",
                 "name": "esp01/pressure",
                 "props": [
                     {
                         "p": "payload"
                     }
                 ],
                 "repeat": "",
                 "crontab": "",
                 "once": false,
                 "onceDelay": 0.1,
                 "topic": "",
                 "payload": "{\"topic\":\"esp01/pressure\",\"payload\":\"1030.77\",\"qos\":1,\"retain\":true,\"_topic\":\"esp01/pressure\",\"_msgid\":\"402e6b69.3286b4\"}",
                 "payloadType": "str",
                 "x": 2420,
                 "y": 2940,
                 "wires": [
                     [
                         "34511f41.1fc9d"
                     ]
                 ]
             },
             {
                 "id": "34511f41.1fc9d",
                 "type": "json",
                 "z": "6e170384.60c96c",
                 "name": "",
                 "property": "payload",
                 "action": "",
                 "pretty": false,
                 "x": 2660,
                 "y": 2940,
                 "wires": [
                     [
                         "e72ce6df.f24288"
                     ]
                 ]
             },
             {
                 "id": "e72ce6df.f24288",
                 "type": "change",
                 "z": "6e170384.60c96c",
                 "name": "",
                 "rules": [
                     {
                         "t": "move",
                         "p": "payload",
                         "pt": "msg",
                         "to": "sensor",
                         "tot": "msg"
                     },
                     {
                         "t": "set",
                         "p": "topic",
                         "pt": "msg",
                         "to": "sensor.topic",
                         "tot": "msg"
                     },
                     {
                         "t": "change",
                         "p": "topic",
                         "pt": "msg",
                         "from": ".*\\/(.*)",
                         "fromt": "re",
                         "to": "$1",
                         "tot": "str"
                     },
                     {
                         "t": "set",
                         "p": "payload",
                         "pt": "msg",
                         "to": "sensor.payload",
                         "tot": "msg"
                     },
                     {
                         "t": "delete",
                         "p": "sensor",
                         "pt": "msg"
                     }
                 ],
                 "action": "",
                 "property": "",
                 "from": "",
                 "to": "",
                 "reg": false,
                 "x": 2840,
                 "y": 2940,
                 "wires": [
                     [
                         "fbe948a7.3fc2b8"
                     ]
                 ]
             },
             {
                 "id": "fbe948a7.3fc2b8",
                 "type": "join",
                 "z": "6e170384.60c96c",
                 "name": "",
                 "mode": "custom",
                 "build": "object",
                 "property": "payload",
                 "propertyType": "msg",
                 "key": "topic",
                 "joiner": "\\n",
                 "joinerType": "str",
                 "accumulate": true,
                 "timeout": "",
                 "count": "3",
                 "reduceRight": false,
                 "reduceExp": "",
                 "reduceInit": "",
                 "reduceInitType": "",
                 "reduceFixup": "",
                 "x": 3050,
                 "y": 2940,
                 "wires": [
                     [
                         "6426d775.568bd8",
                         "c9d2f72c.06d2c8"
                     ]
                 ]
             },
             {
                 "id": "6426d775.568bd8",
                 "type": "ui_template",
                 "z": "6e170384.60c96c",
                 "group": "9efdcbae.2c5598",
                 "name": "ESP01",
                 "order": 8,
                 "width": "6",
                 "height": "3",
                 "format": "<p> Dies sind Werte des Sensors ESP01:<br>\nTemperatur: {{msg.payload.temperature}} °Celsius<br>\nDruck: {{msg.payload.pressure}} %<br>\nFeuchtigkeit: {{msg.payload.humidity}} hPa<br>\n</p>",
                 "storeOutMessages": true,
                 "fwdInMessages": true,
                 "resendOnRefresh": true,
                 "templateScope": "local",
                 "x": 3270,
                 "y": 2940,
                 "wires": [
                     []
                 ]
             },
             {
                 "id": "1f4eec1e.0eb874",
                 "type": "inject",
                 "z": "6e170384.60c96c",
                 "name": "esp02/temperature",
                 "props": [
                     {
                         "p": "payload"
                     }
                 ],
                 "repeat": "",
                 "crontab": "",
                 "once": false,
                 "onceDelay": 0.1,
                 "topic": "",
                 "payload": "{\"topic\":\"esp02/temperature\",\"payload\":\"15.48\",\"qos\":1,\"retain\":true,\"_topic\":\"esp02/temperature\",\"_msgid\":\"9c900137.efb7b\"}",
                 "payloadType": "str",
                 "x": 2430,
                 "y": 3040,
                 "wires": [
                     [
                         "f930269e.45ba98"
                     ]
                 ]
             },
             {
                 "id": "371b0199.1a5cbe",
                 "type": "inject",
                 "z": "6e170384.60c96c",
                 "name": "esp01/humidity",
                 "props": [
                     {
                         "p": "payload"
                     }
                 ],
                 "repeat": "",
                 "crontab": "",
                 "once": false,
                 "onceDelay": 0.1,
                 "topic": "",
                 "payload": "{\"topic\":\"esp02/humidity\",\"payload\":\"66.85\",\"qos\":1,\"retain\":true,\"_topic\":\"esp02/humidity\",\"_msgid\":\"3d6f2cec.f64da4\"}",
                 "payloadType": "str",
                 "x": 2420,
                 "y": 3120,
                 "wires": [
                     [
                         "f930269e.45ba98"
                     ]
                 ]
             },
             {
                 "id": "81340953.42add8",
                 "type": "inject",
                 "z": "6e170384.60c96c",
                 "name": "esp02/pressure",
                 "props": [
                     {
                         "p": "payload"
                     }
                 ],
                 "repeat": "",
                 "crontab": "",
                 "once": false,
                 "onceDelay": 0.1,
                 "topic": "",
                 "payload": "{\"topic\":\"esp02/pressure\",\"payload\":\"968.22\",\"qos\":1,\"retain\":true,\"_topic\":\"esp02/pressure\",\"_msgid\":\"402e6b69.3286b4\"}",
                 "payloadType": "str",
                 "x": 2420,
                 "y": 3080,
                 "wires": [
                     [
                         "f930269e.45ba98"
                     ]
                 ]
             },
             {
                 "id": "f930269e.45ba98",
                 "type": "json",
                 "z": "6e170384.60c96c",
                 "name": "",
                 "property": "payload",
                 "action": "",
                 "pretty": false,
                 "x": 2660,
                 "y": 3080,
                 "wires": [
                     [
                         "3743ee9f.58b6e2"
                     ]
                 ]
             },
             {
                 "id": "3743ee9f.58b6e2",
                 "type": "change",
                 "z": "6e170384.60c96c",
                 "name": "",
                 "rules": [
                     {
                         "t": "move",
                         "p": "payload",
                         "pt": "msg",
                         "to": "sensor",
                         "tot": "msg"
                     },
                     {
                         "t": "set",
                         "p": "topic",
                         "pt": "msg",
                         "to": "sensor.topic",
                         "tot": "msg"
                     },
                     {
                         "t": "change",
                         "p": "topic",
                         "pt": "msg",
                         "from": ".*\\/(.*)",
                         "fromt": "re",
                         "to": "$1",
                         "tot": "str"
                     },
                     {
                         "t": "set",
                         "p": "payload",
                         "pt": "msg",
                         "to": "sensor.payload",
                         "tot": "msg"
                     },
                     {
                         "t": "delete",
                         "p": "sensor",
                         "pt": "msg"
                     }
                 ],
                 "action": "",
                 "property": "",
                 "from": "",
                 "to": "",
                 "reg": false,
                 "x": 2840,
                 "y": 3080,
                 "wires": [
                     [
                         "2db197c8.56c048"
                     ]
                 ]
             },
             {
                 "id": "2db197c8.56c048",
                 "type": "join",
                 "z": "6e170384.60c96c",
                 "name": "",
                 "mode": "custom",
                 "build": "object",
                 "property": "payload",
                 "propertyType": "msg",
                 "key": "topic",
                 "joiner": "\\n",
                 "joinerType": "str",
                 "accumulate": true,
                 "timeout": "",
                 "count": "3",
                 "reduceRight": false,
                 "reduceExp": "",
                 "reduceInit": "",
                 "reduceInitType": "",
                 "reduceFixup": "",
                 "x": 3050,
                 "y": 3080,
                 "wires": [
                     [
                         "d619099a.00e258",
                         "73f2918.b24117"
                     ]
                 ]
             },
             {
                 "id": "d619099a.00e258",
                 "type": "ui_template",
                 "z": "6e170384.60c96c",
                 "group": "9efdcbae.2c5598",
                 "name": "ESP02",
                 "order": 8,
                 "width": "6",
                 "height": "3",
                 "format": "<p> Dies sind Werte des Sensors ESP02:<br>\nTemperatur: {{msg.payload.temperature}} °Celsius<br>\nDruck: {{msg.payload.pressure}} %<br>\nFeuchtigkeit: {{msg.payload.humidity}} hPa<br>\n</p>",
                 "storeOutMessages": true,
                 "fwdInMessages": true,
                 "resendOnRefresh": true,
                 "templateScope": "local",
                 "x": 3270,
                 "y": 3080,
                 "wires": [
                     []
                 ]
             },
             {
                 "id": "3ff9d3fd.aea04c",
                 "type": "debug",
                 "z": "6e170384.60c96c",
                 "name": "",
                 "active": true,
                 "tosidebar": true,
                 "console": false,
                 "tostatus": false,
                 "complete": "payload",
                 "targetType": "msg",
                 "statusVal": "",
                 "statusType": "auto",
                 "x": 3690,
                 "y": 3080,
                 "wires": []
             },
             {
                 "id": "c9d2f72c.06d2c8",
                 "type": "change",
                 "z": "6e170384.60c96c",
                 "name": "",
                 "rules": [
                     {
                         "t": "set",
                         "p": "topic",
                         "pt": "msg",
                         "to": "Wohnzimmer",
                         "tot": "str"
                     },
                     {
                         "t": "set",
                         "p": "payload.raum",
                         "pt": "msg",
                         "to": "Wohnzimmer (ESP01)",
                         "tot": "str"
                     }
                 ],
                 "action": "",
                 "property": "",
                 "from": "",
                 "to": "",
                 "reg": false,
                 "x": 3220,
                 "y": 3020,
                 "wires": [
                     [
                         "55e5577c.843418"
                     ]
                 ]
             },
             {
                 "id": "73f2918.b24117",
                 "type": "change",
                 "z": "6e170384.60c96c",
                 "name": "",
                 "rules": [
                     {
                         "t": "set",
                         "p": "topic",
                         "pt": "msg",
                         "to": "Bad",
                         "tot": "str"
                     },
                     {
                         "t": "set",
                         "p": "payload.raum",
                         "pt": "msg",
                         "to": "Bad (ESP02)",
                         "tot": "str"
                     }
                 ],
                 "action": "",
                 "property": "",
                 "from": "",
                 "to": "",
                 "reg": false,
                 "x": 3220,
                 "y": 3140,
                 "wires": [
                     [
                         "55e5577c.843418"
                     ]
                 ]
             },
             {
                 "id": "55e5577c.843418",
                 "type": "join",
                 "z": "6e170384.60c96c",
                 "name": "",
                 "mode": "custom",
                 "build": "object",
                 "property": "payload",
                 "propertyType": "msg",
                 "key": "topic",
                 "joiner": "\\n",
                 "joinerType": "str",
                 "accumulate": true,
                 "timeout": "",
                 "count": "1",
                 "reduceRight": false,
                 "reduceExp": "",
                 "reduceInit": "",
                 "reduceInitType": "",
                 "reduceFixup": "",
                 "x": 3500,
                 "y": 3080,
                 "wires": [
                     [
                         "3ff9d3fd.aea04c",
                         "4993f243.85129c"
                     ]
                 ]
             },
             {
                 "id": "4993f243.85129c",
                 "type": "ui_template",
                 "z": "6e170384.60c96c",
                 "group": "266da421.7e894c",
                 "name": "Tabelle",
                 "order": 2,
                 "width": "12",
                 "height": "3",
                 "format": "<style>\n.main\n{\n    height:100%;\n    width:100%;\n    /* background:lightblue; */\n        \n}\n\n\n#t01 th {\n     \n  padding: 5px;\n  font-size:120%;\n  color: var(--nr-dashboard-groupTextColor);\n   /* color:#0eb8c0;  */\n}\n#t01 td {\n     \n  padding: 5px;\n\n}\n    \n</style>\n\n<div class=\"main\">\n\n    <table id=\"t01\">\n\n   \n    <tr><th  width=160>Raum</th><th  width=100>Temperatur</th><th width=100>Druck</th><th width=100>Feuchtigkeit</th></tr>\n     <tr ng-repeat=\"(key, y) in msg.payload\">\n    <td align=left>{{y.raum}}</td><td align=center>{{y.temperature}} °Celsius</td><td align=center>{{y.pressure}} hPa</td><td align=center>{{y.humidity}} %</td>\n \n        \n    </tr>\n    \n    </table>\n\n\n</div>",
                 "storeOutMessages": true,
                 "fwdInMessages": true,
                 "resendOnRefresh": true,
                 "templateScope": "local",
                 "x": 3680,
                 "y": 3140,
                 "wires": [
                     []
                 ]
             },
             {
                 "id": "9efdcbae.2c5598",
                 "type": "ui_group",
                 "name": "Sensordaten",
                 "tab": "dc25fe35.866f",
                 "order": 3,
                 "disp": true,
                 "width": "6",
                 "collapse": false
             },
             {
                 "id": "266da421.7e894c",
                 "type": "ui_group",
                 "name": "Tabelle Sensordaten",
                 "tab": "dc25fe35.866f",
                 "order": 4,
                 "disp": true,
                 "width": "12",
                 "collapse": false
             },
             {
                 "id": "dc25fe35.866f",
                 "type": "ui_tab",
                 "name": "Test",
                 "icon": "dashboard",
                 "order": 14,
                 "disabled": false,
                 "hidden": false
             }
          ]
          

          Ach und statt Bad nimmst halt Terasse 😉

          1 Reply Last reply Reply Quote 0
          • mickym
            mickym Most Active @jabba76 last edited by mickym

            @jabba76 So ich habe noch ein bisschen weiter gebastelt 😉 😉 - weil mir eingefallen ist, dass Du vielleicht mit mqtt Wildcards als Input arbeiten möchtest und dann muss man nicht einen Datenpunkt abgreifen, sondern es können beliebig viele ankommen.

            Dann muss man das Ganze ordnen und ich habe das jetzt mal manuell gemacht indem ich über eine Change Node mit 13 Regeln 😉 so ein msg.parts Objekt gefüllt habe - damit eine Join Node das automatisch zusammensetzen kann. Das könnte man ggf. auch aufteilen - aber das überlasse ich jemand anders.

            Eine Beschreibung zum msg.parts Objekt findet man hier:

            Füllt man diese werden über die Change Node erst dann Nachrichten ausgegeben, wenn alle 3 Werte (Temperatur, Druck und Feuchtigkeit) komplett sind.

            Man sieht auch hier anhand der Debug Node - wie erst alle 3 Werte eines Sensors ankommen müssen, bevor die endgültige Nachricht erzeugt wurde.

            Beim ersten Node habe ich mal gezeigt, wie das msg.parts Objekt gefüllt wird, damit die JOIN Node das automatisch zusammensetzen kann.

            0afaa3cb-ccbc-4f11-aab6-93b88ad08deb-image.png

            Die Ausgabe ist die gleiche nur dass nun die Ausgabe welchen Sensors variabel und nicht mehr fix ist:

            d90ebdfe-9744-4209-8753-ed6a2ef61d03-image.png

            Diese wird wie man sieht nun über den msg. topic geschrieben (hier mal der Inhalt der Template Node):

            <p> Dies sind Werte des Sensors {{msg.topic}}:<br>
            Temperatur: {{msg.payload.temperature}} °Celsius<br>
            Druck: {{msg.payload.pressure}} %<br>
            Feuchtigkeit: {{msg.payload.humidity}} hPa<br>
            </p>
            

            Hier wieder der Flow zum Import:

            [
               {
                   "id": "ab61c658.d5e478",
                   "type": "inject",
                   "z": "6e170384.60c96c",
                   "name": "esp01/temperature",
                   "props": [
                       {
                           "p": "payload"
                       }
                   ],
                   "repeat": "",
                   "crontab": "",
                   "once": false,
                   "onceDelay": 0.1,
                   "topic": "",
                   "payload": "{\"topic\":\"esp01/temperature\",\"payload\":\"27.71\",\"qos\":1,\"retain\":true,\"_topic\":\"esp01/temperature\",\"_msgid\":\"9c900137.efb7b\"}",
                   "payloadType": "str",
                   "x": 2450,
                   "y": 3240,
                   "wires": [
                       [
                           "eee07f4a.41fa4"
                       ]
                   ]
               },
               {
                   "id": "3f35b8e2.762838",
                   "type": "inject",
                   "z": "6e170384.60c96c",
                   "name": "esp01/humidity",
                   "props": [
                       {
                           "p": "payload"
                       }
                   ],
                   "repeat": "",
                   "crontab": "",
                   "once": false,
                   "onceDelay": 0.1,
                   "topic": "",
                   "payload": "{\"topic\":\"esp01/humidity\",\"payload\":\"46.65\",\"qos\":1,\"retain\":true,\"_topic\":\"esp01/humidity\",\"_msgid\":\"3d6f2cec.f64da4\"}",
                   "payloadType": "str",
                   "x": 2440,
                   "y": 3320,
                   "wires": [
                       [
                           "eee07f4a.41fa4"
                       ]
                   ]
               },
               {
                   "id": "26c66965.fdf586",
                   "type": "inject",
                   "z": "6e170384.60c96c",
                   "name": "esp01/pressure",
                   "props": [
                       {
                           "p": "payload"
                       }
                   ],
                   "repeat": "",
                   "crontab": "",
                   "once": false,
                   "onceDelay": 0.1,
                   "topic": "",
                   "payload": "{\"topic\":\"esp01/pressure\",\"payload\":\"1030.77\",\"qos\":1,\"retain\":true,\"_topic\":\"esp01/pressure\",\"_msgid\":\"402e6b69.3286b4\"}",
                   "payloadType": "str",
                   "x": 2440,
                   "y": 3280,
                   "wires": [
                       [
                           "eee07f4a.41fa4"
                       ]
                   ]
               },
               {
                   "id": "2f3f7e6e.6a06b2",
                   "type": "inject",
                   "z": "6e170384.60c96c",
                   "name": "esp02/temperature",
                   "props": [
                       {
                           "p": "payload"
                       }
                   ],
                   "repeat": "",
                   "crontab": "",
                   "once": false,
                   "onceDelay": 0.1,
                   "topic": "",
                   "payload": "{\"topic\":\"esp02/temperature\",\"payload\":\"15.48\",\"qos\":1,\"retain\":true,\"_topic\":\"esp02/temperature\",\"_msgid\":\"9c900137.efb7b\"}",
                   "payloadType": "str",
                   "x": 2450,
                   "y": 3380,
                   "wires": [
                       [
                           "eee07f4a.41fa4"
                       ]
                   ]
               },
               {
                   "id": "9feefd2c.8feea",
                   "type": "inject",
                   "z": "6e170384.60c96c",
                   "name": "esp01/humidity",
                   "props": [
                       {
                           "p": "payload"
                       }
                   ],
                   "repeat": "",
                   "crontab": "",
                   "once": false,
                   "onceDelay": 0.1,
                   "topic": "",
                   "payload": "{\"topic\":\"esp02/humidity\",\"payload\":\"66.85\",\"qos\":1,\"retain\":true,\"_topic\":\"esp02/humidity\",\"_msgid\":\"3d6f2cec.f64da4\"}",
                   "payloadType": "str",
                   "x": 2440,
                   "y": 3460,
                   "wires": [
                       [
                           "eee07f4a.41fa4"
                       ]
                   ]
               },
               {
                   "id": "d416cac9.ba0cb8",
                   "type": "inject",
                   "z": "6e170384.60c96c",
                   "name": "esp02/pressure",
                   "props": [
                       {
                           "p": "payload"
                       }
                   ],
                   "repeat": "",
                   "crontab": "",
                   "once": false,
                   "onceDelay": 0.1,
                   "topic": "",
                   "payload": "{\"topic\":\"esp02/pressure\",\"payload\":\"968.22\",\"qos\":1,\"retain\":true,\"_topic\":\"esp02/pressure\",\"_msgid\":\"402e6b69.3286b4\"}",
                   "payloadType": "str",
                   "x": 2440,
                   "y": 3420,
                   "wires": [
                       [
                           "eee07f4a.41fa4"
                       ]
                   ]
               },
               {
                   "id": "eee07f4a.41fa4",
                   "type": "json",
                   "z": "6e170384.60c96c",
                   "name": "",
                   "property": "payload",
                   "action": "",
                   "pretty": false,
                   "x": 2680,
                   "y": 3340,
                   "wires": [
                       [
                           "f5cdaa11.5bb828"
                       ]
                   ]
               },
               {
                   "id": "f5cdaa11.5bb828",
                   "type": "change",
                   "z": "6e170384.60c96c",
                   "name": "",
                   "rules": [
                       {
                           "t": "move",
                           "p": "payload",
                           "pt": "msg",
                           "to": "sensor",
                           "tot": "msg"
                       },
                       {
                           "t": "set",
                           "p": "parts",
                           "pt": "msg",
                           "to": "{\"type\":\"object\",\"index\":\"\",\"count\":3}",
                           "tot": "json"
                       },
                       {
                           "t": "set",
                           "p": "topic",
                           "pt": "msg",
                           "to": "sensor.topic",
                           "tot": "msg"
                       },
                       {
                           "t": "change",
                           "p": "topic",
                           "pt": "msg",
                           "from": "(.*)\\/.*",
                           "fromt": "re",
                           "to": "$1",
                           "tot": "str"
                       },
                       {
                           "t": "set",
                           "p": "parts.id",
                           "pt": "msg",
                           "to": "topic",
                           "tot": "msg"
                       },
                       {
                           "t": "set",
                           "p": "payload",
                           "pt": "msg",
                           "to": "sensor.payload",
                           "tot": "msg"
                       },
                       {
                           "t": "set",
                           "p": "parts.key",
                           "pt": "msg",
                           "to": "sensor.topic",
                           "tot": "msg"
                       },
                       {
                           "t": "change",
                           "p": "parts.key",
                           "pt": "msg",
                           "from": ".*\\/(.*)",
                           "fromt": "re",
                           "to": "$1",
                           "tot": "str"
                       },
                       {
                           "t": "set",
                           "p": "parts.index",
                           "pt": "msg",
                           "to": "parts.key",
                           "tot": "msg"
                       },
                       {
                           "t": "change",
                           "p": "parts.index",
                           "pt": "msg",
                           "from": "temperature",
                           "fromt": "str",
                           "to": "0",
                           "tot": "num"
                       },
                       {
                           "t": "change",
                           "p": "parts.index",
                           "pt": "msg",
                           "from": "pressure",
                           "fromt": "str",
                           "to": "1",
                           "tot": "num"
                       },
                       {
                           "t": "change",
                           "p": "parts.index",
                           "pt": "msg",
                           "from": "humidity",
                           "fromt": "str",
                           "to": "2",
                           "tot": "num"
                       },
                       {
                           "t": "delete",
                           "p": "sensor",
                           "pt": "msg"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 2860,
                   "y": 3340,
                   "wires": [
                       [
                           "e773f7b7.ec4878",
                           "55b76254.f5de9c"
                       ]
                   ]
               },
               {
                   "id": "a02344a8.acdd78",
                   "type": "debug",
                   "z": "6e170384.60c96c",
                   "name": "",
                   "active": false,
                   "tosidebar": true,
                   "console": false,
                   "tostatus": false,
                   "complete": "true",
                   "targetType": "full",
                   "statusVal": "",
                   "statusType": "auto",
                   "x": 3250,
                   "y": 3280,
                   "wires": []
               },
               {
                   "id": "e773f7b7.ec4878",
                   "type": "join",
                   "z": "6e170384.60c96c",
                   "name": "",
                   "mode": "auto",
                   "build": "string",
                   "property": "payload",
                   "propertyType": "msg",
                   "key": "topic",
                   "joiner": "\\n",
                   "joinerType": "str",
                   "accumulate": false,
                   "timeout": "",
                   "count": "",
                   "reduceRight": false,
                   "reduceExp": "",
                   "reduceInit": "",
                   "reduceInitType": "",
                   "reduceFixup": "",
                   "x": 3050,
                   "y": 3340,
                   "wires": [
                       [
                           "a02344a8.acdd78",
                           "90c0d28c.cca2f"
                       ]
                   ]
               },
               {
                   "id": "90c0d28c.cca2f",
                   "type": "ui_template",
                   "z": "6e170384.60c96c",
                   "group": "9efdcbae.2c5598",
                   "name": "ESP03",
                   "order": 8,
                   "width": "6",
                   "height": "5",
                   "format": "<p> Dies sind Werte des Sensors {{msg.topic}}:<br>\nTemperatur: {{msg.payload.temperature}} °Celsius<br>\nDruck: {{msg.payload.pressure}} %<br>\nFeuchtigkeit: {{msg.payload.humidity}} hPa<br>\n</p>",
                   "storeOutMessages": true,
                   "fwdInMessages": true,
                   "resendOnRefresh": true,
                   "templateScope": "local",
                   "x": 3260,
                   "y": 3340,
                   "wires": [
                       []
                   ]
               },
               {
                   "id": "55b76254.f5de9c",
                   "type": "debug",
                   "z": "6e170384.60c96c",
                   "name": "",
                   "active": false,
                   "tosidebar": true,
                   "console": false,
                   "tostatus": false,
                   "complete": "true",
                   "targetType": "full",
                   "statusVal": "",
                   "statusType": "auto",
                   "x": 3050,
                   "y": 3400,
                   "wires": []
               },
               {
                   "id": "9efdcbae.2c5598",
                   "type": "ui_group",
                   "name": "Sensordaten",
                   "tab": "dc25fe35.866f",
                   "order": 3,
                   "disp": true,
                   "width": "6",
                   "collapse": false
               },
               {
                   "id": "dc25fe35.866f",
                   "type": "ui_tab",
                   "name": "Test",
                   "icon": "dashboard",
                   "order": 14,
                   "disabled": false,
                   "hidden": false
               }
            ]
            

            Damit sollte das Prinzip eigentlich verstanden sein. 😉

            J 1 Reply Last reply Reply Quote 0
            • J
              jabba76 @mickym last edited by jabba76

              @mickym

              Hallo, danke für deine Zeit und Arbeit ich habe mich wohl schlecht ausgedrückt.
              Es soll nicht auf dem Dashboard sein, sondern über http in node mit GET als komplette Text ausgegeben werden und auf jeden Fall kein HTML das wird dann nicht unterstützt 🙂

              habe das von hier Link Text

              nur halt in der Template node nicht mit HTML, sondern TEXT

              Mit den einen Parameter funktioniert alles bestens, wie kann ich die anderen Parameter einbinden?

              mickym 4 Replies Last reply Reply Quote 0
              • mickym
                mickym Most Active @jabba76 last edited by mickym

                @jabba76 Nun mit etwas transfer-Denken hättest Du das ja auch ggf. modifizieren können. (Insofern waren meine Mühen nicht ganz umsonst, wie Du an der Modifikation des ursprünglichen Flows siehst 😉 😉 ) Im Prinzip lässt Du bei den reinen Template nodes - den msg_präfix weg - kann man wahrscheinlich auch bei den Dashboard templates machen.

                Ich hab jetzt mal alles ohne Formatierung gemacht.

                Du musst diesen Text dann eh als HTML Request Node rausschicken zu einem externen Webserver rausschicken.

                Falls nicht und Du Node RED als Webserver nutzen willst, wie in dem Link und nur Text raushaben willst, wie in dem Beispiel, dass Du verlinkt hast (der hat aber HTML Formatierungen drin gehabt) - dann speicherst Du das in einer Flow-Variablen ab und gibst es dann auf Anforderung heraus:
                Ohne Formatierungen kommt dann zum Bespiel mit beiden Sensoren kombiniert folgendes raus:

                screen.png

                Hier nochmal alles:

                621e31f9-f39a-4f99-8ff3-139c616dc572-image.png

                Also Du siehst das Grundprinzip bleibt gleich. Du kannst auch jeden Sensor in einer eigenen Flow-Variablen abspeichern und durch unterschiedliche Aufrufe der URL Dir entweder die Daten des einen oder anderen Sensors ausgeben lassen. Das sollte ja jetzt kein Problem mehr darstellen!

                Hier nochmal die Ausgaben der beiden Debug Nodes - als reiner Text:

                c87554d5-2f11-40e3-92c5-823889f2be3f-image.png

                Und nun den gesamten Flow:

                [
                   {
                       "id": "a23951ac.62498",
                       "type": "inject",
                       "z": "6e170384.60c96c",
                       "name": "esp01/temperature",
                       "props": [
                           {
                               "p": "payload"
                           }
                       ],
                       "repeat": "",
                       "crontab": "",
                       "once": false,
                       "onceDelay": 0.1,
                       "topic": "",
                       "payload": "{\"topic\":\"esp01/temperature\",\"payload\":\"27.71\",\"qos\":1,\"retain\":true,\"_topic\":\"esp01/temperature\",\"_msgid\":\"9c900137.efb7b\"}",
                       "payloadType": "str",
                       "x": 2430,
                       "y": 2900,
                       "wires": [
                           [
                               "34511f41.1fc9d"
                           ]
                       ]
                   },
                   {
                       "id": "896f66a7.b2e9c8",
                       "type": "inject",
                       "z": "6e170384.60c96c",
                       "name": "esp01/humidity",
                       "props": [
                           {
                               "p": "payload"
                           }
                       ],
                       "repeat": "",
                       "crontab": "",
                       "once": false,
                       "onceDelay": 0.1,
                       "topic": "",
                       "payload": "{\"topic\":\"esp01/humidity\",\"payload\":\"46.65\",\"qos\":1,\"retain\":true,\"_topic\":\"esp01/humidity\",\"_msgid\":\"3d6f2cec.f64da4\"}",
                       "payloadType": "str",
                       "x": 2420,
                       "y": 2980,
                       "wires": [
                           [
                               "34511f41.1fc9d"
                           ]
                       ]
                   },
                   {
                       "id": "a887368c.b8a4f8",
                       "type": "inject",
                       "z": "6e170384.60c96c",
                       "name": "esp01/pressure",
                       "props": [
                           {
                               "p": "payload"
                           }
                       ],
                       "repeat": "",
                       "crontab": "",
                       "once": false,
                       "onceDelay": 0.1,
                       "topic": "",
                       "payload": "{\"topic\":\"esp01/pressure\",\"payload\":\"1030.77\",\"qos\":1,\"retain\":true,\"_topic\":\"esp01/pressure\",\"_msgid\":\"402e6b69.3286b4\"}",
                       "payloadType": "str",
                       "x": 2420,
                       "y": 2940,
                       "wires": [
                           [
                               "34511f41.1fc9d"
                           ]
                       ]
                   },
                   {
                       "id": "34511f41.1fc9d",
                       "type": "json",
                       "z": "6e170384.60c96c",
                       "name": "",
                       "property": "payload",
                       "action": "",
                       "pretty": false,
                       "x": 2660,
                       "y": 2940,
                       "wires": [
                           [
                               "e72ce6df.f24288"
                           ]
                       ]
                   },
                   {
                       "id": "e72ce6df.f24288",
                       "type": "change",
                       "z": "6e170384.60c96c",
                       "name": "",
                       "rules": [
                           {
                               "t": "move",
                               "p": "payload",
                               "pt": "msg",
                               "to": "sensor",
                               "tot": "msg"
                           },
                           {
                               "t": "set",
                               "p": "topic",
                               "pt": "msg",
                               "to": "sensor.topic",
                               "tot": "msg"
                           },
                           {
                               "t": "change",
                               "p": "topic",
                               "pt": "msg",
                               "from": ".*\\/(.*)",
                               "fromt": "re",
                               "to": "$1",
                               "tot": "str"
                           },
                           {
                               "t": "set",
                               "p": "payload",
                               "pt": "msg",
                               "to": "sensor.payload",
                               "tot": "msg"
                           },
                           {
                               "t": "delete",
                               "p": "sensor",
                               "pt": "msg"
                           }
                       ],
                       "action": "",
                       "property": "",
                       "from": "",
                       "to": "",
                       "reg": false,
                       "x": 2840,
                       "y": 2940,
                       "wires": [
                           [
                               "fbe948a7.3fc2b8"
                           ]
                       ]
                   },
                   {
                       "id": "fbe948a7.3fc2b8",
                       "type": "join",
                       "z": "6e170384.60c96c",
                       "name": "",
                       "mode": "custom",
                       "build": "object",
                       "property": "payload",
                       "propertyType": "msg",
                       "key": "topic",
                       "joiner": "\\n",
                       "joinerType": "str",
                       "accumulate": true,
                       "timeout": "",
                       "count": "3",
                       "reduceRight": false,
                       "reduceExp": "",
                       "reduceInit": "",
                       "reduceInitType": "",
                       "reduceFixup": "",
                       "x": 3050,
                       "y": 2940,
                       "wires": [
                           [
                               "6426d775.568bd8",
                               "15242d7a.695af3"
                           ]
                       ]
                   },
                   {
                       "id": "6426d775.568bd8",
                       "type": "ui_template",
                       "z": "6e170384.60c96c",
                       "group": "9efdcbae.2c5598",
                       "name": "ESP01",
                       "order": 8,
                       "width": "6",
                       "height": "3",
                       "format": "<p> Dies sind Werte des Sensors ESP01:<br>\nTemperatur: {{msg.payload.temperature}} °Celsius<br>\nDruck: {{msg.payload.pressure}} %<br>\nFeuchtigkeit: {{msg.payload.humidity}} hPa<br>\n</p>",
                       "storeOutMessages": true,
                       "fwdInMessages": true,
                       "resendOnRefresh": true,
                       "templateScope": "local",
                       "x": 3270,
                       "y": 2940,
                       "wires": [
                           []
                       ]
                   },
                   {
                       "id": "1f4eec1e.0eb874",
                       "type": "inject",
                       "z": "6e170384.60c96c",
                       "name": "esp02/temperature",
                       "props": [
                           {
                               "p": "payload"
                           }
                       ],
                       "repeat": "",
                       "crontab": "",
                       "once": false,
                       "onceDelay": 0.1,
                       "topic": "",
                       "payload": "{\"topic\":\"esp02/temperature\",\"payload\":\"15.48\",\"qos\":1,\"retain\":true,\"_topic\":\"esp02/temperature\",\"_msgid\":\"9c900137.efb7b\"}",
                       "payloadType": "str",
                       "x": 2430,
                       "y": 3040,
                       "wires": [
                           [
                               "f930269e.45ba98"
                           ]
                       ]
                   },
                   {
                       "id": "371b0199.1a5cbe",
                       "type": "inject",
                       "z": "6e170384.60c96c",
                       "name": "esp01/humidity",
                       "props": [
                           {
                               "p": "payload"
                           }
                       ],
                       "repeat": "",
                       "crontab": "",
                       "once": false,
                       "onceDelay": 0.1,
                       "topic": "",
                       "payload": "{\"topic\":\"esp02/humidity\",\"payload\":\"66.85\",\"qos\":1,\"retain\":true,\"_topic\":\"esp02/humidity\",\"_msgid\":\"3d6f2cec.f64da4\"}",
                       "payloadType": "str",
                       "x": 2420,
                       "y": 3120,
                       "wires": [
                           [
                               "f930269e.45ba98"
                           ]
                       ]
                   },
                   {
                       "id": "81340953.42add8",
                       "type": "inject",
                       "z": "6e170384.60c96c",
                       "name": "esp02/pressure",
                       "props": [
                           {
                               "p": "payload"
                           }
                       ],
                       "repeat": "",
                       "crontab": "",
                       "once": false,
                       "onceDelay": 0.1,
                       "topic": "",
                       "payload": "{\"topic\":\"esp02/pressure\",\"payload\":\"968.22\",\"qos\":1,\"retain\":true,\"_topic\":\"esp02/pressure\",\"_msgid\":\"402e6b69.3286b4\"}",
                       "payloadType": "str",
                       "x": 2420,
                       "y": 3080,
                       "wires": [
                           [
                               "f930269e.45ba98"
                           ]
                       ]
                   },
                   {
                       "id": "f930269e.45ba98",
                       "type": "json",
                       "z": "6e170384.60c96c",
                       "name": "",
                       "property": "payload",
                       "action": "",
                       "pretty": false,
                       "x": 2660,
                       "y": 3080,
                       "wires": [
                           [
                               "3743ee9f.58b6e2"
                           ]
                       ]
                   },
                   {
                       "id": "3743ee9f.58b6e2",
                       "type": "change",
                       "z": "6e170384.60c96c",
                       "name": "",
                       "rules": [
                           {
                               "t": "move",
                               "p": "payload",
                               "pt": "msg",
                               "to": "sensor",
                               "tot": "msg"
                           },
                           {
                               "t": "set",
                               "p": "topic",
                               "pt": "msg",
                               "to": "sensor.topic",
                               "tot": "msg"
                           },
                           {
                               "t": "change",
                               "p": "topic",
                               "pt": "msg",
                               "from": ".*\\/(.*)",
                               "fromt": "re",
                               "to": "$1",
                               "tot": "str"
                           },
                           {
                               "t": "set",
                               "p": "payload",
                               "pt": "msg",
                               "to": "sensor.payload",
                               "tot": "msg"
                           },
                           {
                               "t": "delete",
                               "p": "sensor",
                               "pt": "msg"
                           }
                       ],
                       "action": "",
                       "property": "",
                       "from": "",
                       "to": "",
                       "reg": false,
                       "x": 2840,
                       "y": 3080,
                       "wires": [
                           [
                               "2db197c8.56c048"
                           ]
                       ]
                   },
                   {
                       "id": "2db197c8.56c048",
                       "type": "join",
                       "z": "6e170384.60c96c",
                       "name": "",
                       "mode": "custom",
                       "build": "object",
                       "property": "payload",
                       "propertyType": "msg",
                       "key": "topic",
                       "joiner": "\\n",
                       "joinerType": "str",
                       "accumulate": true,
                       "timeout": "",
                       "count": "3",
                       "reduceRight": false,
                       "reduceExp": "",
                       "reduceInit": "",
                       "reduceInitType": "",
                       "reduceFixup": "",
                       "x": 3050,
                       "y": 3080,
                       "wires": [
                           [
                               "d619099a.00e258",
                               "e61dc5b7.e1f3c8"
                           ]
                       ]
                   },
                   {
                       "id": "d619099a.00e258",
                       "type": "ui_template",
                       "z": "6e170384.60c96c",
                       "group": "9efdcbae.2c5598",
                       "name": "ESP02",
                       "order": 8,
                       "width": "6",
                       "height": "3",
                       "format": "<p> Dies sind Werte des Sensors ESP02:<br>\nTemperatur: {{msg.payload.temperature}} °Celsius<br>\nDruck: {{msg.payload.pressure}} %<br>\nFeuchtigkeit: {{msg.payload.humidity}} hPa<br>\n</p>",
                       "storeOutMessages": true,
                       "fwdInMessages": true,
                       "resendOnRefresh": true,
                       "templateScope": "local",
                       "x": 3270,
                       "y": 3080,
                       "wires": [
                           []
                       ]
                   },
                   {
                       "id": "ab61c658.d5e478",
                       "type": "inject",
                       "z": "6e170384.60c96c",
                       "name": "esp01/temperature",
                       "props": [
                           {
                               "p": "payload"
                           }
                       ],
                       "repeat": "",
                       "crontab": "",
                       "once": false,
                       "onceDelay": 0.1,
                       "topic": "",
                       "payload": "{\"topic\":\"esp01/temperature\",\"payload\":\"27.71\",\"qos\":1,\"retain\":true,\"_topic\":\"esp01/temperature\",\"_msgid\":\"9c900137.efb7b\"}",
                       "payloadType": "str",
                       "x": 2450,
                       "y": 3240,
                       "wires": [
                           [
                               "eee07f4a.41fa4"
                           ]
                       ]
                   },
                   {
                       "id": "3f35b8e2.762838",
                       "type": "inject",
                       "z": "6e170384.60c96c",
                       "name": "esp01/humidity",
                       "props": [
                           {
                               "p": "payload"
                           }
                       ],
                       "repeat": "",
                       "crontab": "",
                       "once": false,
                       "onceDelay": 0.1,
                       "topic": "",
                       "payload": "{\"topic\":\"esp01/humidity\",\"payload\":\"46.65\",\"qos\":1,\"retain\":true,\"_topic\":\"esp01/humidity\",\"_msgid\":\"3d6f2cec.f64da4\"}",
                       "payloadType": "str",
                       "x": 2440,
                       "y": 3320,
                       "wires": [
                           [
                               "eee07f4a.41fa4"
                           ]
                       ]
                   },
                   {
                       "id": "26c66965.fdf586",
                       "type": "inject",
                       "z": "6e170384.60c96c",
                       "name": "esp01/pressure",
                       "props": [
                           {
                               "p": "payload"
                           }
                       ],
                       "repeat": "",
                       "crontab": "",
                       "once": false,
                       "onceDelay": 0.1,
                       "topic": "",
                       "payload": "{\"topic\":\"esp01/pressure\",\"payload\":\"1030.77\",\"qos\":1,\"retain\":true,\"_topic\":\"esp01/pressure\",\"_msgid\":\"402e6b69.3286b4\"}",
                       "payloadType": "str",
                       "x": 2440,
                       "y": 3280,
                       "wires": [
                           [
                               "eee07f4a.41fa4"
                           ]
                       ]
                   },
                   {
                       "id": "2f3f7e6e.6a06b2",
                       "type": "inject",
                       "z": "6e170384.60c96c",
                       "name": "esp02/temperature",
                       "props": [
                           {
                               "p": "payload"
                           }
                       ],
                       "repeat": "",
                       "crontab": "",
                       "once": false,
                       "onceDelay": 0.1,
                       "topic": "",
                       "payload": "{\"topic\":\"esp02/temperature\",\"payload\":\"15.48\",\"qos\":1,\"retain\":true,\"_topic\":\"esp02/temperature\",\"_msgid\":\"9c900137.efb7b\"}",
                       "payloadType": "str",
                       "x": 2450,
                       "y": 3380,
                       "wires": [
                           [
                               "eee07f4a.41fa4"
                           ]
                       ]
                   },
                   {
                       "id": "9feefd2c.8feea",
                       "type": "inject",
                       "z": "6e170384.60c96c",
                       "name": "esp01/humidity",
                       "props": [
                           {
                               "p": "payload"
                           }
                       ],
                       "repeat": "",
                       "crontab": "",
                       "once": false,
                       "onceDelay": 0.1,
                       "topic": "",
                       "payload": "{\"topic\":\"esp02/humidity\",\"payload\":\"66.85\",\"qos\":1,\"retain\":true,\"_topic\":\"esp02/humidity\",\"_msgid\":\"3d6f2cec.f64da4\"}",
                       "payloadType": "str",
                       "x": 2440,
                       "y": 3460,
                       "wires": [
                           [
                               "eee07f4a.41fa4"
                           ]
                       ]
                   },
                   {
                       "id": "d416cac9.ba0cb8",
                       "type": "inject",
                       "z": "6e170384.60c96c",
                       "name": "esp02/pressure",
                       "props": [
                           {
                               "p": "payload"
                           }
                       ],
                       "repeat": "",
                       "crontab": "",
                       "once": false,
                       "onceDelay": 0.1,
                       "topic": "",
                       "payload": "{\"topic\":\"esp02/pressure\",\"payload\":\"968.22\",\"qos\":1,\"retain\":true,\"_topic\":\"esp02/pressure\",\"_msgid\":\"402e6b69.3286b4\"}",
                       "payloadType": "str",
                       "x": 2440,
                       "y": 3420,
                       "wires": [
                           [
                               "eee07f4a.41fa4"
                           ]
                       ]
                   },
                   {
                       "id": "eee07f4a.41fa4",
                       "type": "json",
                       "z": "6e170384.60c96c",
                       "name": "",
                       "property": "payload",
                       "action": "",
                       "pretty": false,
                       "x": 2680,
                       "y": 3340,
                       "wires": [
                           [
                               "f5cdaa11.5bb828"
                           ]
                       ]
                   },
                   {
                       "id": "f5cdaa11.5bb828",
                       "type": "change",
                       "z": "6e170384.60c96c",
                       "name": "",
                       "rules": [
                           {
                               "t": "move",
                               "p": "payload",
                               "pt": "msg",
                               "to": "sensor",
                               "tot": "msg"
                           },
                           {
                               "t": "set",
                               "p": "parts",
                               "pt": "msg",
                               "to": "{\"type\":\"object\",\"index\":\"\",\"count\":3}",
                               "tot": "json"
                           },
                           {
                               "t": "set",
                               "p": "topic",
                               "pt": "msg",
                               "to": "sensor.topic",
                               "tot": "msg"
                           },
                           {
                               "t": "change",
                               "p": "topic",
                               "pt": "msg",
                               "from": "(.*)\\/.*",
                               "fromt": "re",
                               "to": "$1",
                               "tot": "str"
                           },
                           {
                               "t": "set",
                               "p": "parts.id",
                               "pt": "msg",
                               "to": "topic",
                               "tot": "msg"
                           },
                           {
                               "t": "set",
                               "p": "payload",
                               "pt": "msg",
                               "to": "sensor.payload",
                               "tot": "msg"
                           },
                           {
                               "t": "set",
                               "p": "parts.key",
                               "pt": "msg",
                               "to": "sensor.topic",
                               "tot": "msg"
                           },
                           {
                               "t": "change",
                               "p": "parts.key",
                               "pt": "msg",
                               "from": ".*\\/(.*)",
                               "fromt": "re",
                               "to": "$1",
                               "tot": "str"
                           },
                           {
                               "t": "set",
                               "p": "parts.index",
                               "pt": "msg",
                               "to": "parts.key",
                               "tot": "msg"
                           },
                           {
                               "t": "change",
                               "p": "parts.index",
                               "pt": "msg",
                               "from": "temperature",
                               "fromt": "str",
                               "to": "0",
                               "tot": "num"
                           },
                           {
                               "t": "change",
                               "p": "parts.index",
                               "pt": "msg",
                               "from": "pressure",
                               "fromt": "str",
                               "to": "1",
                               "tot": "num"
                           },
                           {
                               "t": "change",
                               "p": "parts.index",
                               "pt": "msg",
                               "from": "humidity",
                               "fromt": "str",
                               "to": "2",
                               "tot": "num"
                           },
                           {
                               "t": "delete",
                               "p": "sensor",
                               "pt": "msg"
                           }
                       ],
                       "action": "",
                       "property": "",
                       "from": "",
                       "to": "",
                       "reg": false,
                       "x": 2860,
                       "y": 3340,
                       "wires": [
                           [
                               "e773f7b7.ec4878"
                           ]
                       ]
                   },
                   {
                       "id": "e773f7b7.ec4878",
                       "type": "join",
                       "z": "6e170384.60c96c",
                       "name": "",
                       "mode": "auto",
                       "build": "string",
                       "property": "payload",
                       "propertyType": "msg",
                       "key": "topic",
                       "joiner": "\\n",
                       "joinerType": "str",
                       "accumulate": false,
                       "timeout": "",
                       "count": "",
                       "reduceRight": false,
                       "reduceExp": "",
                       "reduceInit": "",
                       "reduceInitType": "",
                       "reduceFixup": "",
                       "x": 3050,
                       "y": 3340,
                       "wires": [
                           [
                               "90c0d28c.cca2f",
                               "1ecb24c1.641e9b"
                           ]
                       ]
                   },
                   {
                       "id": "90c0d28c.cca2f",
                       "type": "ui_template",
                       "z": "6e170384.60c96c",
                       "group": "9efdcbae.2c5598",
                       "name": "ESP03",
                       "order": 8,
                       "width": "6",
                       "height": "5",
                       "format": "<p> Dies sind Werte des Sensors {{msg.topic}}:<br>\nTemperatur: {{msg.payload.temperature}} °Celsius<br>\nDruck: {{msg.payload.pressure}} %<br>\nFeuchtigkeit: {{msg.payload.humidity}} hPa<br>\n</p>",
                       "storeOutMessages": true,
                       "fwdInMessages": true,
                       "resendOnRefresh": true,
                       "templateScope": "local",
                       "x": 3260,
                       "y": 3340,
                       "wires": [
                           []
                       ]
                   },
                   {
                       "id": "1ecb24c1.641e9b",
                       "type": "template",
                       "z": "6e170384.60c96c",
                       "name": "Daten beliebiger Sensor",
                       "field": "payload",
                       "fieldType": "msg",
                       "format": "handlebars",
                       "syntax": "mustache",
                       "template": "Dies sind Werte des Sensors {{topic}}:\nTemperatur: {{payload.temperature}} °Celsius\nDruck: {{payload.pressure}} %\nFeuchtigkeit: {{payload.humidity}} hPa\n",
                       "output": "str",
                       "x": 3310,
                       "y": 3400,
                       "wires": [
                           [
                               "226f5a46.b47496"
                           ]
                       ]
                   },
                   {
                       "id": "226f5a46.b47496",
                       "type": "debug",
                       "z": "6e170384.60c96c",
                       "name": "",
                       "active": true,
                       "tosidebar": true,
                       "console": false,
                       "tostatus": false,
                       "complete": "false",
                       "statusVal": "",
                       "statusType": "auto",
                       "x": 3530,
                       "y": 3400,
                       "wires": []
                   },
                   {
                       "id": "cd72966.d3e6768",
                       "type": "template",
                       "z": "6e170384.60c96c",
                       "name": "Text beide Sensoren",
                       "field": "payload",
                       "fieldType": "msg",
                       "format": "handlebars",
                       "syntax": "mustache",
                       "template": "Dies ist die Ausgabe meiner Sensoren\nHier die Daten des Sensors esp01:\n{{payload.esp01}}\nHier die Daten des Sensors esp02\n{{payload.esp02}}",
                       "output": "str",
                       "x": 3840,
                       "y": 3020,
                       "wires": [
                           [
                               "7c4293c0.f842ec",
                               "a5c3b67c.f773c8"
                           ]
                       ]
                   },
                   {
                       "id": "7c4293c0.f842ec",
                       "type": "debug",
                       "z": "6e170384.60c96c",
                       "name": "",
                       "active": true,
                       "tosidebar": true,
                       "console": false,
                       "tostatus": false,
                       "complete": "payload",
                       "targetType": "msg",
                       "statusVal": "",
                       "statusType": "auto",
                       "x": 4090,
                       "y": 3020,
                       "wires": []
                   },
                   {
                       "id": "d56babc3.99c3b8",
                       "type": "change",
                       "z": "6e170384.60c96c",
                       "name": "",
                       "rules": [
                           {
                               "t": "set",
                               "p": "topic",
                               "pt": "msg",
                               "to": "esp01",
                               "tot": "str"
                           }
                       ],
                       "action": "",
                       "property": "",
                       "from": "",
                       "to": "",
                       "reg": false,
                       "x": 3460,
                       "y": 2980,
                       "wires": [
                           [
                               "d9a397a.ff91368"
                           ]
                       ]
                   },
                   {
                       "id": "647e9e10.7d34",
                       "type": "change",
                       "z": "6e170384.60c96c",
                       "name": "",
                       "rules": [
                           {
                               "t": "set",
                               "p": "topic",
                               "pt": "msg",
                               "to": "esp02",
                               "tot": "str"
                           }
                       ],
                       "action": "",
                       "property": "",
                       "from": "",
                       "to": "",
                       "reg": false,
                       "x": 3460,
                       "y": 3040,
                       "wires": [
                           [
                               "d9a397a.ff91368"
                           ]
                       ]
                   },
                   {
                       "id": "d9a397a.ff91368",
                       "type": "join",
                       "z": "6e170384.60c96c",
                       "name": "",
                       "mode": "custom",
                       "build": "object",
                       "property": "payload",
                       "propertyType": "msg",
                       "key": "topic",
                       "joiner": "\\n",
                       "joinerType": "str",
                       "accumulate": true,
                       "timeout": "",
                       "count": "2",
                       "reduceRight": false,
                       "reduceExp": "",
                       "reduceInit": "",
                       "reduceInitType": "",
                       "reduceFixup": "",
                       "x": 3650,
                       "y": 3020,
                       "wires": [
                           [
                               "cd72966.d3e6768"
                           ]
                       ]
                   },
                   {
                       "id": "15242d7a.695af3",
                       "type": "template",
                       "z": "6e170384.60c96c",
                       "name": "Nur Daten ESP01",
                       "field": "payload",
                       "fieldType": "msg",
                       "format": "handlebars",
                       "syntax": "mustache",
                       "template": "Temperatur: {{payload.temperature}} °Celsius\nDruck: {{payload.pressure}} %\nFeuchtigkeit: {{payload.humidity}} hPa",
                       "output": "str",
                       "x": 3250,
                       "y": 2980,
                       "wires": [
                           [
                               "d56babc3.99c3b8"
                           ]
                       ]
                   },
                   {
                       "id": "e61dc5b7.e1f3c8",
                       "type": "template",
                       "z": "6e170384.60c96c",
                       "name": "Nur Daten ESP02",
                       "field": "payload",
                       "fieldType": "msg",
                       "format": "handlebars",
                       "syntax": "mustache",
                       "template": "Temperatur: {{payload.temperature}} °Celsius\nDruck: {{payload.pressure}} %\nFeuchtigkeit: {{payload.humidity}} hPa",
                       "output": "str",
                       "x": 3250,
                       "y": 3040,
                       "wires": [
                           [
                               "647e9e10.7d34"
                           ]
                       ]
                   },
                   {
                       "id": "a5c3b67c.f773c8",
                       "type": "change",
                       "z": "6e170384.60c96c",
                       "name": "",
                       "rules": [
                           {
                               "t": "set",
                               "p": "results",
                               "pt": "flow",
                               "to": "payload",
                               "tot": "msg"
                           }
                       ],
                       "action": "",
                       "property": "",
                       "from": "",
                       "to": "",
                       "reg": false,
                       "x": 4110,
                       "y": 2960,
                       "wires": [
                           []
                       ]
                   },
                   {
                       "id": "9e2b3f1.01575c",
                       "type": "http in",
                       "z": "6e170384.60c96c",
                       "name": "",
                       "url": "/mySensors",
                       "method": "get",
                       "upload": false,
                       "swaggerDoc": "",
                       "x": 2760,
                       "y": 2780,
                       "wires": [
                           [
                               "f91c5fa1.e4834"
                           ]
                       ]
                   },
                   {
                       "id": "f91c5fa1.e4834",
                       "type": "change",
                       "z": "6e170384.60c96c",
                       "name": "",
                       "rules": [
                           {
                               "t": "set",
                               "p": "payload",
                               "pt": "msg",
                               "to": "results",
                               "tot": "flow"
                           }
                       ],
                       "action": "",
                       "property": "",
                       "from": "",
                       "to": "",
                       "reg": false,
                       "x": 2980,
                       "y": 2780,
                       "wires": [
                           [
                               "96ae3a77.eb9bf8"
                           ]
                       ]
                   },
                   {
                       "id": "96ae3a77.eb9bf8",
                       "type": "http response",
                       "z": "6e170384.60c96c",
                       "name": "",
                       "statusCode": "",
                       "headers": {},
                       "x": 3180,
                       "y": 2780,
                       "wires": []
                   },
                   {
                       "id": "9efdcbae.2c5598",
                       "type": "ui_group",
                       "name": "Sensordaten",
                       "tab": "dc25fe35.866f",
                       "order": 3,
                       "disp": true,
                       "width": "6",
                       "collapse": false
                   },
                   {
                       "id": "dc25fe35.866f",
                       "type": "ui_tab",
                       "name": "Test",
                       "icon": "dashboard",
                       "order": 14,
                       "disabled": false,
                       "hidden": false
                   }
                ]
                

                Wie man mal wieder sieht es geht ohne irgendwelche Codezeilen 😉

                EDIT:
                Im Browser habe ich aber nur das obere Beispiel ausgegeben - da Du vielleicht auf Anforderung die Ergebnisse beider Sensoren ausgeben willst und nicht die, die sich gerade geändert haben - ansonsten muss man halt das Ergebnis unten in der Flow Variablen speichern.
                Und sowas wie Angular Direktiven zur Tabellenerstellung funktionieren in den reinen Template Nodes nicht.
                Und wie immer: Je mehr Infos man rausgibt, desto weniger Missverständnisse!

                1 Reply Last reply Reply Quote 0
                • mickym
                  mickym Most Active @jabba76 last edited by

                  @jabba76 Um das untere Ergebnis auch noch auszugeben - habe ich halt noch eine 2.Flowvariable genutzt und man ruft dieses Ergebnis mit ChangedSensors auf:

                  screen.png

                  [
                     {
                         "id": "a23951ac.62498",
                         "type": "inject",
                         "z": "6e170384.60c96c",
                         "name": "esp01/temperature",
                         "props": [
                             {
                                 "p": "payload"
                             }
                         ],
                         "repeat": "",
                         "crontab": "",
                         "once": false,
                         "onceDelay": 0.1,
                         "topic": "",
                         "payload": "{\"topic\":\"esp01/temperature\",\"payload\":\"27.71\",\"qos\":1,\"retain\":true,\"_topic\":\"esp01/temperature\",\"_msgid\":\"9c900137.efb7b\"}",
                         "payloadType": "str",
                         "x": 2430,
                         "y": 2900,
                         "wires": [
                             [
                                 "34511f41.1fc9d"
                             ]
                         ]
                     },
                     {
                         "id": "896f66a7.b2e9c8",
                         "type": "inject",
                         "z": "6e170384.60c96c",
                         "name": "esp01/humidity",
                         "props": [
                             {
                                 "p": "payload"
                             }
                         ],
                         "repeat": "",
                         "crontab": "",
                         "once": false,
                         "onceDelay": 0.1,
                         "topic": "",
                         "payload": "{\"topic\":\"esp01/humidity\",\"payload\":\"46.65\",\"qos\":1,\"retain\":true,\"_topic\":\"esp01/humidity\",\"_msgid\":\"3d6f2cec.f64da4\"}",
                         "payloadType": "str",
                         "x": 2420,
                         "y": 2980,
                         "wires": [
                             [
                                 "34511f41.1fc9d"
                             ]
                         ]
                     },
                     {
                         "id": "a887368c.b8a4f8",
                         "type": "inject",
                         "z": "6e170384.60c96c",
                         "name": "esp01/pressure",
                         "props": [
                             {
                                 "p": "payload"
                             }
                         ],
                         "repeat": "",
                         "crontab": "",
                         "once": false,
                         "onceDelay": 0.1,
                         "topic": "",
                         "payload": "{\"topic\":\"esp01/pressure\",\"payload\":\"1030.77\",\"qos\":1,\"retain\":true,\"_topic\":\"esp01/pressure\",\"_msgid\":\"402e6b69.3286b4\"}",
                         "payloadType": "str",
                         "x": 2420,
                         "y": 2940,
                         "wires": [
                             [
                                 "34511f41.1fc9d"
                             ]
                         ]
                     },
                     {
                         "id": "34511f41.1fc9d",
                         "type": "json",
                         "z": "6e170384.60c96c",
                         "name": "",
                         "property": "payload",
                         "action": "",
                         "pretty": false,
                         "x": 2660,
                         "y": 2940,
                         "wires": [
                             [
                                 "e72ce6df.f24288"
                             ]
                         ]
                     },
                     {
                         "id": "e72ce6df.f24288",
                         "type": "change",
                         "z": "6e170384.60c96c",
                         "name": "",
                         "rules": [
                             {
                                 "t": "move",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "sensor",
                                 "tot": "msg"
                             },
                             {
                                 "t": "set",
                                 "p": "topic",
                                 "pt": "msg",
                                 "to": "sensor.topic",
                                 "tot": "msg"
                             },
                             {
                                 "t": "change",
                                 "p": "topic",
                                 "pt": "msg",
                                 "from": ".*\\/(.*)",
                                 "fromt": "re",
                                 "to": "$1",
                                 "tot": "str"
                             },
                             {
                                 "t": "set",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "sensor.payload",
                                 "tot": "msg"
                             },
                             {
                                 "t": "delete",
                                 "p": "sensor",
                                 "pt": "msg"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 2840,
                         "y": 2940,
                         "wires": [
                             [
                                 "fbe948a7.3fc2b8"
                             ]
                         ]
                     },
                     {
                         "id": "fbe948a7.3fc2b8",
                         "type": "join",
                         "z": "6e170384.60c96c",
                         "name": "",
                         "mode": "custom",
                         "build": "object",
                         "property": "payload",
                         "propertyType": "msg",
                         "key": "topic",
                         "joiner": "\\n",
                         "joinerType": "str",
                         "accumulate": true,
                         "timeout": "",
                         "count": "3",
                         "reduceRight": false,
                         "reduceExp": "",
                         "reduceInit": "",
                         "reduceInitType": "",
                         "reduceFixup": "",
                         "x": 3050,
                         "y": 2940,
                         "wires": [
                             [
                                 "6426d775.568bd8",
                                 "15242d7a.695af3"
                             ]
                         ]
                     },
                     {
                         "id": "6426d775.568bd8",
                         "type": "ui_template",
                         "z": "6e170384.60c96c",
                         "group": "9efdcbae.2c5598",
                         "name": "ESP01",
                         "order": 8,
                         "width": "6",
                         "height": "3",
                         "format": "<p> Dies sind Werte des Sensors ESP01:<br>\nTemperatur: {{msg.payload.temperature}} °Celsius<br>\nDruck: {{msg.payload.pressure}} %<br>\nFeuchtigkeit: {{msg.payload.humidity}} hPa<br>\n</p>",
                         "storeOutMessages": true,
                         "fwdInMessages": true,
                         "resendOnRefresh": true,
                         "templateScope": "local",
                         "x": 3270,
                         "y": 2940,
                         "wires": [
                             []
                         ]
                     },
                     {
                         "id": "1f4eec1e.0eb874",
                         "type": "inject",
                         "z": "6e170384.60c96c",
                         "name": "esp02/temperature",
                         "props": [
                             {
                                 "p": "payload"
                             }
                         ],
                         "repeat": "",
                         "crontab": "",
                         "once": false,
                         "onceDelay": 0.1,
                         "topic": "",
                         "payload": "{\"topic\":\"esp02/temperature\",\"payload\":\"15.48\",\"qos\":1,\"retain\":true,\"_topic\":\"esp02/temperature\",\"_msgid\":\"9c900137.efb7b\"}",
                         "payloadType": "str",
                         "x": 2430,
                         "y": 3040,
                         "wires": [
                             [
                                 "f930269e.45ba98"
                             ]
                         ]
                     },
                     {
                         "id": "371b0199.1a5cbe",
                         "type": "inject",
                         "z": "6e170384.60c96c",
                         "name": "esp01/humidity",
                         "props": [
                             {
                                 "p": "payload"
                             }
                         ],
                         "repeat": "",
                         "crontab": "",
                         "once": false,
                         "onceDelay": 0.1,
                         "topic": "",
                         "payload": "{\"topic\":\"esp02/humidity\",\"payload\":\"66.85\",\"qos\":1,\"retain\":true,\"_topic\":\"esp02/humidity\",\"_msgid\":\"3d6f2cec.f64da4\"}",
                         "payloadType": "str",
                         "x": 2420,
                         "y": 3120,
                         "wires": [
                             [
                                 "f930269e.45ba98"
                             ]
                         ]
                     },
                     {
                         "id": "81340953.42add8",
                         "type": "inject",
                         "z": "6e170384.60c96c",
                         "name": "esp02/pressure",
                         "props": [
                             {
                                 "p": "payload"
                             }
                         ],
                         "repeat": "",
                         "crontab": "",
                         "once": false,
                         "onceDelay": 0.1,
                         "topic": "",
                         "payload": "{\"topic\":\"esp02/pressure\",\"payload\":\"968.22\",\"qos\":1,\"retain\":true,\"_topic\":\"esp02/pressure\",\"_msgid\":\"402e6b69.3286b4\"}",
                         "payloadType": "str",
                         "x": 2420,
                         "y": 3080,
                         "wires": [
                             [
                                 "f930269e.45ba98"
                             ]
                         ]
                     },
                     {
                         "id": "f930269e.45ba98",
                         "type": "json",
                         "z": "6e170384.60c96c",
                         "name": "",
                         "property": "payload",
                         "action": "",
                         "pretty": false,
                         "x": 2660,
                         "y": 3080,
                         "wires": [
                             [
                                 "3743ee9f.58b6e2"
                             ]
                         ]
                     },
                     {
                         "id": "3743ee9f.58b6e2",
                         "type": "change",
                         "z": "6e170384.60c96c",
                         "name": "",
                         "rules": [
                             {
                                 "t": "move",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "sensor",
                                 "tot": "msg"
                             },
                             {
                                 "t": "set",
                                 "p": "topic",
                                 "pt": "msg",
                                 "to": "sensor.topic",
                                 "tot": "msg"
                             },
                             {
                                 "t": "change",
                                 "p": "topic",
                                 "pt": "msg",
                                 "from": ".*\\/(.*)",
                                 "fromt": "re",
                                 "to": "$1",
                                 "tot": "str"
                             },
                             {
                                 "t": "set",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "sensor.payload",
                                 "tot": "msg"
                             },
                             {
                                 "t": "delete",
                                 "p": "sensor",
                                 "pt": "msg"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 2840,
                         "y": 3080,
                         "wires": [
                             [
                                 "2db197c8.56c048"
                             ]
                         ]
                     },
                     {
                         "id": "2db197c8.56c048",
                         "type": "join",
                         "z": "6e170384.60c96c",
                         "name": "",
                         "mode": "custom",
                         "build": "object",
                         "property": "payload",
                         "propertyType": "msg",
                         "key": "topic",
                         "joiner": "\\n",
                         "joinerType": "str",
                         "accumulate": true,
                         "timeout": "",
                         "count": "3",
                         "reduceRight": false,
                         "reduceExp": "",
                         "reduceInit": "",
                         "reduceInitType": "",
                         "reduceFixup": "",
                         "x": 3050,
                         "y": 3080,
                         "wires": [
                             [
                                 "d619099a.00e258",
                                 "e61dc5b7.e1f3c8"
                             ]
                         ]
                     },
                     {
                         "id": "d619099a.00e258",
                         "type": "ui_template",
                         "z": "6e170384.60c96c",
                         "group": "9efdcbae.2c5598",
                         "name": "ESP02",
                         "order": 8,
                         "width": "6",
                         "height": "3",
                         "format": "<p> Dies sind Werte des Sensors ESP02:<br>\nTemperatur: {{msg.payload.temperature}} °Celsius<br>\nDruck: {{msg.payload.pressure}} %<br>\nFeuchtigkeit: {{msg.payload.humidity}} hPa<br>\n</p>",
                         "storeOutMessages": true,
                         "fwdInMessages": true,
                         "resendOnRefresh": true,
                         "templateScope": "local",
                         "x": 3270,
                         "y": 3080,
                         "wires": [
                             []
                         ]
                     },
                     {
                         "id": "ab61c658.d5e478",
                         "type": "inject",
                         "z": "6e170384.60c96c",
                         "name": "esp01/temperature",
                         "props": [
                             {
                                 "p": "payload"
                             }
                         ],
                         "repeat": "",
                         "crontab": "",
                         "once": false,
                         "onceDelay": 0.1,
                         "topic": "",
                         "payload": "{\"topic\":\"esp01/temperature\",\"payload\":\"27.71\",\"qos\":1,\"retain\":true,\"_topic\":\"esp01/temperature\",\"_msgid\":\"9c900137.efb7b\"}",
                         "payloadType": "str",
                         "x": 2450,
                         "y": 3240,
                         "wires": [
                             [
                                 "eee07f4a.41fa4"
                             ]
                         ]
                     },
                     {
                         "id": "3f35b8e2.762838",
                         "type": "inject",
                         "z": "6e170384.60c96c",
                         "name": "esp01/humidity",
                         "props": [
                             {
                                 "p": "payload"
                             }
                         ],
                         "repeat": "",
                         "crontab": "",
                         "once": false,
                         "onceDelay": 0.1,
                         "topic": "",
                         "payload": "{\"topic\":\"esp01/humidity\",\"payload\":\"46.65\",\"qos\":1,\"retain\":true,\"_topic\":\"esp01/humidity\",\"_msgid\":\"3d6f2cec.f64da4\"}",
                         "payloadType": "str",
                         "x": 2440,
                         "y": 3320,
                         "wires": [
                             [
                                 "eee07f4a.41fa4"
                             ]
                         ]
                     },
                     {
                         "id": "26c66965.fdf586",
                         "type": "inject",
                         "z": "6e170384.60c96c",
                         "name": "esp01/pressure",
                         "props": [
                             {
                                 "p": "payload"
                             }
                         ],
                         "repeat": "",
                         "crontab": "",
                         "once": false,
                         "onceDelay": 0.1,
                         "topic": "",
                         "payload": "{\"topic\":\"esp01/pressure\",\"payload\":\"1030.77\",\"qos\":1,\"retain\":true,\"_topic\":\"esp01/pressure\",\"_msgid\":\"402e6b69.3286b4\"}",
                         "payloadType": "str",
                         "x": 2440,
                         "y": 3280,
                         "wires": [
                             [
                                 "eee07f4a.41fa4"
                             ]
                         ]
                     },
                     {
                         "id": "2f3f7e6e.6a06b2",
                         "type": "inject",
                         "z": "6e170384.60c96c",
                         "name": "esp02/temperature",
                         "props": [
                             {
                                 "p": "payload"
                             }
                         ],
                         "repeat": "",
                         "crontab": "",
                         "once": false,
                         "onceDelay": 0.1,
                         "topic": "",
                         "payload": "{\"topic\":\"esp02/temperature\",\"payload\":\"15.48\",\"qos\":1,\"retain\":true,\"_topic\":\"esp02/temperature\",\"_msgid\":\"9c900137.efb7b\"}",
                         "payloadType": "str",
                         "x": 2450,
                         "y": 3380,
                         "wires": [
                             [
                                 "eee07f4a.41fa4"
                             ]
                         ]
                     },
                     {
                         "id": "9feefd2c.8feea",
                         "type": "inject",
                         "z": "6e170384.60c96c",
                         "name": "esp01/humidity",
                         "props": [
                             {
                                 "p": "payload"
                             }
                         ],
                         "repeat": "",
                         "crontab": "",
                         "once": false,
                         "onceDelay": 0.1,
                         "topic": "",
                         "payload": "{\"topic\":\"esp02/humidity\",\"payload\":\"66.85\",\"qos\":1,\"retain\":true,\"_topic\":\"esp02/humidity\",\"_msgid\":\"3d6f2cec.f64da4\"}",
                         "payloadType": "str",
                         "x": 2440,
                         "y": 3460,
                         "wires": [
                             [
                                 "eee07f4a.41fa4"
                             ]
                         ]
                     },
                     {
                         "id": "d416cac9.ba0cb8",
                         "type": "inject",
                         "z": "6e170384.60c96c",
                         "name": "esp02/pressure",
                         "props": [
                             {
                                 "p": "payload"
                             }
                         ],
                         "repeat": "",
                         "crontab": "",
                         "once": false,
                         "onceDelay": 0.1,
                         "topic": "",
                         "payload": "{\"topic\":\"esp02/pressure\",\"payload\":\"968.22\",\"qos\":1,\"retain\":true,\"_topic\":\"esp02/pressure\",\"_msgid\":\"402e6b69.3286b4\"}",
                         "payloadType": "str",
                         "x": 2440,
                         "y": 3420,
                         "wires": [
                             [
                                 "eee07f4a.41fa4"
                             ]
                         ]
                     },
                     {
                         "id": "eee07f4a.41fa4",
                         "type": "json",
                         "z": "6e170384.60c96c",
                         "name": "",
                         "property": "payload",
                         "action": "",
                         "pretty": false,
                         "x": 2680,
                         "y": 3340,
                         "wires": [
                             [
                                 "f5cdaa11.5bb828"
                             ]
                         ]
                     },
                     {
                         "id": "f5cdaa11.5bb828",
                         "type": "change",
                         "z": "6e170384.60c96c",
                         "name": "",
                         "rules": [
                             {
                                 "t": "move",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "sensor",
                                 "tot": "msg"
                             },
                             {
                                 "t": "set",
                                 "p": "parts",
                                 "pt": "msg",
                                 "to": "{\"type\":\"object\",\"index\":\"\",\"count\":3}",
                                 "tot": "json"
                             },
                             {
                                 "t": "set",
                                 "p": "topic",
                                 "pt": "msg",
                                 "to": "sensor.topic",
                                 "tot": "msg"
                             },
                             {
                                 "t": "change",
                                 "p": "topic",
                                 "pt": "msg",
                                 "from": "(.*)\\/.*",
                                 "fromt": "re",
                                 "to": "$1",
                                 "tot": "str"
                             },
                             {
                                 "t": "set",
                                 "p": "parts.id",
                                 "pt": "msg",
                                 "to": "topic",
                                 "tot": "msg"
                             },
                             {
                                 "t": "set",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "sensor.payload",
                                 "tot": "msg"
                             },
                             {
                                 "t": "set",
                                 "p": "parts.key",
                                 "pt": "msg",
                                 "to": "sensor.topic",
                                 "tot": "msg"
                             },
                             {
                                 "t": "change",
                                 "p": "parts.key",
                                 "pt": "msg",
                                 "from": ".*\\/(.*)",
                                 "fromt": "re",
                                 "to": "$1",
                                 "tot": "str"
                             },
                             {
                                 "t": "set",
                                 "p": "parts.index",
                                 "pt": "msg",
                                 "to": "parts.key",
                                 "tot": "msg"
                             },
                             {
                                 "t": "change",
                                 "p": "parts.index",
                                 "pt": "msg",
                                 "from": "temperature",
                                 "fromt": "str",
                                 "to": "0",
                                 "tot": "num"
                             },
                             {
                                 "t": "change",
                                 "p": "parts.index",
                                 "pt": "msg",
                                 "from": "pressure",
                                 "fromt": "str",
                                 "to": "1",
                                 "tot": "num"
                             },
                             {
                                 "t": "change",
                                 "p": "parts.index",
                                 "pt": "msg",
                                 "from": "humidity",
                                 "fromt": "str",
                                 "to": "2",
                                 "tot": "num"
                             },
                             {
                                 "t": "delete",
                                 "p": "sensor",
                                 "pt": "msg"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 2860,
                         "y": 3340,
                         "wires": [
                             [
                                 "e773f7b7.ec4878"
                             ]
                         ]
                     },
                     {
                         "id": "e773f7b7.ec4878",
                         "type": "join",
                         "z": "6e170384.60c96c",
                         "name": "",
                         "mode": "auto",
                         "build": "string",
                         "property": "payload",
                         "propertyType": "msg",
                         "key": "topic",
                         "joiner": "\\n",
                         "joinerType": "str",
                         "accumulate": false,
                         "timeout": "",
                         "count": "",
                         "reduceRight": false,
                         "reduceExp": "",
                         "reduceInit": "",
                         "reduceInitType": "",
                         "reduceFixup": "",
                         "x": 3050,
                         "y": 3340,
                         "wires": [
                             [
                                 "90c0d28c.cca2f",
                                 "1ecb24c1.641e9b"
                             ]
                         ]
                     },
                     {
                         "id": "90c0d28c.cca2f",
                         "type": "ui_template",
                         "z": "6e170384.60c96c",
                         "group": "9efdcbae.2c5598",
                         "name": "ESP03",
                         "order": 8,
                         "width": "6",
                         "height": "5",
                         "format": "<p> Dies sind Werte des Sensors {{msg.topic}}:<br>\nTemperatur: {{msg.payload.temperature}} °Celsius<br>\nDruck: {{msg.payload.pressure}} %<br>\nFeuchtigkeit: {{msg.payload.humidity}} hPa<br>\n</p>",
                         "storeOutMessages": true,
                         "fwdInMessages": true,
                         "resendOnRefresh": true,
                         "templateScope": "local",
                         "x": 3260,
                         "y": 3340,
                         "wires": [
                             []
                         ]
                     },
                     {
                         "id": "1ecb24c1.641e9b",
                         "type": "template",
                         "z": "6e170384.60c96c",
                         "name": "Daten beliebiger Sensor",
                         "field": "payload",
                         "fieldType": "msg",
                         "format": "handlebars",
                         "syntax": "mustache",
                         "template": "Dies sind Werte des Sensors {{topic}}:\nTemperatur: {{payload.temperature}} °Celsius\nDruck: {{payload.pressure}} %\nFeuchtigkeit: {{payload.humidity}} hPa\n",
                         "output": "str",
                         "x": 3310,
                         "y": 3400,
                         "wires": [
                             [
                                 "226f5a46.b47496",
                                 "ed98bd9b.1a534"
                             ]
                         ]
                     },
                     {
                         "id": "226f5a46.b47496",
                         "type": "debug",
                         "z": "6e170384.60c96c",
                         "name": "",
                         "active": true,
                         "tosidebar": true,
                         "console": false,
                         "tostatus": false,
                         "complete": "false",
                         "statusVal": "",
                         "statusType": "auto",
                         "x": 3530,
                         "y": 3400,
                         "wires": []
                     },
                     {
                         "id": "cd72966.d3e6768",
                         "type": "template",
                         "z": "6e170384.60c96c",
                         "name": "Text beide Sensoren",
                         "field": "payload",
                         "fieldType": "msg",
                         "format": "handlebars",
                         "syntax": "mustache",
                         "template": "Dies ist die Ausgabe meiner Sensoren\nHier die Daten des Sensors esp01:\n{{payload.esp01}}\nHier die Daten des Sensors esp02\n{{payload.esp02}}",
                         "output": "str",
                         "x": 3840,
                         "y": 3020,
                         "wires": [
                             [
                                 "7c4293c0.f842ec",
                                 "a5c3b67c.f773c8"
                             ]
                         ]
                     },
                     {
                         "id": "7c4293c0.f842ec",
                         "type": "debug",
                         "z": "6e170384.60c96c",
                         "name": "",
                         "active": true,
                         "tosidebar": true,
                         "console": false,
                         "tostatus": false,
                         "complete": "payload",
                         "targetType": "msg",
                         "statusVal": "",
                         "statusType": "auto",
                         "x": 4090,
                         "y": 3020,
                         "wires": []
                     },
                     {
                         "id": "d56babc3.99c3b8",
                         "type": "change",
                         "z": "6e170384.60c96c",
                         "name": "",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "topic",
                                 "pt": "msg",
                                 "to": "esp01",
                                 "tot": "str"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 3460,
                         "y": 2980,
                         "wires": [
                             [
                                 "d9a397a.ff91368"
                             ]
                         ]
                     },
                     {
                         "id": "647e9e10.7d34",
                         "type": "change",
                         "z": "6e170384.60c96c",
                         "name": "",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "topic",
                                 "pt": "msg",
                                 "to": "esp02",
                                 "tot": "str"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 3460,
                         "y": 3040,
                         "wires": [
                             [
                                 "d9a397a.ff91368"
                             ]
                         ]
                     },
                     {
                         "id": "d9a397a.ff91368",
                         "type": "join",
                         "z": "6e170384.60c96c",
                         "name": "",
                         "mode": "custom",
                         "build": "object",
                         "property": "payload",
                         "propertyType": "msg",
                         "key": "topic",
                         "joiner": "\\n",
                         "joinerType": "str",
                         "accumulate": true,
                         "timeout": "",
                         "count": "2",
                         "reduceRight": false,
                         "reduceExp": "",
                         "reduceInit": "",
                         "reduceInitType": "",
                         "reduceFixup": "",
                         "x": 3650,
                         "y": 3020,
                         "wires": [
                             [
                                 "cd72966.d3e6768"
                             ]
                         ]
                     },
                     {
                         "id": "15242d7a.695af3",
                         "type": "template",
                         "z": "6e170384.60c96c",
                         "name": "Nur Daten ESP01",
                         "field": "payload",
                         "fieldType": "msg",
                         "format": "handlebars",
                         "syntax": "mustache",
                         "template": "Temperatur: {{payload.temperature}} °Celsius\nDruck: {{payload.pressure}} %\nFeuchtigkeit: {{payload.humidity}} hPa",
                         "output": "str",
                         "x": 3250,
                         "y": 2980,
                         "wires": [
                             [
                                 "d56babc3.99c3b8"
                             ]
                         ]
                     },
                     {
                         "id": "e61dc5b7.e1f3c8",
                         "type": "template",
                         "z": "6e170384.60c96c",
                         "name": "Nur Daten ESP02",
                         "field": "payload",
                         "fieldType": "msg",
                         "format": "handlebars",
                         "syntax": "mustache",
                         "template": "Temperatur: {{payload.temperature}} °Celsius\nDruck: {{payload.pressure}} %\nFeuchtigkeit: {{payload.humidity}} hPa",
                         "output": "str",
                         "x": 3250,
                         "y": 3040,
                         "wires": [
                             [
                                 "647e9e10.7d34"
                             ]
                         ]
                     },
                     {
                         "id": "a5c3b67c.f773c8",
                         "type": "change",
                         "z": "6e170384.60c96c",
                         "name": "",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "results",
                                 "pt": "flow",
                                 "to": "payload",
                                 "tot": "msg"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 4110,
                         "y": 2960,
                         "wires": [
                             []
                         ]
                     },
                     {
                         "id": "9e2b3f1.01575c",
                         "type": "http in",
                         "z": "6e170384.60c96c",
                         "name": "",
                         "url": "/mySensors",
                         "method": "get",
                         "upload": false,
                         "swaggerDoc": "",
                         "x": 2760,
                         "y": 2780,
                         "wires": [
                             [
                                 "f91c5fa1.e4834"
                             ]
                         ]
                     },
                     {
                         "id": "f91c5fa1.e4834",
                         "type": "change",
                         "z": "6e170384.60c96c",
                         "name": "",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "results",
                                 "tot": "flow"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 2980,
                         "y": 2780,
                         "wires": [
                             [
                                 "96ae3a77.eb9bf8"
                             ]
                         ]
                     },
                     {
                         "id": "96ae3a77.eb9bf8",
                         "type": "http response",
                         "z": "6e170384.60c96c",
                         "name": "",
                         "statusCode": "",
                         "headers": {},
                         "x": 3170,
                         "y": 2800,
                         "wires": []
                     },
                     {
                         "id": "ed98bd9b.1a534",
                         "type": "change",
                         "z": "6e170384.60c96c",
                         "name": "",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "results2",
                                 "pt": "flow",
                                 "to": "payload",
                                 "tot": "msg"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 3550,
                         "y": 3360,
                         "wires": [
                             []
                         ]
                     },
                     {
                         "id": "c308a782.1f95a8",
                         "type": "http in",
                         "z": "6e170384.60c96c",
                         "name": "",
                         "url": "/ChangedSensors",
                         "method": "get",
                         "upload": false,
                         "swaggerDoc": "",
                         "x": 2740,
                         "y": 2820,
                         "wires": [
                             [
                                 "d733f75a.0009f8"
                             ]
                         ]
                     },
                     {
                         "id": "d733f75a.0009f8",
                         "type": "change",
                         "z": "6e170384.60c96c",
                         "name": "",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "results2",
                                 "tot": "flow"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 2980,
                         "y": 2820,
                         "wires": [
                             [
                                 "96ae3a77.eb9bf8"
                             ]
                         ]
                     },
                     {
                         "id": "9efdcbae.2c5598",
                         "type": "ui_group",
                         "name": "Sensordaten",
                         "tab": "dc25fe35.866f",
                         "order": 3,
                         "disp": true,
                         "width": "6",
                         "collapse": false
                     },
                     {
                         "id": "dc25fe35.866f",
                         "type": "ui_tab",
                         "name": "Test",
                         "icon": "dashboard",
                         "order": 14,
                         "disabled": false,
                         "hidden": false
                     }
                  ]
                  

                  Hier nur mal als Screenshot wie Du unterschiedliche Flowvariablen dann mit unterschiedlichen Aufrufen ausgibst:

                  9492da70-04a5-4da5-8c4a-f7e9ec046173-image.png

                  1 Reply Last reply Reply Quote 0
                  • mickym
                    mickym Most Active @jabba76 last edited by

                    @jabba76 Und nochwas - was mir gerade einfällt. Natürlich bekommst Du die Werte erst, wenn diese von Deinen Sensoren aktualisiert werden in mqtt.
                    Du kannst das aber mit verschiedenen Möglichkeiten initialisieren:

                    1. Was man aber machen kann ist, dass Du die Inject Nodes nutzt/behälst, um diese bei Start von Node Red mit Initialwerten zu befüllen. Dann ist sichergestellt, dass auch nur wenn 1 Wert sich ändert bereits das ganze Objekt zusammengebaut wird.
                    2. Du holst Dir die Daten über iobroker in Nodes bei Start raus und setzt diese anstelle der Inject Nodes
                    3. Du speicherst die Nachrichten als retained im MQTT. Diese Möglichkeit ist zwar ein Standard, aber ich mag sie nicht besonders, da es ggf. schwer ist, die wieder wegzubekommen.

                    Ich hoffe, ich konnte mich einigermaßen verständlich ausdrücken.

                    1 Reply Last reply Reply Quote 0
                    • mickym
                      mickym Most Active @jabba76 last edited by mickym

                      @jabba76 Zur Vervollständigung hier nochmal der Flow ergänzt zum Aufruf des Webservers für die Ausgabe der Einzelsensoren mit /esp01 bzw. /esp02.

                      screen.png

                      screen2.png

                      [
                         {
                             "id": "a23951ac.62498",
                             "type": "inject",
                             "z": "6e170384.60c96c",
                             "name": "esp01/temperature",
                             "props": [
                                 {
                                     "p": "payload"
                                 }
                             ],
                             "repeat": "",
                             "crontab": "",
                             "once": false,
                             "onceDelay": 0.1,
                             "topic": "",
                             "payload": "{\"topic\":\"esp01/temperature\",\"payload\":\"27.71\",\"qos\":1,\"retain\":true,\"_topic\":\"esp01/temperature\",\"_msgid\":\"9c900137.efb7b\"}",
                             "payloadType": "str",
                             "x": 2430,
                             "y": 2900,
                             "wires": [
                                 [
                                     "34511f41.1fc9d"
                                 ]
                             ]
                         },
                         {
                             "id": "896f66a7.b2e9c8",
                             "type": "inject",
                             "z": "6e170384.60c96c",
                             "name": "esp01/humidity",
                             "props": [
                                 {
                                     "p": "payload"
                                 }
                             ],
                             "repeat": "",
                             "crontab": "",
                             "once": false,
                             "onceDelay": 0.1,
                             "topic": "",
                             "payload": "{\"topic\":\"esp01/humidity\",\"payload\":\"46.65\",\"qos\":1,\"retain\":true,\"_topic\":\"esp01/humidity\",\"_msgid\":\"3d6f2cec.f64da4\"}",
                             "payloadType": "str",
                             "x": 2420,
                             "y": 2980,
                             "wires": [
                                 [
                                     "34511f41.1fc9d"
                                 ]
                             ]
                         },
                         {
                             "id": "a887368c.b8a4f8",
                             "type": "inject",
                             "z": "6e170384.60c96c",
                             "name": "esp01/pressure",
                             "props": [
                                 {
                                     "p": "payload"
                                 }
                             ],
                             "repeat": "",
                             "crontab": "",
                             "once": false,
                             "onceDelay": 0.1,
                             "topic": "",
                             "payload": "{\"topic\":\"esp01/pressure\",\"payload\":\"1030.77\",\"qos\":1,\"retain\":true,\"_topic\":\"esp01/pressure\",\"_msgid\":\"402e6b69.3286b4\"}",
                             "payloadType": "str",
                             "x": 2420,
                             "y": 2940,
                             "wires": [
                                 [
                                     "34511f41.1fc9d"
                                 ]
                             ]
                         },
                         {
                             "id": "34511f41.1fc9d",
                             "type": "json",
                             "z": "6e170384.60c96c",
                             "name": "",
                             "property": "payload",
                             "action": "",
                             "pretty": false,
                             "x": 2660,
                             "y": 2940,
                             "wires": [
                                 [
                                     "e72ce6df.f24288"
                                 ]
                             ]
                         },
                         {
                             "id": "e72ce6df.f24288",
                             "type": "change",
                             "z": "6e170384.60c96c",
                             "name": "",
                             "rules": [
                                 {
                                     "t": "move",
                                     "p": "payload",
                                     "pt": "msg",
                                     "to": "sensor",
                                     "tot": "msg"
                                 },
                                 {
                                     "t": "set",
                                     "p": "topic",
                                     "pt": "msg",
                                     "to": "sensor.topic",
                                     "tot": "msg"
                                 },
                                 {
                                     "t": "change",
                                     "p": "topic",
                                     "pt": "msg",
                                     "from": ".*\\/(.*)",
                                     "fromt": "re",
                                     "to": "$1",
                                     "tot": "str"
                                 },
                                 {
                                     "t": "set",
                                     "p": "payload",
                                     "pt": "msg",
                                     "to": "sensor.payload",
                                     "tot": "msg"
                                 },
                                 {
                                     "t": "delete",
                                     "p": "sensor",
                                     "pt": "msg"
                                 }
                             ],
                             "action": "",
                             "property": "",
                             "from": "",
                             "to": "",
                             "reg": false,
                             "x": 2840,
                             "y": 2940,
                             "wires": [
                                 [
                                     "fbe948a7.3fc2b8"
                                 ]
                             ]
                         },
                         {
                             "id": "fbe948a7.3fc2b8",
                             "type": "join",
                             "z": "6e170384.60c96c",
                             "name": "",
                             "mode": "custom",
                             "build": "object",
                             "property": "payload",
                             "propertyType": "msg",
                             "key": "topic",
                             "joiner": "\\n",
                             "joinerType": "str",
                             "accumulate": true,
                             "timeout": "",
                             "count": "3",
                             "reduceRight": false,
                             "reduceExp": "",
                             "reduceInit": "",
                             "reduceInitType": "",
                             "reduceFixup": "",
                             "x": 3050,
                             "y": 2940,
                             "wires": [
                                 [
                                     "6426d775.568bd8",
                                     "15242d7a.695af3"
                                 ]
                             ]
                         },
                         {
                             "id": "6426d775.568bd8",
                             "type": "ui_template",
                             "z": "6e170384.60c96c",
                             "group": "9efdcbae.2c5598",
                             "name": "ESP01",
                             "order": 8,
                             "width": "6",
                             "height": "3",
                             "format": "<p> Dies sind Werte des Sensors ESP01:<br>\nTemperatur: {{msg.payload.temperature}} °Celsius<br>\nDruck: {{msg.payload.pressure}} %<br>\nFeuchtigkeit: {{msg.payload.humidity}} hPa<br>\n</p>",
                             "storeOutMessages": true,
                             "fwdInMessages": true,
                             "resendOnRefresh": true,
                             "templateScope": "local",
                             "x": 3270,
                             "y": 2940,
                             "wires": [
                                 []
                             ]
                         },
                         {
                             "id": "1f4eec1e.0eb874",
                             "type": "inject",
                             "z": "6e170384.60c96c",
                             "name": "esp02/temperature",
                             "props": [
                                 {
                                     "p": "payload"
                                 }
                             ],
                             "repeat": "",
                             "crontab": "",
                             "once": false,
                             "onceDelay": 0.1,
                             "topic": "",
                             "payload": "{\"topic\":\"esp02/temperature\",\"payload\":\"15.48\",\"qos\":1,\"retain\":true,\"_topic\":\"esp02/temperature\",\"_msgid\":\"9c900137.efb7b\"}",
                             "payloadType": "str",
                             "x": 2430,
                             "y": 3040,
                             "wires": [
                                 [
                                     "f930269e.45ba98"
                                 ]
                             ]
                         },
                         {
                             "id": "371b0199.1a5cbe",
                             "type": "inject",
                             "z": "6e170384.60c96c",
                             "name": "esp01/humidity",
                             "props": [
                                 {
                                     "p": "payload"
                                 }
                             ],
                             "repeat": "",
                             "crontab": "",
                             "once": false,
                             "onceDelay": 0.1,
                             "topic": "",
                             "payload": "{\"topic\":\"esp02/humidity\",\"payload\":\"66.85\",\"qos\":1,\"retain\":true,\"_topic\":\"esp02/humidity\",\"_msgid\":\"3d6f2cec.f64da4\"}",
                             "payloadType": "str",
                             "x": 2420,
                             "y": 3120,
                             "wires": [
                                 [
                                     "f930269e.45ba98"
                                 ]
                             ]
                         },
                         {
                             "id": "81340953.42add8",
                             "type": "inject",
                             "z": "6e170384.60c96c",
                             "name": "esp02/pressure",
                             "props": [
                                 {
                                     "p": "payload"
                                 }
                             ],
                             "repeat": "",
                             "crontab": "",
                             "once": false,
                             "onceDelay": 0.1,
                             "topic": "",
                             "payload": "{\"topic\":\"esp02/pressure\",\"payload\":\"968.22\",\"qos\":1,\"retain\":true,\"_topic\":\"esp02/pressure\",\"_msgid\":\"402e6b69.3286b4\"}",
                             "payloadType": "str",
                             "x": 2420,
                             "y": 3080,
                             "wires": [
                                 [
                                     "f930269e.45ba98"
                                 ]
                             ]
                         },
                         {
                             "id": "f930269e.45ba98",
                             "type": "json",
                             "z": "6e170384.60c96c",
                             "name": "",
                             "property": "payload",
                             "action": "",
                             "pretty": false,
                             "x": 2660,
                             "y": 3080,
                             "wires": [
                                 [
                                     "3743ee9f.58b6e2"
                                 ]
                             ]
                         },
                         {
                             "id": "3743ee9f.58b6e2",
                             "type": "change",
                             "z": "6e170384.60c96c",
                             "name": "",
                             "rules": [
                                 {
                                     "t": "move",
                                     "p": "payload",
                                     "pt": "msg",
                                     "to": "sensor",
                                     "tot": "msg"
                                 },
                                 {
                                     "t": "set",
                                     "p": "topic",
                                     "pt": "msg",
                                     "to": "sensor.topic",
                                     "tot": "msg"
                                 },
                                 {
                                     "t": "change",
                                     "p": "topic",
                                     "pt": "msg",
                                     "from": ".*\\/(.*)",
                                     "fromt": "re",
                                     "to": "$1",
                                     "tot": "str"
                                 },
                                 {
                                     "t": "set",
                                     "p": "payload",
                                     "pt": "msg",
                                     "to": "sensor.payload",
                                     "tot": "msg"
                                 },
                                 {
                                     "t": "delete",
                                     "p": "sensor",
                                     "pt": "msg"
                                 }
                             ],
                             "action": "",
                             "property": "",
                             "from": "",
                             "to": "",
                             "reg": false,
                             "x": 2840,
                             "y": 3080,
                             "wires": [
                                 [
                                     "2db197c8.56c048"
                                 ]
                             ]
                         },
                         {
                             "id": "2db197c8.56c048",
                             "type": "join",
                             "z": "6e170384.60c96c",
                             "name": "",
                             "mode": "custom",
                             "build": "object",
                             "property": "payload",
                             "propertyType": "msg",
                             "key": "topic",
                             "joiner": "\\n",
                             "joinerType": "str",
                             "accumulate": true,
                             "timeout": "",
                             "count": "3",
                             "reduceRight": false,
                             "reduceExp": "",
                             "reduceInit": "",
                             "reduceInitType": "",
                             "reduceFixup": "",
                             "x": 3050,
                             "y": 3080,
                             "wires": [
                                 [
                                     "d619099a.00e258",
                                     "e61dc5b7.e1f3c8"
                                 ]
                             ]
                         },
                         {
                             "id": "d619099a.00e258",
                             "type": "ui_template",
                             "z": "6e170384.60c96c",
                             "group": "9efdcbae.2c5598",
                             "name": "ESP02",
                             "order": 8,
                             "width": "6",
                             "height": "3",
                             "format": "<p> Dies sind Werte des Sensors ESP02:<br>\nTemperatur: {{msg.payload.temperature}} °Celsius<br>\nDruck: {{msg.payload.pressure}} %<br>\nFeuchtigkeit: {{msg.payload.humidity}} hPa<br>\n</p>",
                             "storeOutMessages": true,
                             "fwdInMessages": true,
                             "resendOnRefresh": true,
                             "templateScope": "local",
                             "x": 3270,
                             "y": 3080,
                             "wires": [
                                 []
                             ]
                         },
                         {
                             "id": "ab61c658.d5e478",
                             "type": "inject",
                             "z": "6e170384.60c96c",
                             "name": "esp01/temperature",
                             "props": [
                                 {
                                     "p": "payload"
                                 }
                             ],
                             "repeat": "",
                             "crontab": "",
                             "once": false,
                             "onceDelay": 0.1,
                             "topic": "",
                             "payload": "{\"topic\":\"esp01/temperature\",\"payload\":\"27.71\",\"qos\":1,\"retain\":true,\"_topic\":\"esp01/temperature\",\"_msgid\":\"9c900137.efb7b\"}",
                             "payloadType": "str",
                             "x": 2450,
                             "y": 3240,
                             "wires": [
                                 [
                                     "eee07f4a.41fa4"
                                 ]
                             ]
                         },
                         {
                             "id": "3f35b8e2.762838",
                             "type": "inject",
                             "z": "6e170384.60c96c",
                             "name": "esp01/humidity",
                             "props": [
                                 {
                                     "p": "payload"
                                 }
                             ],
                             "repeat": "",
                             "crontab": "",
                             "once": false,
                             "onceDelay": 0.1,
                             "topic": "",
                             "payload": "{\"topic\":\"esp01/humidity\",\"payload\":\"46.65\",\"qos\":1,\"retain\":true,\"_topic\":\"esp01/humidity\",\"_msgid\":\"3d6f2cec.f64da4\"}",
                             "payloadType": "str",
                             "x": 2440,
                             "y": 3320,
                             "wires": [
                                 [
                                     "eee07f4a.41fa4"
                                 ]
                             ]
                         },
                         {
                             "id": "26c66965.fdf586",
                             "type": "inject",
                             "z": "6e170384.60c96c",
                             "name": "esp01/pressure",
                             "props": [
                                 {
                                     "p": "payload"
                                 }
                             ],
                             "repeat": "",
                             "crontab": "",
                             "once": false,
                             "onceDelay": 0.1,
                             "topic": "",
                             "payload": "{\"topic\":\"esp01/pressure\",\"payload\":\"1030.77\",\"qos\":1,\"retain\":true,\"_topic\":\"esp01/pressure\",\"_msgid\":\"402e6b69.3286b4\"}",
                             "payloadType": "str",
                             "x": 2440,
                             "y": 3280,
                             "wires": [
                                 [
                                     "eee07f4a.41fa4"
                                 ]
                             ]
                         },
                         {
                             "id": "2f3f7e6e.6a06b2",
                             "type": "inject",
                             "z": "6e170384.60c96c",
                             "name": "esp02/temperature",
                             "props": [
                                 {
                                     "p": "payload"
                                 }
                             ],
                             "repeat": "",
                             "crontab": "",
                             "once": false,
                             "onceDelay": 0.1,
                             "topic": "",
                             "payload": "{\"topic\":\"esp02/temperature\",\"payload\":\"15.48\",\"qos\":1,\"retain\":true,\"_topic\":\"esp02/temperature\",\"_msgid\":\"9c900137.efb7b\"}",
                             "payloadType": "str",
                             "x": 2450,
                             "y": 3380,
                             "wires": [
                                 [
                                     "eee07f4a.41fa4"
                                 ]
                             ]
                         },
                         {
                             "id": "9feefd2c.8feea",
                             "type": "inject",
                             "z": "6e170384.60c96c",
                             "name": "esp01/humidity",
                             "props": [
                                 {
                                     "p": "payload"
                                 }
                             ],
                             "repeat": "",
                             "crontab": "",
                             "once": false,
                             "onceDelay": 0.1,
                             "topic": "",
                             "payload": "{\"topic\":\"esp02/humidity\",\"payload\":\"66.85\",\"qos\":1,\"retain\":true,\"_topic\":\"esp02/humidity\",\"_msgid\":\"3d6f2cec.f64da4\"}",
                             "payloadType": "str",
                             "x": 2440,
                             "y": 3460,
                             "wires": [
                                 [
                                     "eee07f4a.41fa4"
                                 ]
                             ]
                         },
                         {
                             "id": "d416cac9.ba0cb8",
                             "type": "inject",
                             "z": "6e170384.60c96c",
                             "name": "esp02/pressure",
                             "props": [
                                 {
                                     "p": "payload"
                                 }
                             ],
                             "repeat": "",
                             "crontab": "",
                             "once": false,
                             "onceDelay": 0.1,
                             "topic": "",
                             "payload": "{\"topic\":\"esp02/pressure\",\"payload\":\"968.22\",\"qos\":1,\"retain\":true,\"_topic\":\"esp02/pressure\",\"_msgid\":\"402e6b69.3286b4\"}",
                             "payloadType": "str",
                             "x": 2440,
                             "y": 3420,
                             "wires": [
                                 [
                                     "eee07f4a.41fa4"
                                 ]
                             ]
                         },
                         {
                             "id": "eee07f4a.41fa4",
                             "type": "json",
                             "z": "6e170384.60c96c",
                             "name": "",
                             "property": "payload",
                             "action": "",
                             "pretty": false,
                             "x": 2680,
                             "y": 3340,
                             "wires": [
                                 [
                                     "f5cdaa11.5bb828"
                                 ]
                             ]
                         },
                         {
                             "id": "f5cdaa11.5bb828",
                             "type": "change",
                             "z": "6e170384.60c96c",
                             "name": "",
                             "rules": [
                                 {
                                     "t": "move",
                                     "p": "payload",
                                     "pt": "msg",
                                     "to": "sensor",
                                     "tot": "msg"
                                 },
                                 {
                                     "t": "set",
                                     "p": "parts",
                                     "pt": "msg",
                                     "to": "{\"type\":\"object\",\"index\":\"\",\"count\":3}",
                                     "tot": "json"
                                 },
                                 {
                                     "t": "set",
                                     "p": "topic",
                                     "pt": "msg",
                                     "to": "sensor.topic",
                                     "tot": "msg"
                                 },
                                 {
                                     "t": "change",
                                     "p": "topic",
                                     "pt": "msg",
                                     "from": "(.*)\\/.*",
                                     "fromt": "re",
                                     "to": "$1",
                                     "tot": "str"
                                 },
                                 {
                                     "t": "set",
                                     "p": "parts.id",
                                     "pt": "msg",
                                     "to": "topic",
                                     "tot": "msg"
                                 },
                                 {
                                     "t": "set",
                                     "p": "payload",
                                     "pt": "msg",
                                     "to": "sensor.payload",
                                     "tot": "msg"
                                 },
                                 {
                                     "t": "set",
                                     "p": "parts.key",
                                     "pt": "msg",
                                     "to": "sensor.topic",
                                     "tot": "msg"
                                 },
                                 {
                                     "t": "change",
                                     "p": "parts.key",
                                     "pt": "msg",
                                     "from": ".*\\/(.*)",
                                     "fromt": "re",
                                     "to": "$1",
                                     "tot": "str"
                                 },
                                 {
                                     "t": "set",
                                     "p": "parts.index",
                                     "pt": "msg",
                                     "to": "parts.key",
                                     "tot": "msg"
                                 },
                                 {
                                     "t": "change",
                                     "p": "parts.index",
                                     "pt": "msg",
                                     "from": "temperature",
                                     "fromt": "str",
                                     "to": "0",
                                     "tot": "num"
                                 },
                                 {
                                     "t": "change",
                                     "p": "parts.index",
                                     "pt": "msg",
                                     "from": "pressure",
                                     "fromt": "str",
                                     "to": "1",
                                     "tot": "num"
                                 },
                                 {
                                     "t": "change",
                                     "p": "parts.index",
                                     "pt": "msg",
                                     "from": "humidity",
                                     "fromt": "str",
                                     "to": "2",
                                     "tot": "num"
                                 },
                                 {
                                     "t": "delete",
                                     "p": "sensor",
                                     "pt": "msg"
                                 }
                             ],
                             "action": "",
                             "property": "",
                             "from": "",
                             "to": "",
                             "reg": false,
                             "x": 2860,
                             "y": 3340,
                             "wires": [
                                 [
                                     "e773f7b7.ec4878"
                                 ]
                             ]
                         },
                         {
                             "id": "e773f7b7.ec4878",
                             "type": "join",
                             "z": "6e170384.60c96c",
                             "name": "",
                             "mode": "auto",
                             "build": "string",
                             "property": "payload",
                             "propertyType": "msg",
                             "key": "topic",
                             "joiner": "\\n",
                             "joinerType": "str",
                             "accumulate": false,
                             "timeout": "",
                             "count": "",
                             "reduceRight": false,
                             "reduceExp": "",
                             "reduceInit": "",
                             "reduceInitType": "",
                             "reduceFixup": "",
                             "x": 3050,
                             "y": 3340,
                             "wires": [
                                 [
                                     "90c0d28c.cca2f",
                                     "1ecb24c1.641e9b"
                                 ]
                             ]
                         },
                         {
                             "id": "90c0d28c.cca2f",
                             "type": "ui_template",
                             "z": "6e170384.60c96c",
                             "group": "9efdcbae.2c5598",
                             "name": "ESP03",
                             "order": 8,
                             "width": "6",
                             "height": "5",
                             "format": "<p> Dies sind Werte des Sensors {{msg.topic}}:<br>\nTemperatur: {{msg.payload.temperature}} °Celsius<br>\nDruck: {{msg.payload.pressure}} %<br>\nFeuchtigkeit: {{msg.payload.humidity}} hPa<br>\n</p>",
                             "storeOutMessages": true,
                             "fwdInMessages": true,
                             "resendOnRefresh": true,
                             "templateScope": "local",
                             "x": 3260,
                             "y": 3340,
                             "wires": [
                                 []
                             ]
                         },
                         {
                             "id": "1ecb24c1.641e9b",
                             "type": "template",
                             "z": "6e170384.60c96c",
                             "name": "Daten beliebiger Sensor",
                             "field": "payload",
                             "fieldType": "msg",
                             "format": "handlebars",
                             "syntax": "mustache",
                             "template": "Dies sind Werte des Sensors {{topic}}:\nTemperatur: {{payload.temperature}} °Celsius\nDruck: {{payload.pressure}} %\nFeuchtigkeit: {{payload.humidity}} hPa\n",
                             "output": "str",
                             "x": 3310,
                             "y": 3400,
                             "wires": [
                                 [
                                     "226f5a46.b47496",
                                     "ed98bd9b.1a534"
                                 ]
                             ]
                         },
                         {
                             "id": "226f5a46.b47496",
                             "type": "debug",
                             "z": "6e170384.60c96c",
                             "name": "",
                             "active": true,
                             "tosidebar": true,
                             "console": false,
                             "tostatus": false,
                             "complete": "false",
                             "statusVal": "",
                             "statusType": "auto",
                             "x": 3530,
                             "y": 3400,
                             "wires": []
                         },
                         {
                             "id": "cd72966.d3e6768",
                             "type": "template",
                             "z": "6e170384.60c96c",
                             "name": "Text beide Sensoren",
                             "field": "payload",
                             "fieldType": "msg",
                             "format": "handlebars",
                             "syntax": "mustache",
                             "template": "Dies ist die Ausgabe meiner Sensoren\nHier die Daten des Sensors esp01:\n{{payload.esp01}}\nHier die Daten des Sensors esp02\n{{payload.esp02}}",
                             "output": "str",
                             "x": 3840,
                             "y": 3020,
                             "wires": [
                                 [
                                     "7c4293c0.f842ec",
                                     "a5c3b67c.f773c8"
                                 ]
                             ]
                         },
                         {
                             "id": "7c4293c0.f842ec",
                             "type": "debug",
                             "z": "6e170384.60c96c",
                             "name": "",
                             "active": true,
                             "tosidebar": true,
                             "console": false,
                             "tostatus": false,
                             "complete": "payload",
                             "targetType": "msg",
                             "statusVal": "",
                             "statusType": "auto",
                             "x": 4090,
                             "y": 3020,
                             "wires": []
                         },
                         {
                             "id": "d56babc3.99c3b8",
                             "type": "change",
                             "z": "6e170384.60c96c",
                             "name": "",
                             "rules": [
                                 {
                                     "t": "set",
                                     "p": "topic",
                                     "pt": "msg",
                                     "to": "esp01",
                                     "tot": "str"
                                 }
                             ],
                             "action": "",
                             "property": "",
                             "from": "",
                             "to": "",
                             "reg": false,
                             "x": 3460,
                             "y": 2980,
                             "wires": [
                                 [
                                     "d9a397a.ff91368"
                                 ]
                             ]
                         },
                         {
                             "id": "647e9e10.7d34",
                             "type": "change",
                             "z": "6e170384.60c96c",
                             "name": "",
                             "rules": [
                                 {
                                     "t": "set",
                                     "p": "topic",
                                     "pt": "msg",
                                     "to": "esp02",
                                     "tot": "str"
                                 }
                             ],
                             "action": "",
                             "property": "",
                             "from": "",
                             "to": "",
                             "reg": false,
                             "x": 3460,
                             "y": 3040,
                             "wires": [
                                 [
                                     "d9a397a.ff91368"
                                 ]
                             ]
                         },
                         {
                             "id": "d9a397a.ff91368",
                             "type": "join",
                             "z": "6e170384.60c96c",
                             "name": "",
                             "mode": "custom",
                             "build": "object",
                             "property": "payload",
                             "propertyType": "msg",
                             "key": "topic",
                             "joiner": "\\n",
                             "joinerType": "str",
                             "accumulate": true,
                             "timeout": "",
                             "count": "2",
                             "reduceRight": false,
                             "reduceExp": "",
                             "reduceInit": "",
                             "reduceInitType": "",
                             "reduceFixup": "",
                             "x": 3650,
                             "y": 3020,
                             "wires": [
                                 [
                                     "cd72966.d3e6768"
                                 ]
                             ]
                         },
                         {
                             "id": "15242d7a.695af3",
                             "type": "template",
                             "z": "6e170384.60c96c",
                             "name": "Nur Daten ESP01",
                             "field": "payload",
                             "fieldType": "msg",
                             "format": "handlebars",
                             "syntax": "mustache",
                             "template": "Temperatur: {{payload.temperature}} °Celsius\nDruck: {{payload.pressure}} %\nFeuchtigkeit: {{payload.humidity}} hPa",
                             "output": "str",
                             "x": 3250,
                             "y": 2980,
                             "wires": [
                                 [
                                     "d56babc3.99c3b8",
                                     "f07dfdb9.8f45c"
                                 ]
                             ]
                         },
                         {
                             "id": "e61dc5b7.e1f3c8",
                             "type": "template",
                             "z": "6e170384.60c96c",
                             "name": "Nur Daten ESP02",
                             "field": "payload",
                             "fieldType": "msg",
                             "format": "handlebars",
                             "syntax": "mustache",
                             "template": "Temperatur: {{payload.temperature}} °Celsius\nDruck: {{payload.pressure}} %\nFeuchtigkeit: {{payload.humidity}} hPa",
                             "output": "str",
                             "x": 3250,
                             "y": 3040,
                             "wires": [
                                 [
                                     "647e9e10.7d34",
                                     "de2d7f4a.8bd6c"
                                 ]
                             ]
                         },
                         {
                             "id": "a5c3b67c.f773c8",
                             "type": "change",
                             "z": "6e170384.60c96c",
                             "name": "",
                             "rules": [
                                 {
                                     "t": "set",
                                     "p": "results",
                                     "pt": "flow",
                                     "to": "payload",
                                     "tot": "msg"
                                 }
                             ],
                             "action": "",
                             "property": "",
                             "from": "",
                             "to": "",
                             "reg": false,
                             "x": 4110,
                             "y": 2960,
                             "wires": [
                                 []
                             ]
                         },
                         {
                             "id": "9e2b3f1.01575c",
                             "type": "http in",
                             "z": "6e170384.60c96c",
                             "name": "",
                             "url": "/mySensors",
                             "method": "get",
                             "upload": false,
                             "swaggerDoc": "",
                             "x": 2740,
                             "y": 2700,
                             "wires": [
                                 [
                                     "f91c5fa1.e4834"
                                 ]
                             ]
                         },
                         {
                             "id": "f91c5fa1.e4834",
                             "type": "change",
                             "z": "6e170384.60c96c",
                             "name": "",
                             "rules": [
                                 {
                                     "t": "set",
                                     "p": "payload",
                                     "pt": "msg",
                                     "to": "results",
                                     "tot": "flow"
                                 }
                             ],
                             "action": "",
                             "property": "",
                             "from": "",
                             "to": "",
                             "reg": false,
                             "x": 2960,
                             "y": 2700,
                             "wires": [
                                 [
                                     "96ae3a77.eb9bf8"
                                 ]
                             ]
                         },
                         {
                             "id": "96ae3a77.eb9bf8",
                             "type": "http response",
                             "z": "6e170384.60c96c",
                             "name": "",
                             "statusCode": "",
                             "headers": {},
                             "x": 3150,
                             "y": 2760,
                             "wires": []
                         },
                         {
                             "id": "ed98bd9b.1a534",
                             "type": "change",
                             "z": "6e170384.60c96c",
                             "name": "",
                             "rules": [
                                 {
                                     "t": "set",
                                     "p": "results2",
                                     "pt": "flow",
                                     "to": "payload",
                                     "tot": "msg"
                                 }
                             ],
                             "action": "",
                             "property": "",
                             "from": "",
                             "to": "",
                             "reg": false,
                             "x": 3550,
                             "y": 3360,
                             "wires": [
                                 []
                             ]
                         },
                         {
                             "id": "c308a782.1f95a8",
                             "type": "http in",
                             "z": "6e170384.60c96c",
                             "name": "",
                             "url": "/ChangedSensors",
                             "method": "get",
                             "upload": false,
                             "swaggerDoc": "",
                             "x": 2720,
                             "y": 2740,
                             "wires": [
                                 [
                                     "d733f75a.0009f8"
                                 ]
                             ]
                         },
                         {
                             "id": "d733f75a.0009f8",
                             "type": "change",
                             "z": "6e170384.60c96c",
                             "name": "",
                             "rules": [
                                 {
                                     "t": "set",
                                     "p": "payload",
                                     "pt": "msg",
                                     "to": "results2",
                                     "tot": "flow"
                                 }
                             ],
                             "action": "",
                             "property": "",
                             "from": "",
                             "to": "",
                             "reg": false,
                             "x": 2960,
                             "y": 2740,
                             "wires": [
                                 [
                                     "96ae3a77.eb9bf8"
                                 ]
                             ]
                         },
                         {
                             "id": "f07dfdb9.8f45c",
                             "type": "change",
                             "z": "6e170384.60c96c",
                             "name": "",
                             "rules": [
                                 {
                                     "t": "set",
                                     "p": "esp01",
                                     "pt": "flow",
                                     "to": "payload",
                                     "tot": "msg"
                                 }
                             ],
                             "action": "",
                             "property": "",
                             "from": "",
                             "to": "",
                             "reg": false,
                             "x": 3470,
                             "y": 2940,
                             "wires": [
                                 []
                             ]
                         },
                         {
                             "id": "de2d7f4a.8bd6c",
                             "type": "change",
                             "z": "6e170384.60c96c",
                             "name": "",
                             "rules": [
                                 {
                                     "t": "set",
                                     "p": "esp02",
                                     "pt": "flow",
                                     "to": "payload",
                                     "tot": "msg"
                                 }
                             ],
                             "action": "",
                             "property": "",
                             "from": "",
                             "to": "",
                             "reg": false,
                             "x": 3470,
                             "y": 3080,
                             "wires": [
                                 []
                             ]
                         },
                         {
                             "id": "9e1c085c.811868",
                             "type": "http in",
                             "z": "6e170384.60c96c",
                             "name": "",
                             "url": "/esp01",
                             "method": "get",
                             "upload": false,
                             "swaggerDoc": "",
                             "x": 2690,
                             "y": 2780,
                             "wires": [
                                 [
                                     "d3bfaa70.10e858"
                                 ]
                             ]
                         },
                         {
                             "id": "d3bfaa70.10e858",
                             "type": "change",
                             "z": "6e170384.60c96c",
                             "name": "",
                             "rules": [
                                 {
                                     "t": "set",
                                     "p": "payload",
                                     "pt": "msg",
                                     "to": "esp01",
                                     "tot": "flow"
                                 }
                             ],
                             "action": "",
                             "property": "",
                             "from": "",
                             "to": "",
                             "reg": false,
                             "x": 2960,
                             "y": 2780,
                             "wires": [
                                 [
                                     "96ae3a77.eb9bf8"
                                 ]
                             ]
                         },
                         {
                             "id": "44b70a12.e46674",
                             "type": "http in",
                             "z": "6e170384.60c96c",
                             "name": "",
                             "url": "/esp02",
                             "method": "get",
                             "upload": false,
                             "swaggerDoc": "",
                             "x": 2690,
                             "y": 2820,
                             "wires": [
                                 [
                                     "b29fea4b.7b6358"
                                 ]
                             ]
                         },
                         {
                             "id": "b29fea4b.7b6358",
                             "type": "change",
                             "z": "6e170384.60c96c",
                             "name": "",
                             "rules": [
                                 {
                                     "t": "set",
                                     "p": "payload",
                                     "pt": "msg",
                                     "to": "esp02",
                                     "tot": "flow"
                                 }
                             ],
                             "action": "",
                             "property": "",
                             "from": "",
                             "to": "",
                             "reg": false,
                             "x": 2960,
                             "y": 2820,
                             "wires": [
                                 [
                                     "96ae3a77.eb9bf8"
                                 ]
                             ]
                         },
                         {
                             "id": "9efdcbae.2c5598",
                             "type": "ui_group",
                             "name": "Sensordaten",
                             "tab": "dc25fe35.866f",
                             "order": 3,
                             "disp": true,
                             "width": "6",
                             "collapse": false
                         },
                         {
                             "id": "dc25fe35.866f",
                             "type": "ui_tab",
                             "name": "Test",
                             "icon": "dashboard",
                             "order": 14,
                             "disabled": false,
                             "hidden": false
                         }
                      ]
                      

                      Die Zeilenumbrüche aus der Template Node werden hier nicht dargestellt. Falls Dein SAT Reciever damit nicht umgehen kann, musst das halt in der Template Node ändern.

                      J 1 Reply Last reply Reply Quote 0
                      • P
                        PeterHansen @jabba76 last edited by

                        @jabba76 sagte in BME280 mit ESP8266 von MQTT auf Webserver als Text:

                        habe 2 BME 280 Sensoren die über ESP8266 an den iobroker (MQTT) senden.

                        Hi jabba76,
                        an welchen Pins hast Du die beiden BME280 angeschlossen? D3 (SDA) und D4 (SCL) ? und den zweiten -parallel oder an D1 & D2 ?
                        Danke Dir
                        Paul

                        1 Reply Last reply Reply Quote 0
                        • J
                          jabba76 @mickym last edited by jabba76

                          @mickym

                          Hallo danke dir für die gute Arbeit war leider lange nicht da aus Zeitmangel.

                          Dein Flow so wie er ist funktioniert wunderbar das was da ausgegeben wird wird auch richtig Angezeigt.
                          Jetzt wollte ich die inject node durch meine iobroker in node ersetzen damit die Daten vom Sensor einfliessen können leider funktioniert das nicht, die ausgebe kann nicht gebaut werden.

                          Fehler Meldung:

                          Message missing key property 'msg.topic' - cannot add to object
                          

                          Meine Sensoren geben sowas raus

                          temperatur
                          {"val":23.16,"ack":true,"ts":1637513514166,"q":0,"from":"system.adapter.mqtt.0","user":"system.user.admin","lc":1637513514166}
                          
                          Luftdruck
                          {"val":1004.75,"ack":true,"ts":1637513514168,"q":0,"from":"system.adapter.mqtt.0","user":"system.user.admin","lc":1637513514168}
                          
                          Luftfeuchte
                          {"val":42.69,"ack":true,"ts":1637513514169,"q":0,"from":"system.adapter.mqtt.0","user":"system.user.admin","lc":1637513514169}
                          
                          

                          könntest du noch mal drüber schauen wie ich das anpassen kann/soll damit die Daten übernomen werden und auch Angezeigt werden können dafür wäre ich dir sehr dankbar.
                          Es wird erst ausgabe gebaut wenn alle Sensoren alle Daten gesendet haben? weil jeder sendet alle 15 min wenn der erste gesendet hat und der zweite noch 5 min hat wird die ausgabe erst in 20min Online richtig?

                          @PeterHansen soory das so spät erst ja das sind D1 und D2 Pins. bei Youtube das eingeben "ESP8266 Deep-Sleep, BME280 Daten über MQTT senden"

                          mfg

                          mickym 1 Reply Last reply Reply Quote 0
                          • mickym
                            mickym Most Active @jabba76 last edited by mickym

                            @jabba76 sagte in BME280 mit ESP8266 von MQTT auf Webserver als Text:

                            @mickym

                            Hallo danke dir für die gute Arbeit war leider lange nicht da aus Zeitmangel.

                            Dein Flow so wie er ist funktioniert wunderbar das was da ausgegeben wird wird auch richtig Angezeigt.
                            Jetzt wollte ich die inject node durch meine iobroker in node ersetzen damit die Daten vom Sensor einfliessen können leider funktioniert das nicht, die ausgebe kann nicht gebaut werden.

                            Fehler Meldung:

                            Message missing key property 'msg.topic' - cannot add to object
                            

                            Meine Sensoren geben sowas raus

                            temperatur
                            {"val":23.16,"ack":true,"ts":1637513514166,"q":0,"from":"system.adapter.mqtt.0","user":"system.user.admin","lc":1637513514166}
                            
                            Luftdruck
                            {"val":1004.75,"ack":true,"ts":1637513514168,"q":0,"from":"system.adapter.mqtt.0","user":"system.user.admin","lc":1637513514168}
                            
                            Luftfeuchte
                            {"val":42.69,"ack":true,"ts":1637513514169,"q":0,"from":"system.adapter.mqtt.0","user":"system.user.admin","lc":1637513514169}
                            
                            

                            könntest du noch mal drüber schauen wie ich das anpassen kann/soll damit die Daten übernomen werden und auch Angezeigt werden können dafür wäre ich dir sehr dankbar.
                            Es wird erst ausgabe gebaut wenn alle Sensoren alle Daten gesendet haben? weil jeder sendet alle 15 min wenn der erste gesendet hat und der zweite noch 5 min hat wird die ausgabe erst in 20min Online richtig?

                            @PeterHansen soory das so spät erst ja das sind D1 und D2 Pins. bei Youtube das eingeben ESP8266 Deep-Sleep, BME280 Daten über MQTT senden

                            mfg

                            Ja ursprünglich wolltest Du ja den Flow über HTTP mit NodeRed als WebServer ansprechen. Mit den iobroker In Nodes ist es eigentlich einfach.

                            Klar (s. Fehlermeldung) musst Du den Topic noch ergänzen, aber wichtig ist (hängt davon ab, wieviele Flows Du schon hast), wie ist Deine NodeRed Adapter Konfig eingestellt. Also:

                            1. Hast Du schon viele Flows die mit iobroker In NOdes arbeiten?
                            2. Wenn nicht - auf jeden Fall Zeichenkonvertierung in der Adapterkonfig ausschalten (empfehle ich immer zuerst)
                            3. Wenn nicht musst Du alle Strings ggf. wieder umwandeln.

                            Am Besten ist Du postest hier mal direkt die Ausgabe Deines Strings - Objektes - das aus Deiner iobroker in Node rauskommt und zwar des kompleten NAchrichtenobjektes - die iobroker In Nodes setzen den msg.topic den vollständigen Pfad des Datenpunktes im iobroker und nicht die Objekte sondern den Value rausholen - wofür nimmst Du das Objekt????:

                            Also hier wieder auf value umstellen!

                            8c94f229-6a09-45e7-9d98-b233e0137aba-image.png

                            Entweder das komplette Nachricht als Screenshot oder wenn als JSON - dann bitte im Debugfenster auf Wert kopieren gehen und den JSON hier posten:

                            {"topic":"0_userdata/0/testType","payload":19.5,"acknowledged":false,"timestamp":1636835207813,"lastchange":1636835207813,"from":"system.adapter.node-red.0","_msgid":"2465ec6b.e48df4"}
                            
                            J 1 Reply Last reply Reply Quote 0
                            • J
                              jabba76 @mickym last edited by jabba76

                              @mickym

                              Dann habe ich micht wohl nicht richtig ausgedrückt

                              esp mit sensoren senden an MQTT die werte wollte ich über NodeRed im Browser als Text nicht HTML das hast du ja gemacht so würde das auf LCD4Linux funktionieren, nur jetzt wollte ich in denem Flow die sensoren einbinden und Zonk.

                              ok die Object ausgebe steht schon oben mehr kommt da nicht raus "val" sind ja die Wrte und mein system ist sagen wir mal ganz frisch 🙂 ist noch nicht so viel drin

                              thx

                              das kommt dabei raus

                              23.52
                              
                              mickym 1 Reply Last reply Reply Quote 0
                              • mickym
                                mickym Most Active @jabba76 last edited by

                                @jabba76 sagte in BME280 mit ESP8266 von MQTT auf Webserver als Text:

                                @mickym

                                Dann habe ich micht wohl nicht richtig ausgedrückt

                                esp mit sensoren senden an MQTT die werte wollte ich über NodeRed im Browser als Text nicht HTML das hast du ja gemacht so würde das auf LCD4Linux funktionieren, nur jetzt wollte ich in denem Flow die sensoren einbinden und Zonk.

                                ok die Object ausgebe steht schon oben mehr kommt da nicht raus "val" sind ja die Wrte und mein system ist sagen wir mal ganz frisch 🙂 ist noch nicht so viel drin

                                thx

                                das kommt dabei raus

                                23.52
                                

                                Das komplette Nachrichtenobjekt bitte: 😉

                                93c1a548-b4c8-4f8d-adfc-da01204f5ec7-image.png

                                J 1 Reply Last reply Reply Quote 0
                                • J
                                  jabba76 @mickym last edited by jabba76

                                  @mickym sagte in BME280 mit ESP8266 von MQTT auf Webserver als Text:

                                  @jabba76 sagte in BME280 mit ESP8266 von MQTT auf Webserver als Text:

                                  @mickym

                                  Dann habe ich micht wohl nicht richtig ausgedrückt

                                  esp mit sensoren senden an MQTT die werte wollte ich über NodeRed im Browser als Text nicht HTML das hast du ja gemacht so würde das auf LCD4Linux funktionieren, nur jetzt wollte ich in denem Flow die sensoren einbinden und Zonk.

                                  ok die Object ausgebe steht schon oben mehr kommt da nicht raus "val" sind ja die Wrte und mein system ist sagen wir mal ganz frisch 🙂 ist noch nicht so viel drin

                                  thx

                                  das kommt dabei raus

                                  23.52
                                  

                                  Das komplette Nachrichtenobjekt bitte: 😉

                                  93c1a548-b4c8-4f8d-adfc-da01204f5ec7-image.png

                                  hee soorki habe ich vergessen umzustellen hier bitt

                                  Temperatur
                                  {"topic":"mqtt/0/esp1/temperature","payload":"23.29","acknowledged":true,"timestamp":1637516687490,"lastchange":1637516687490,"from":"system.adapter.mqtt.0","_msgid":"f040134c.cbdcc"}
                                  
                                  Luftdruck
                                  {"topic":"mqtt/0/esp1/pressure","payload":"1005.47","acknowledged":true,"timestamp":1637516998692,"lastchange":1637516998692,"from":"system.adapter.mqtt.0","_msgid":"dbf9aa3b.50ede8"}
                                  
                                  Luftfeuchte
                                  {"topic":"mqtt/0/esp1/humidity","payload":"46.25","acknowledged":true,"timestamp":1637516998692,"lastchange":1637516998692,"from":"system.adapter.mqtt.0","_msgid":"f94a5ec3.dd7da"}
                                  
                                  
                                  mickym 1 Reply Last reply Reply Quote 0
                                  • mickym
                                    mickym Most Active @jabba76 last edited by

                                    @jabba76 Super kannst Du mit das noch für die anderen 2 Parameter machen? - Also Feuchte und Druck?

                                    J mickym 2 Replies Last reply Reply Quote 0
                                    • J
                                      jabba76 @mickym last edited by

                                      @mickym sagte in BME280 mit ESP8266 von MQTT auf Webserver als Text:

                                      @jabba76 Super kannst Du mit das noch für die anderen 2 Parameter machen? - Also Feuchte und Druck?

                                      
                                      
                                      Temperatur
                                      
                                      {"topic":"mqtt/0/esp1/temperature","payload":"23.29","acknowledged":true,"timestamp":1637516687490,"lastchange":1637516687490,"from":"system.adapter.mqtt.0","_msgid":"f040134c.cbdcc"}
                                      
                                      Luftdruck
                                      
                                      {"topic":"mqtt/0/esp1/pressure","payload":"1005.47","acknowledged":true,"timestamp":1637516998692,"lastchange":1637516998692,"from":"system.adapter.mqtt.0","_msgid":"dbf9aa3b.50ede8"}
                                      
                                      Luftfeuchte
                                      
                                      {"topic":"mqtt/0/esp1/humidity","payload":"46.25","acknowledged":true,"timestamp":1637516998692,"lastchange":1637516998692,"from":"system.adapter.mqtt.0","_msgid":"f94a5ec3.dd7da"}
                                      
                                      
                                      1 Reply Last reply Reply Quote 0
                                      • mickym
                                        mickym Most Active @mickym last edited by mickym

                                        @mickym
                                        Also Du hast immer noch Strings drin - hast Du die Adapterkonfig geändert - na auch egal. Ich empfehle aber ggf. die Option auszumachen - aber wahrscheinlich sind die DP im mqtt bereits Zeichenketten - aber egal.

                                        Ich habs anhand des flows nun rekonstruiert:

                                        Diesen Teil ersetzt Du

                                        a95a2ec7-a8df-4302-9b99-242e771dc898-image.png

                                        durch durch folgede Change Node und setzt die iobroker In Nodes davor:

                                        [
                                            {
                                                "id": "e57670f8.9fc1c",
                                                "type": "change",
                                                "z": "1e875092.14ea4f",
                                                "name": "",
                                                "rules": [
                                                    {
                                                        "t": "change",
                                                        "p": "topic",
                                                        "pt": "msg",
                                                        "from": ".*\\/(.*)",
                                                        "fromt": "re",
                                                        "to": "$1",
                                                        "tot": "str"
                                                    }
                                                ],
                                                "action": "",
                                                "property": "",
                                                "from": "",
                                                "to": "",
                                                "reg": false,
                                                "x": 490,
                                                "y": 2100,
                                                "wires": [
                                                    [
                                                        "11884a7.8ea81b6"
                                                    ]
                                                ]
                                            }
                                        ]
                                        

                                        68f13bb4-454a-463b-a651-187a84b5915b-image.png

                                        Ach und schau dass Deine iobroker In Nodes auf

                                        b3059401-b31a-455f-9312-ca9241b99041-image.png

                                        Du bekommst erst was raus, wenn alle Parameter einmal geschickt wurden, dann immer bei jeder Änderung - egal von welchem Parameter.

                                        J 1 Reply Last reply Reply Quote 0
                                        • J
                                          jabba76 @mickym last edited by

                                          @mickym sagte in BME280 mit ESP8266 von MQTT auf Webserver als Text:

                                          @mickym
                                          Also Du hast immer noch Strings drin - hast Du die Adapterkonfig geändert - na auch egal. Ich empfehle aber ggf. die Option auszumachen - aber wahrscheinlich sind die DP im mqtt bereits Zeichenketten - aber egal.

                                          Ich habs anhand des flows nun rekonstruiert:

                                          Diesen Teil ersetzt Du

                                          a95a2ec7-a8df-4302-9b99-242e771dc898-image.png

                                          durch durch folgede Change Node und setzt die iobroker In Nodes davor:

                                          [
                                              {
                                                  "id": "e57670f8.9fc1c",
                                                  "type": "change",
                                                  "z": "1e875092.14ea4f",
                                                  "name": "",
                                                  "rules": [
                                                      {
                                                          "t": "change",
                                                          "p": "topic",
                                                          "pt": "msg",
                                                          "from": ".*\\/(.*)",
                                                          "fromt": "re",
                                                          "to": "$1",
                                                          "tot": "str"
                                                      }
                                                  ],
                                                  "action": "",
                                                  "property": "",
                                                  "from": "",
                                                  "to": "",
                                                  "reg": false,
                                                  "x": 490,
                                                  "y": 2100,
                                                  "wires": [
                                                      [
                                                          "11884a7.8ea81b6"
                                                      ]
                                                  ]
                                              }
                                          ]
                                          

                                          68f13bb4-454a-463b-a651-187a84b5915b-image.png

                                          Ach und schau dass Deine iobroker In Nodes auf

                                          b3059401-b31a-455f-9312-ca9241b99041-image.png

                                          Du bekommst erst was raus, wenn alle Parameter einmal geschickt wurden, dann immer bei jeder Änderung - egal von welchem Parameter.

                                          wenn ich importiern möchte zeigt er mit das: Error: Eingabe ist kein JSON-Array ? und zeichenkette ist jetzt aus.

                                          Das mit dem Parameter schon nicht schlecht also der Text wird sich dann ändern wenn sich der Wert ändert ok.

                                          mickym 1 Reply Last reply Reply Quote 0
                                          • mickym
                                            mickym Most Active @jabba76 last edited by mickym

                                            @jabba76 Nein die Eingabe rauskommen sind normale skalare Werte Du musst aber aufhören Objekte einzugeben:

                                            9a14c75d-a16e-4613-a6fa-361ea906a8ac-image.png

                                            also bitte auf value und sende msg bei start in deinen iobroker in NOdes umstellen.

                                            {"topic":"0_userdata/0/testType","payload":19.5,"acknowledged":false,"timestamp":1636835207813,"lastchange":1636835207813,"from":"system.adapter.node-red.0","_msgid":"2465ec6b.e48df4"}
                                            

                                            Wenn Du auf value einstellst, dann wird die payload genau 19.5. Also ein normaler nummerischer Wert kein JSON oder sonst was.

                                            J 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate
                                            FAQ Cloud / IOT
                                            HowTo: Node.js-Update
                                            HowTo: Backup/Restore
                                            Downloads
                                            BLOG

                                            835
                                            Online

                                            31.7k
                                            Users

                                            79.6k
                                            Topics

                                            1.3m
                                            Posts

                                            4
                                            56
                                            2968
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            Community
                                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                            The ioBroker Community 2014-2023
                                            logo