Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Node-Red
    5. Wert von Payload wird nicht im Template Node angezeigt

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Wert von Payload wird nicht im Template Node angezeigt

    This topic has been deleted. Only users with topic management privileges can see it.
    • _
      _R_A_L_F_ last edited by

      Hallo,

      ich habe folgendes Payload Object und möchte hierüber die einzelnen Werte in einer E-mail versenden:

      3ab8d141-fb79-4e38-a7be-2fd8130d6eb2-image.png

      Problem ist aber, dass mir der Prozesswert sprich, der msg.payload.value[0] in der E-mail nicht angezeigt wird und das Feld leer bleibt. Die anderen Inhalte wie Path, etc. kommen in der E-mail an.
      In der Debug Node steht der Wert von msg.payload.value[0] wiederum drin.

      An was liegt das?

      [
          {
              "id": "9c919514dba9777b",
              "type": "tab",
              "label": "Flow 2",
              "disabled": false,
              "info": "",
              "env": []
          },
          {
              "id": "1424636b01e30073",
              "type": "debug",
              "z": "9c919514dba9777b",
              "name": "debug 4",
              "active": true,
              "tosidebar": true,
              "console": false,
              "tostatus": false,
              "complete": "payload.value[0]",
              "targetType": "msg",
              "statusVal": "",
              "statusType": "auto",
              "x": 520,
              "y": 200,
              "wires": []
          },
          {
              "id": "6aec49cc4a75bf7d",
              "type": "rbe",
              "z": "9c919514dba9777b",
              "name": "",
              "func": "rbe",
              "gap": "",
              "start": "",
              "inout": "out",
              "septopics": true,
              "property": "payload",
              "topi": "topic",
              "x": 370,
              "y": 280,
              "wires": [
                  [
                      "1424636b01e30073",
                      "1b4db4ad16774fb9"
                  ]
              ]
          },
          {
              "id": "d12f313f8d6243c1",
              "type": "template",
              "z": "9c919514dba9777b",
              "name": "E-mail Inhalt",
              "field": "payload",
              "fieldType": "msg",
              "format": "handlebars",
              "syntax": "mustache",
              "template": "<b>Signalquelle:</b><br>\n{{payload.signal}}<br><br>\n\n<b>Signalpfad:</b><br>\n{{payload.path}}<br><br>\n\n<b>Prozesswert:</b><br>\n{{payload.value[0]}}<br><br>",
              "output": "str",
              "x": 770,
              "y": 280,
              "wires": [
                  []
              ]
          },
          {
              "id": "1b4db4ad16774fb9",
              "type": "template",
              "z": "9c919514dba9777b",
              "name": "E-mail Betreff",
              "field": "topic",
              "fieldType": "msg",
              "format": "handlebars",
              "syntax": "mustache",
              "template": "Betreff",
              "output": "str",
              "x": 560,
              "y": 280,
              "wires": [
                  [
                      "d12f313f8d6243c1"
                  ]
              ]
          }
      ]
      
      mickym 1 Reply Last reply Reply Quote 0
      • mickym
        mickym Most Active @_R_A_L_F_ last edited by

        @_r_a_l_f_ Poste halt mal was rauskommt und mach mal die Ausgabe des Debug Fensters in code tags - das man es in eine Inject Node packan kann.

        _ 1 Reply Last reply Reply Quote 0
        • _
          _R_A_L_F_ @mickym last edited by

          @mickym Das wäre der Payload Inhalt vom Inject:
          Damit lässt sich der Fehler gut nachstellen.

          {
              "signal": "MESS_55_Aussentemp",
              "path": "DB727,REAL7138",
              "error": 0,
              "value": [
                  13
              ]
          }
          
          mickym 1 Reply Last reply Reply Quote 0
          • mickym
            mickym Most Active @_R_A_L_F_ last edited by

            @_r_a_l_f_ sagte in Wert von Payload wird nicht im Template Node angezeigt:

                                                                                                                                        {                                                                                                                                                                                "signal": "MESS_55_Aussentemp",                                                                                                                                                                                "path": "DB727,REAL7138",                                                                                                                                                                                "error": 0,                                                                                                                                                                                "value": [                                                                                                                                                                                    13                                                                                                                                                                                ]                                                                                                                                                                            }                                            
            

            Probiers mal so:

            70496508-2655-4a03-af01-370c35aa91c0-image.png

            [
               {
                   "id": "59cae0abb47abbb8",
                   "type": "debug",
                   "z": "793284a36d4a4f3f",
                   "name": "debug 4",
                   "active": true,
                   "tosidebar": true,
                   "console": false,
                   "tostatus": false,
                   "complete": "payload",
                   "targetType": "msg",
                   "statusVal": "",
                   "statusType": "auto",
                   "x": 940,
                   "y": 280,
                   "wires": []
               },
               {
                   "id": "66da74e364ff5cdf",
                   "type": "template",
                   "z": "793284a36d4a4f3f",
                   "name": "E-mail Inhalt",
                   "field": "payload",
                   "fieldType": "msg",
                   "format": "handlebars",
                   "syntax": "mustache",
                   "template": "<b>Signalquelle:</b><br>\n{{payload.signal}}<br><br>\n\n<b>Signalpfad:</b><br>\n{{payload.path}}<br><br>\n\n<b>Prozesswert:</b><br>\n{{payload.value.0}}<br><br>",
                   "output": "str",
                   "x": 770,
                   "y": 280,
                   "wires": [
                       [
                           "59cae0abb47abbb8"
                       ]
                   ]
               },
               {
                   "id": "e218b23ca4a989ad",
                   "type": "template",
                   "z": "793284a36d4a4f3f",
                   "name": "E-mail Betreff",
                   "field": "topic",
                   "fieldType": "msg",
                   "format": "handlebars",
                   "syntax": "mustache",
                   "template": "Betreff",
                   "output": "str",
                   "x": 560,
                   "y": 280,
                   "wires": [
                       [
                           "66da74e364ff5cdf"
                       ]
                   ]
               },
               {
                   "id": "08120b0ed4d45768",
                   "type": "inject",
                   "z": "793284a36d4a4f3f",
                   "name": "",
                   "props": [
                       {
                           "p": "payload"
                       }
                   ],
                   "repeat": "",
                   "crontab": "",
                   "once": false,
                   "onceDelay": 0.1,
                   "topic": "",
                   "payload": "{\"signal\":\"MESS_55_Aussentemp\",\"path\":\"DB727,REAL7138\",\"error\":0,\"value\":[13]}",
                   "payloadType": "json",
                   "x": 330,
                   "y": 280,
                   "wires": [
                       [
                           "e218b23ca4a989ad"
                       ]
                   ]
               }
            ]
            

            _ 1 Reply Last reply Reply Quote 0
            • _
              _R_A_L_F_ @mickym last edited by

              @mickym Ok, vielen lieben Dank. Das muss erst mal einer wissen, dass es nicht payload.value[0] => So wie der Pfad im Debug von Node-Red heißt, sondern payload.value.0 😄

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

                @_r_a_l_f_ Manchmal muss man bissi rumprobieren. 😉 Das Problem ist, dass das Debug Fenster meist den Code so ausgibt, wie es eine function Node mit Javascript funktioniert. Mit Angular Syntax in einer Template Node oder in JSONATA ist die Syntax leicht anders. In JSONATA sind eckige Klammern eben Filter.

                _ 1 Reply Last reply Reply Quote 0
                • _
                  _R_A_L_F_ @mickym last edited by _R_A_L_F_

                  @mickym Hallo,
                  es ist langsam zum verzweifeln, wie der Syntax aufgebaut werden muss, dass dieser angezeigt wird 💊
                  Ich hab mich zwar gerade in die JSONATA Doku etwas eingelesen aber jeder Versuch, klappt nicht. (Sprich, vermutlich wirkt hier auch wieder der Filter durch die [] aber ich weiß nicht, wie ich diesen an der Stelle umgehe)
                  Kannst du mir bitte nochmal helfen, wie ich hier den Wert im Template Node angezeigt bekomme

                  [
                      {
                          "id": "d6d8bf5582849f8f",
                          "type": "tab",
                          "label": "Flow 2",
                          "disabled": false,
                          "info": "",
                          "env": []
                      },
                      {
                          "id": "d1b5a254af632319",
                          "type": "inject",
                          "z": "d6d8bf5582849f8f",
                          "name": "",
                          "props": [
                              {
                                  "p": "payload"
                              },
                              {
                                  "p": "topic",
                                  "vt": "str"
                              }
                          ],
                          "repeat": "",
                          "crontab": "",
                          "once": false,
                          "onceDelay": 0.1,
                          "topic": "E-mail_1_Trigger",
                          "payload": "{\"E-mail_1_Trigger\":true,\"E-mail_1_Begleitwert\":40}",
                          "payloadType": "json",
                          "x": 190,
                          "y": 120,
                          "wires": [
                              [
                                  "8325d8ef40db4abe",
                                  "c86735df2b7c23b7"
                              ]
                          ]
                      },
                      {
                          "id": "8325d8ef40db4abe",
                          "type": "debug",
                          "z": "d6d8bf5582849f8f",
                          "name": "debug 4",
                          "active": true,
                          "tosidebar": true,
                          "console": false,
                          "tostatus": false,
                          "complete": "false",
                          "statusVal": "",
                          "statusType": "auto",
                          "x": 360,
                          "y": 120,
                          "wires": []
                      },
                      {
                          "id": "c86735df2b7c23b7",
                          "type": "join",
                          "z": "d6d8bf5582849f8f",
                          "name": "E-mail_Join",
                          "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": 370,
                          "y": 180,
                          "wires": [
                              [
                                  "45fca0b4485e4e59"
                              ]
                          ]
                      },
                      {
                          "id": "45fca0b4485e4e59",
                          "type": "template",
                          "z": "d6d8bf5582849f8f",
                          "name": "E-mail Inhalt",
                          "field": "payload",
                          "fieldType": "msg",
                          "format": "handlebars",
                          "syntax": "mustache",
                          "template": "<b>Klartextbeschreibung:</b><br>\nBitte reagieren auf ...<br><br>\n\n<b>Trigger:</b><br>\n{{payload[\"E-mail_1_Trigger\"]}}<br><br>\n\n<b>Begleitwert:</b><br>\n{{payload[\"E-mail_1_Begleitwert\"]}}<br><br>",
                          "output": "str",
                          "x": 550,
                          "y": 180,
                          "wires": [
                              [
                                  "1b6c46e811564e65"
                              ]
                          ]
                      },
                      {
                          "id": "1b6c46e811564e65",
                          "type": "debug",
                          "z": "d6d8bf5582849f8f",
                          "name": "debug 5",
                          "active": true,
                          "tosidebar": true,
                          "console": false,
                          "tostatus": false,
                          "complete": "false",
                          "statusVal": "",
                          "statusType": "auto",
                          "x": 720,
                          "y": 180,
                          "wires": []
                      }
                  ]
                  
                  mickym 1 Reply Last reply Reply Quote 0
                  • mickym
                    mickym Most Active @_R_A_L_F_ last edited by mickym

                    @_r_a_l_f_ Das Ei hast Du Dir mit der JOIN Node gesetzt, warum auch immer.

                    f921c66c-6a97-4552-8560-b09d7d566e32-image.png

                    [
                       {
                           "id": "d1b5a254af632319",
                           "type": "inject",
                           "z": "d6d8bf5582849f8f",
                           "name": "",
                           "props": [
                               {
                                   "p": "payload"
                               },
                               {
                                   "p": "topic",
                                   "vt": "str"
                               }
                           ],
                           "repeat": "",
                           "crontab": "",
                           "once": false,
                           "onceDelay": 0.1,
                           "topic": "E-mail_1_Trigger",
                           "payload": "{\"E-mail_1_Trigger\":true,\"E-mail_1_Begleitwert\":40}",
                           "payloadType": "json",
                           "x": 190,
                           "y": 120,
                           "wires": [
                               [
                                   "8325d8ef40db4abe",
                                   "45fca0b4485e4e59"
                               ]
                           ]
                       },
                       {
                           "id": "8325d8ef40db4abe",
                           "type": "debug",
                           "z": "d6d8bf5582849f8f",
                           "name": "debug 4",
                           "active": true,
                           "tosidebar": true,
                           "console": false,
                           "tostatus": false,
                           "complete": "false",
                           "statusVal": "",
                           "statusType": "auto",
                           "x": 360,
                           "y": 120,
                           "wires": []
                       },
                       {
                           "id": "1b6c46e811564e65",
                           "type": "debug",
                           "z": "d6d8bf5582849f8f",
                           "name": "debug 5",
                           "active": true,
                           "tosidebar": true,
                           "console": false,
                           "tostatus": false,
                           "complete": "false",
                           "statusVal": "",
                           "statusType": "auto",
                           "x": 560,
                           "y": 180,
                           "wires": []
                       },
                       {
                           "id": "45fca0b4485e4e59",
                           "type": "template",
                           "z": "d6d8bf5582849f8f",
                           "name": "E-mail Inhalt",
                           "field": "payload",
                           "fieldType": "msg",
                           "format": "handlebars",
                           "syntax": "mustache",
                           "template": "<b>Klartextbeschreibung:</b><br>\nBitte reagieren auf ...<br><br>\n\n<b>Trigger:</b><br>\n{{payload.E-mail_1_Trigger}}<br><br>\n\n<b>Begleitwert:</b><br>\n{{payload.E-mail_1_Begleitwert}}<br><br>",
                           "output": "str",
                           "x": 370,
                           "y": 180,
                           "wires": [
                               [
                                   "1b6c46e811564e65"
                               ]
                           ]
                       }
                    ]
                    

                    Wie gesagt der Path mit der Klammernotation ist nur für die function-Nodes geeignet - da dieser dort nicht als Filter interpretiert wird.

                    Die JOIN Node - macht Dir doch das Objekt selbst wieder zum Objekt

                    fe43b407-e801-47f7-ada9-ac8e85f88201-image.png

                    d318ec2e-6d70-404e-8fe4-42ea77b7582d-image.png

                    Falls das wirklich beabsichtigt war - dann musst Du das auch doppelt referenzieren.

                    [
                       {
                           "id": "c350ddd2f2b8625e",
                           "type": "inject",
                           "z": "1fa27b32b50d06b2",
                           "name": "",
                           "props": [
                               {
                                   "p": "payload"
                               },
                               {
                                   "p": "topic",
                                   "vt": "str"
                               }
                           ],
                           "repeat": "",
                           "crontab": "",
                           "once": false,
                           "onceDelay": 0.1,
                           "topic": "E-mail_1_Trigger",
                           "payload": "{\"E-mail_1_Trigger\":true,\"E-mail_1_Begleitwert\":40}",
                           "payloadType": "json",
                           "x": 110,
                           "y": 120,
                           "wires": [
                               [
                                   "cba2be32206c7a34",
                                   "c21ed197faf75853"
                               ]
                           ]
                       },
                       {
                           "id": "cba2be32206c7a34",
                           "type": "debug",
                           "z": "1fa27b32b50d06b2",
                           "name": "debug 4",
                           "active": true,
                           "tosidebar": true,
                           "console": false,
                           "tostatus": false,
                           "complete": "false",
                           "statusVal": "",
                           "statusType": "auto",
                           "x": 280,
                           "y": 120,
                           "wires": []
                       },
                       {
                           "id": "c21ed197faf75853",
                           "type": "join",
                           "z": "1fa27b32b50d06b2",
                           "name": "E-mail_Join",
                           "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": 290,
                           "y": 180,
                           "wires": [
                               [
                                   "e6fb8cab19787b0f",
                                   "584cdac28ce29bd1"
                               ]
                           ]
                       },
                       {
                           "id": "e6fb8cab19787b0f",
                           "type": "template",
                           "z": "1fa27b32b50d06b2",
                           "name": "E-mail Inhalt",
                           "field": "payload",
                           "fieldType": "msg",
                           "format": "handlebars",
                           "syntax": "mustache",
                           "template": "<b>Klartextbeschreibung:</b><br>\nBitte reagieren auf ...<br><br>\n\n<b>Trigger:</b><br>\n{{payload.E-mail_1_Trigger.E-mail_1_Trigger}}<br><br>\n\n<b>Begleitwert:</b><br>\n{{payload.E-mail_1_Trigger.E-mail_1_Begleitwert}}<br><br>",
                           "output": "str",
                           "x": 470,
                           "y": 180,
                           "wires": [
                               [
                                   "d8a5fbcd6d3e7e98"
                               ]
                           ]
                       },
                       {
                           "id": "d8a5fbcd6d3e7e98",
                           "type": "debug",
                           "z": "1fa27b32b50d06b2",
                           "name": "debug 5",
                           "active": true,
                           "tosidebar": true,
                           "console": false,
                           "tostatus": false,
                           "complete": "false",
                           "statusVal": "",
                           "statusType": "auto",
                           "x": 640,
                           "y": 180,
                           "wires": []
                       },
                       {
                           "id": "584cdac28ce29bd1",
                           "type": "debug",
                           "z": "1fa27b32b50d06b2",
                           "name": "debug 45",
                           "active": true,
                           "tosidebar": true,
                           "console": false,
                           "tostatus": false,
                           "complete": "false",
                           "statusVal": "",
                           "statusType": "auto",
                           "x": 480,
                           "y": 120,
                           "wires": []
                       }
                    ]
                    

                    Meines Erachtens ist die JOIN Node kompletter Unsinn. 😉

                    _ 1 Reply Last reply Reply Quote 0
                    • _
                      _R_A_L_F_ @mickym last edited by

                      @mickym Super, vielen vielen Dank für die schnelle Hilfe.

                      Dann habe ich an der Stelle die doppelte Referenzierung übersehen. Die JOIN Node ist deshalbdrin, weil ich über die Inject Node nur den Payload für den Upload hier im Forum herausgefiltert habe und die eigentlichen beiden Werte von zwei Nodes kommen welche über die JOIN Node zusammen geführt werden. Daher das JOIN Node.
                      Aber gut, das ich hier komplett auf die [ und " verzichten kann wusste ich nicht. Wo findet man sowas 😄

                      1 Reply Last reply Reply Quote 0
                      • _
                        _R_A_L_F_ last edited by

                        @mickym
                        Ist es eigentlich auch möglich den Name der Objekteigenschaft im Template Node anzuzeigen?
                        78bab140-4b9d-427a-816b-457c86444971-image.png

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

                          Also am Einfachsten ist es natürlich Du packst das vorher in eine eigene Nachrichteneigenschaft oder Du hast es noch in einem topic.

                          Ansonsten um Tabellen zu erzeugen musst Du halt Arrays machen - hier mal der Beitrag von Steve: https://stevesnoderedguide.com/node-red-template-node

                          Am einfachsten ist es dann halt ein Array mir Eigenschaft und Wertepaaren vorher zu bilden. Vielleicht gehts auch anders, aber ich kenn mich mit Angular nicht so gut aus.

                          Das Problem ist wie IMMER - wie ist die Ausgangslage und wie soll es aussehne.

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

                            @mickym

                            @_r_a_l_f_ sagte in Wert von Payload wird nicht im Template Node angezeigt:

                            @mickym
                            Ist es eigentlich auch möglich den Name der Objekteigenschaft im Template Node anzuzeigen?
                            78bab140-4b9d-427a-816b-457c86444971-image.png

                            Du kannst Dir eine Tabelle zum Beispiel so ausgeben lassen:

                            08bbc926-2ca0-41ea-8a2b-6493ba39d29f-image.png

                            _ 1 Reply Last reply Reply Quote 0
                            • _
                              _R_A_L_F_ @mickym last edited by

                              @mickym Ok Dankeschön. Dann schaue ich mir das ganze in Ruhe an.

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

                                @_r_a_l_f_ Da ich hab mir das mal als Mail geschickt, Dein Objekt

                                dbedc872-b1d7-4c71-8e68-04d55dcaad6a-image.png

                                Hier mal Deinen Flow erweitert:

                                0b7ce14e-3e36-4b0f-87b7-535cc6486562-image.png

                                [
                                   {
                                       "id": "d1b5a254af632319",
                                       "type": "inject",
                                       "z": "7e6af0015415146d",
                                       "name": "",
                                       "props": [
                                           {
                                               "p": "payload"
                                           },
                                           {
                                               "p": "topic",
                                               "vt": "str"
                                           }
                                       ],
                                       "repeat": "",
                                       "crontab": "",
                                       "once": false,
                                       "onceDelay": 0.1,
                                       "topic": "E-mail_1_Trigger",
                                       "payload": "{\"E-mail_1_Trigger\":true,\"E-mail_1_Begleitwert\":40}",
                                       "payloadType": "json",
                                       "x": 1650,
                                       "y": 3620,
                                       "wires": [
                                           [
                                               "8325d8ef40db4abe",
                                               "45fca0b4485e4e59",
                                               "69a97bd2e6fa190b"
                                           ]
                                       ]
                                   },
                                   {
                                       "id": "8325d8ef40db4abe",
                                       "type": "debug",
                                       "z": "7e6af0015415146d",
                                       "name": "debug 4",
                                       "active": true,
                                       "tosidebar": true,
                                       "console": false,
                                       "tostatus": false,
                                       "complete": "false",
                                       "statusVal": "",
                                       "statusType": "auto",
                                       "x": 1820,
                                       "y": 3620,
                                       "wires": []
                                   },
                                   {
                                       "id": "1b6c46e811564e65",
                                       "type": "debug",
                                       "z": "7e6af0015415146d",
                                       "name": "debug 5",
                                       "active": true,
                                       "tosidebar": true,
                                       "console": false,
                                       "tostatus": false,
                                       "complete": "false",
                                       "statusVal": "",
                                       "statusType": "auto",
                                       "x": 2020,
                                       "y": 3680,
                                       "wires": []
                                   },
                                   {
                                       "id": "45fca0b4485e4e59",
                                       "type": "template",
                                       "z": "7e6af0015415146d",
                                       "name": "E-mail Inhalt",
                                       "field": "payload",
                                       "fieldType": "msg",
                                       "format": "handlebars",
                                       "syntax": "mustache",
                                       "template": "<b>Klartextbeschreibung:</b><br>\nBitte reagieren auf ...<br><br>\n\n<b>Trigger:</b><br>\n{{payload.E-mail_1_Trigger}}<br><br>\n\n<b>Begleitwert:</b><br>\n{{payload.E-mail_1_Begleitwert}}<br><br>",
                                       "output": "str",
                                       "x": 1830,
                                       "y": 3680,
                                       "wires": [
                                           [
                                               "1b6c46e811564e65"
                                           ]
                                       ]
                                   },
                                   {
                                       "id": "69a97bd2e6fa190b",
                                       "type": "change",
                                       "z": "7e6af0015415146d",
                                       "name": "",
                                       "rules": [
                                           {
                                               "t": "set",
                                               "p": "payload",
                                               "pt": "msg",
                                               "to": "$each(payload, function($v, $k) {{\"key\":$k,\"value\":$v}})",
                                               "tot": "jsonata"
                                           }
                                       ],
                                       "action": "",
                                       "property": "",
                                       "from": "",
                                       "to": "",
                                       "reg": false,
                                       "x": 1850,
                                       "y": 3760,
                                       "wires": [
                                           [
                                               "03751166fc8f4b1b",
                                               "24f3f1e43849b41d"
                                           ]
                                       ]
                                   },
                                   {
                                       "id": "03751166fc8f4b1b",
                                       "type": "debug",
                                       "z": "7e6af0015415146d",
                                       "name": "dekonstruiertes Objekt",
                                       "active": true,
                                       "tosidebar": true,
                                       "console": false,
                                       "tostatus": false,
                                       "complete": "payload",
                                       "targetType": "msg",
                                       "statusVal": "",
                                       "statusType": "auto",
                                       "x": 2140,
                                       "y": 3800,
                                       "wires": []
                                   },
                                   {
                                       "id": "24f3f1e43849b41d",
                                       "type": "template",
                                       "z": "7e6af0015415146d",
                                       "name": "E-mail Inhalt",
                                       "field": "payload",
                                       "fieldType": "msg",
                                       "format": "handlebars",
                                       "syntax": "mustache",
                                       "template": "<style>\ntable {\n  font-family: arial, sans-serif;\n  border-collapse: collapse;\n  width: 100%;\n}\n\ntd, th {\n  border: 1px solid #dddddd;\n  text-align: left;\n  padding: 8px;\n}\n\ntr:nth-child(even) {\n  background-color: #dddddd;\n}\n</style>\n\n<h2>Klartextbeschreibung:</h2>\n\n\n<p>Bitte reagieren auf ...<br><br></p>\n\n\n<table>\n    <tr>\n        <th>Trigger</th>\n        <th>Begleitwert</th>\n    </tr>\n{{#payload}}\n    <tr>\n            <td>{{key}}</td>\n            <td>{{value}}</td>\n    </tr>\n{{/payload}}\n</table>",
                                       "output": "str",
                                       "x": 2070,
                                       "y": 3760,
                                       "wires": [
                                           [
                                               "5b25e62b66038288"
                                           ]
                                       ]
                                   },
                                   {
                                       "id": "010fbab6bd17cce2",
                                       "type": "debug",
                                       "z": "7e6af0015415146d",
                                       "name": "Tabelle",
                                       "active": true,
                                       "tosidebar": true,
                                       "console": false,
                                       "tostatus": false,
                                       "complete": "payload",
                                       "targetType": "msg",
                                       "statusVal": "",
                                       "statusType": "auto",
                                       "x": 2460,
                                       "y": 3800,
                                       "wires": []
                                   },
                                   {
                                       "id": "5b25e62b66038288",
                                       "type": "change",
                                       "z": "7e6af0015415146d",
                                       "name": "",
                                       "rules": [
                                           {
                                               "t": "set",
                                               "p": "topic",
                                               "pt": "msg",
                                               "to": "Bitte reagieren auf ...",
                                               "tot": "str"
                                           }
                                       ],
                                       "action": "",
                                       "property": "",
                                       "from": "",
                                       "to": "",
                                       "reg": false,
                                       "x": 2260,
                                       "y": 3760,
                                       "wires": [
                                           [
                                               "010fbab6bd17cce2",
                                               "f7c5e72ff78432fd"
                                           ]
                                       ]
                                   }
                                ]
                                

                                Kernstück ist, dass ich aus DEINEM Objekt ein Array von Objekten mit definierten Eigenschaften gemacht habe, in dem ich jedes Objekt in die Eigenschaft und den Wert geteilt habe:

                                bbfdd41c-e4a9-42a2-92fd-54cea525c585-image.png

                                In der Template Node kannst Du dann im Array auf die Eigenschaften referenzieren (wie im Video von Steve):

                                4bb68012-a68c-4185-bd77-a2cbf6ed30f1-image.png

                                _ 1 Reply Last reply Reply Quote 0
                                • _
                                  _R_A_L_F_ @mickym last edited by

                                  @mickym Cool, vielen vielen Dank für die Mühe. Das sieht super aus.

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

                                  Support us

                                  ioBroker
                                  Community Adapters
                                  Donate

                                  521
                                  Online

                                  31.7k
                                  Users

                                  79.7k
                                  Topics

                                  1.3m
                                  Posts

                                  2
                                  15
                                  539
                                  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