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. mehrere Datenpunkte per E-Mail versenden

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    mehrere Datenpunkte per E-Mail versenden

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

      Hallo liebe Gemeinde,
      ich habe da mal eine Frage:
      Ist es möglich, und wenn wie, das ich die E-Mail, welche ich über den Adapter versende, zusammenbauen kann?
      Derzeit ist die Struktur ziemlich einfach.
      msg.topic als Betreff
      und
      msg.payload als Inhalt.
      Beide habe ich vorher selber als Text definiert.

      Beispiel:
      Betreff: Dosierung
      Ph Dosierung gestartet

      Was ich erreichen möchte ist, dass als msg.payload zusätzlich Status von iobroker Datenpunkten (Variablen) gesendet werden.
      Beispiel:
      Betreff: Dosierung
      Ph Dosierung gestartet
      aktuelle Wassertemperatur: 28°C
      aktueller Solarvorlauf: 45°C

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

        @schneidy76 Du musst halt die payload über eine template Node mit verschiedenen Eigenschaften einfach zusammenstellen.

        S 1 Reply Last reply Reply Quote 0
        • S
          schneidy76 @mickym last edited by

          @mickym ...und das mache ich wie? Das übersteigt im Moment noch meine Kenntnisse.

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

            @schneidy76

            dff8294d-e4ac-44e9-bfa6-881078339a7c-image.png

            Hier zum Import:

            [
               {
                   "id": "a872a7ba51fd3484",
                   "type": "inject",
                   "z": "7e6af0015415146d",
                   "name": "",
                   "props": [
                       {
                           "p": "trigger",
                           "v": "true",
                           "vt": "bool"
                       },
                       {
                           "p": "topic",
                           "vt": "str"
                       }
                   ],
                   "repeat": "",
                   "crontab": "",
                   "once": false,
                   "onceDelay": 0.1,
                   "topic": "Dosierung",
                   "x": 160,
                   "y": 4300,
                   "wires": [
                       [
                           "256da960d23f9755"
                       ]
                   ]
               },
               {
                   "id": "256da960d23f9755",
                   "type": "ioBroker get",
                   "z": "7e6af0015415146d",
                   "name": "Wassertemperatur",
                   "topic": "0_userdata.0.test0.test.temperature:100",
                   "attrname": "Wassertemperatur",
                   "payloadType": "value",
                   "errOnInvalidState": "nothing",
                   "x": 330,
                   "y": 4300,
                   "wires": [
                       [
                           "a4730fef776c6647"
                       ]
                   ]
               },
               {
                   "id": "a4730fef776c6647",
                   "type": "ioBroker get",
                   "z": "7e6af0015415146d",
                   "name": "Vorlauftemperatur",
                   "topic": "0_userdata.0.test0.test.temperature:101",
                   "attrname": "Vorlauftemperatur",
                   "payloadType": "value",
                   "errOnInvalidState": "nothing",
                   "x": 550,
                   "y": 4300,
                   "wires": [
                       [
                           "c5166dda9c56917b",
                           "e9a54430108c5960"
                       ]
                   ]
               },
               {
                   "id": "c5166dda9c56917b",
                   "type": "debug",
                   "z": "7e6af0015415146d",
                   "name": "Nachrichtenobjekt",
                   "active": true,
                   "tosidebar": true,
                   "console": false,
                   "tostatus": false,
                   "complete": "true",
                   "targetType": "full",
                   "statusVal": "",
                   "statusType": "auto",
                   "x": 790,
                   "y": 4240,
                   "wires": []
               },
               {
                   "id": "e9a54430108c5960",
                   "type": "template",
                   "z": "7e6af0015415146d",
                   "name": "",
                   "field": "payload",
                   "fieldType": "msg",
                   "format": "handlebars",
                   "syntax": "mustache",
                   "template": "Ph Dosierung gestartet\naktuelle Wassertemperatur: {{Wassertemperatur}} °C\naktueller Solarvorlauf: {{Vorlauftemperatur}} °C",
                   "output": "str",
                   "x": 760,
                   "y": 4300,
                   "wires": [
                       [
                           "8f50f33ffc43a379"
                       ]
                   ]
               },
               {
                   "id": "8f50f33ffc43a379",
                   "type": "debug",
                   "z": "7e6af0015415146d",
                   "name": "E-Mail",
                   "active": true,
                   "tosidebar": true,
                   "console": false,
                   "tostatus": false,
                   "complete": "payload",
                   "targetType": "msg",
                   "statusVal": "",
                   "statusType": "auto",
                   "x": 930,
                   "y": 4300,
                   "wires": []
               }
            ]
            

            S 1 Reply Last reply Reply Quote 0
            • S
              schneidy76 @mickym last edited by

              @mickym Dankeschön! Werde damit mal ein wenig rumprobieren. 👌

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

                @schneidy76 sagte in mehrere Datenpunkte per E-Mail versenden:

                @mickym Dankeschön! Werde damit mal ein wenig rumprobieren. 👌

                Das topic musst Du nochmal setzen, da es von den get-Nodes überschrieben wird:

                4696f67e-c368-437f-b44b-6e28cf9078c0-image.png

                [
                   {
                       "id": "a872a7ba51fd3484",
                       "type": "inject",
                       "z": "7e6af0015415146d",
                       "name": "",
                       "props": [
                           {
                               "p": "trigger",
                               "v": "true",
                               "vt": "bool"
                           },
                           {
                               "p": "topic",
                               "vt": "str"
                           }
                       ],
                       "repeat": "",
                       "crontab": "",
                       "once": false,
                       "onceDelay": 0.1,
                       "topic": "Dosierung",
                       "x": 160,
                       "y": 4320,
                       "wires": [
                           [
                               "256da960d23f9755"
                           ]
                       ]
                   },
                   {
                       "id": "256da960d23f9755",
                       "type": "ioBroker get",
                       "z": "7e6af0015415146d",
                       "name": "Wassertemperatur",
                       "topic": "0_userdata.0.test0.test.temperature:100",
                       "attrname": "Wassertemperatur",
                       "payloadType": "value",
                       "errOnInvalidState": "nothing",
                       "x": 330,
                       "y": 4320,
                       "wires": [
                           [
                               "a4730fef776c6647"
                           ]
                       ]
                   },
                   {
                       "id": "a4730fef776c6647",
                       "type": "ioBroker get",
                       "z": "7e6af0015415146d",
                       "name": "Vorlauftemperatur",
                       "topic": "0_userdata.0.test0.test.temperature:101",
                       "attrname": "Vorlauftemperatur",
                       "payloadType": "value",
                       "errOnInvalidState": "nothing",
                       "x": 550,
                       "y": 4320,
                       "wires": [
                           [
                               "c5166dda9c56917b",
                               "e9a54430108c5960"
                           ]
                       ]
                   },
                   {
                       "id": "c5166dda9c56917b",
                       "type": "debug",
                       "z": "7e6af0015415146d",
                       "name": "Nachrichtenobjekt",
                       "active": true,
                       "tosidebar": true,
                       "console": false,
                       "tostatus": false,
                       "complete": "true",
                       "targetType": "full",
                       "statusVal": "",
                       "statusType": "auto",
                       "x": 790,
                       "y": 4260,
                       "wires": []
                   },
                   {
                       "id": "e9a54430108c5960",
                       "type": "template",
                       "z": "7e6af0015415146d",
                       "name": "",
                       "field": "payload",
                       "fieldType": "msg",
                       "format": "handlebars",
                       "syntax": "mustache",
                       "template": "Ph Dosierung gestartet\naktuelle Wassertemperatur: {{Wassertemperatur}} °C\naktueller Solarvorlauf: {{Vorlauftemperatur}} °C",
                       "output": "str",
                       "x": 760,
                       "y": 4320,
                       "wires": [
                           [
                               "4f4c7dfda387334b"
                           ]
                       ]
                   },
                   {
                       "id": "8f50f33ffc43a379",
                       "type": "debug",
                       "z": "7e6af0015415146d",
                       "name": "E-Mail",
                       "active": true,
                       "tosidebar": true,
                       "console": false,
                       "tostatus": false,
                       "complete": "payload",
                       "targetType": "msg",
                       "statusVal": "",
                       "statusType": "auto",
                       "x": 1150,
                       "y": 4320,
                       "wires": []
                   },
                   {
                       "id": "4f4c7dfda387334b",
                       "type": "change",
                       "z": "7e6af0015415146d",
                       "name": "",
                       "rules": [
                           {
                               "t": "set",
                               "p": "topic",
                               "pt": "msg",
                               "to": "Dosierung",
                               "tot": "str"
                           }
                       ],
                       "action": "",
                       "property": "",
                       "from": "",
                       "to": "",
                       "reg": false,
                       "x": 960,
                       "y": 4320,
                       "wires": [
                           [
                               "8f50f33ffc43a379"
                           ]
                       ]
                   }
                ]
                

                S 1 Reply Last reply Reply Quote 0
                • S
                  schneidy76 @mickym last edited by

                  @mickym topic wurde doch noch gar nicht gesetzt in Deinem ersten Flow, oder habe ich etwas übersehen?

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

                    @schneidy76 Im ersten Flow - hatte ich das topic in der Inject Node gesetzt - aber egal Du musst es halt nach der Template Node bzw. nach den get-nodes nochmal setzen.

                    S 1 Reply Last reply Reply Quote 0
                    • S
                      schneidy76 @mickym last edited by

                      @mickym said in mehrere Datenpunkte per E-Mail versenden:

                      @schneidy76 Im ersten Flow - hatte ich das topic in der Inject Node gesetzt - aber egal Du musst es halt nach der Template Node bzw. nach den get-nodes nochmal setzen.

                      Da habe ich gar nicht geschaut. Richtig. Werde es vor dem E-Mail Node setzen, dann habe ich es überall gleich.
                      Danke für die Hilfe.

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

                      Support us

                      ioBroker
                      Community Adapters
                      Donate

                      884
                      Online

                      31.7k
                      Users

                      79.7k
                      Topics

                      1.3m
                      Posts

                      node-red
                      2
                      9
                      342
                      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