Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Inhalte Filtern

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    Inhalte Filtern

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

      Hallo Leute

      Ist es möglich sachen aus einem Bsp. Text Datenpunkt vom iCal Adapter zu filtern ?

      Mittels Blockly oder Node Red

      Ich möchte mir auf meinem Glastaster von MDT denn Müllkalender anzeigen lassen, als Status Text.

      Dies klappt zwar auch schon, aber Node Red schickt denn ganzen Eintrag und da es auf 14 Bytes begrenzt ist möchte ich gerne
      Die Tonne Und das Datum trennen in jeweils ein Datenpunkt.

      Danke und hoffe ich habe mich verständlich ausgedrückt

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

        @capuccino Du kannst doch einfach einzelne Informationen aus der payload herausholen und dann eine neue payload generieren.

        Am Besten Du postet mal, was aus einem Datenpunkt rauskommt und wie Deine Ausgabe aussehen soll - dann wandeln wir das mit einer Change Node entsprechend um.

        Also mach am Besten eine Debug Node hinter Deine iobroker-IN Node und poste den Wert hier in die Zwischenablage.

        Hier mal ein kleines Video zur Anleitung:
        Wert aus Iobroker mit NodeRed auslesen und posten.mp4

        C 1 Reply Last reply Reply Quote 0
        • C
          capuccino @mickym last edited by

          @mickym

          {"date":"Heute  ","event":"Biotonne 28.11.2022","_class":"ical_abfallkalender ical_today","_date":"2022-11-28T00:00:00.000Z","_end":"2022-11-29T00:00:00.000Z","_section":"www.xxxxxxxxxx.de","_IDID":"62349601e7936","_allDay":true,"_private":false,"_rule":" ","location":"99999 Wxxxxxx Am Mxxxxxxx  ","_calName":"abfallkalender","_calColor":"#000000","_object":{"type":"VEVENT","params":[],"start":"2022-11-28T00:00:00.000Z","datetype":"date","end":"2022-11-29T00:00:00.000Z","dtstamp":"2022-11-28T11:00:11.000Z","uid":"62349601e7936","class":"PUBLIC","created":"2022-03-18T03:24:01.000Z","description":"www.xxxxxxxxxx.de","lastmodified":"2022-11-27T08:23:04.000Z","location":"99999 Wxxxxxxxxx Am Mxxxxxxxxx  ","sequence":"0","status":"CONFIRMED","summary":"Biotonne 28.11.2022","transparency":"TRANSPARENT","APPLE-TRAVEL-ADVISORY-BEHAVIOR":"AUTOMATIC","28AA4631-F9B3-4C31-8A8E-AD4C29F044BC":{"type":"VALARM","params":[],"action":"AUDIO","trigger":"-PT15H","WR-ALARMUID":"28AA4631-F9B3-4C31-8A8E-AD4C29F044BC","uid":"28AA4631-F9B3-4C31-8A8E-AD4C29F044BC","attach":{"params":{"VALUE":"URI"},"val":"Chord"},"APPLE-DEFAULT-ALARM":"TRUE","acknowledged":"20221127T082301Z","end":"2022-11-29T11:00:11.960Z"},"method":"PUBLISH"}}
          

          Hi Danke für das Video

          Ich Brächte halt nur "date" und "event" und das in zwei Text Datenpunkten
          hoffe das passt soweit

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

            @capuccino Nichts einfacher als das:

            055450b4-84b1-4dd0-a38d-fb02620e8745-image.png

            a50c531e-ec30-4335-8cbd-a04c4e55ada9-image.png
            cfac2d03-f5e8-4e46-ae98-8d3dfcb85828-image.png

            den String wie in dem Video mit einer JSON Node vorher in ein Objekt umwandeln, damit es so dasteht, wie Du es gepostet hast. Statt in 2 Debug Nodes machst Du eben 2 iobroker-OUT Nodes dran und setzt das Topic auf die 2 Datenpunkte, in die Du die Strings schreiben willst.

            [
               {
                   "id": "9d637c892e89b0d4",
                   "type": "inject",
                   "z": "289f539dcc33814e",
                   "name": "",
                   "props": [
                       {
                           "p": "payload"
                       }
                   ],
                   "repeat": "",
                   "crontab": "",
                   "once": false,
                   "onceDelay": 0.1,
                   "topic": "",
                   "payload": "{\"date\":\"Heute \",\"event\":\"Biotonne 28.11.2022\",\"_class\":\"ical_abfallkalender ical_today\",\"_date\":\"2022-11-28T00:00:00.000Z\",\"_end\":\"2022-11-29T00:00:00.000Z\",\"_section\":\"www.xxxxxxxxxx.de\",\"_IDID\":\"62349601e7936\",\"_allDay\":true,\"_private\":false,\"_rule\":\" \",\"location\":\"99999 Wxxxxxx Am Mxxxxxxx \",\"_calName\":\"abfallkalender\",\"_calColor\":\"#000000\",\"_object\":{\"type\":\"VEVENT\",\"params\":[],\"start\":\"2022-11-28T00:00:00.000Z\",\"datetype\":\"date\",\"end\":\"2022-11-29T00:00:00.000Z\",\"dtstamp\":\"2022-11-28T11:00:11.000Z\",\"uid\":\"62349601e7936\",\"class\":\"PUBLIC\",\"created\":\"2022-03-18T03:24:01.000Z\",\"description\":\"www.xxxxxxxxxx.de\",\"lastmodified\":\"2022-11-27T08:23:04.000Z\",\"location\":\"99999 Wxxxxxxxxx Am Mxxxxxxxxx \",\"sequence\":\"0\",\"status\":\"CONFIRMED\",\"summary\":\"Biotonne 28.11.2022\",\"transparency\":\"TRANSPARENT\",\"APPLE-TRAVEL-ADVISORY-BEHAVIOR\":\"AUTOMATIC\",\"28AA4631-F9B3-4C31-8A8E-AD4C29F044BC\":{\"type\":\"VALARM\",\"params\":[],\"action\":\"AUDIO\",\"trigger\":\"-PT15H\",\"WR-ALARMUID\":\"28AA4631-F9B3-4C31-8A8E-AD4C29F044BC\",\"uid\":\"28AA4631-F9B3-4C31-8A8E-AD4C29F044BC\",\"attach\":{\"params\":{\"VALUE\":\"URI\"},\"val\":\"Chord\"},\"APPLE-DEFAULT-ALARM\":\"TRUE\",\"acknowledged\":\"20221127T082301Z\",\"end\":\"2022-11-29T11:00:11.960Z\"},\"method\":\"PUBLISH\"}}",
                   "payloadType": "json",
                   "x": 630,
                   "y": 160,
                   "wires": [
                       [
                           "539d9e5550e92ed2",
                           "b32a34d4ce6cca79"
                       ]
                   ]
               },
               {
                   "id": "539d9e5550e92ed2",
                   "type": "change",
                   "z": "289f539dcc33814e",
                   "name": "",
                   "rules": [
                       {
                           "t": "set",
                           "p": "payload",
                           "pt": "msg",
                           "to": "payload.date",
                           "tot": "msg"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 850,
                   "y": 120,
                   "wires": [
                       [
                           "e91862d9c73b9242"
                       ]
                   ]
               },
               {
                   "id": "b32a34d4ce6cca79",
                   "type": "change",
                   "z": "289f539dcc33814e",
                   "name": "",
                   "rules": [
                       {
                           "t": "set",
                           "p": "payload",
                           "pt": "msg",
                           "to": "payload.event",
                           "tot": "msg"
                       }
                   ],
                   "action": "",
                   "property": "",
                   "from": "",
                   "to": "",
                   "reg": false,
                   "x": 850,
                   "y": 180,
                   "wires": [
                       [
                           "0edafaa0870df2c0"
                       ]
                   ]
               },
               {
                   "id": "e91862d9c73b9242",
                   "type": "debug",
                   "z": "289f539dcc33814e",
                   "name": "Datenpunkt 1",
                   "active": true,
                   "tosidebar": true,
                   "console": false,
                   "tostatus": false,
                   "complete": "payload",
                   "targetType": "msg",
                   "statusVal": "",
                   "statusType": "auto",
                   "x": 1090,
                   "y": 120,
                   "wires": []
               },
               {
                   "id": "0edafaa0870df2c0",
                   "type": "debug",
                   "z": "289f539dcc33814e",
                   "name": "Datenpunkt 2",
                   "active": true,
                   "tosidebar": true,
                   "console": false,
                   "tostatus": false,
                   "complete": "payload",
                   "targetType": "msg",
                   "statusVal": "",
                   "statusType": "auto",
                   "x": 1090,
                   "y": 180,
                   "wires": []
               }
            ]
            

            C 1 Reply Last reply Reply Quote 0
            • C
              capuccino @mickym last edited by

              @mickym

              Wenn ich es nach deinem Vorschlag machen dann kommt "undefined" vlt hätte ich erwähnen sollen das beim mir Zwei Object sind.
              einmal für Heutigen Termin und einmal für denn Nächsten.Bildschirmfoto 2022-11-28 um 12.22.56.png

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

                @capuccino Dann musst halt das 1. Element nehmen:

                3e903218-e8b1-48b9-9dd0-a1978f264abf-image.png

                Also setzt Du die payload auf:

                payload[0].date
                

                bzw.

                payload[0].event
                

                Wenn ich es nach deinem Vorschlag machen dann kommt "undefined" vlt hätte ich erwähnen sollen das beim mir Zwei Object sind.

                Ansonsten ist so eine Information natürlich enorm wichtig, aber Du siehst ich habe es mit der Inject Node simuliert.

                [
                   {
                       "id": "9d637c892e89b0d4",
                       "type": "inject",
                       "z": "289f539dcc33814e",
                       "name": "",
                       "props": [
                           {
                               "p": "payload"
                           }
                       ],
                       "repeat": "",
                       "crontab": "",
                       "once": false,
                       "onceDelay": 0.1,
                       "topic": "",
                       "payload": "[{\"date\":\"Heute \",\"event\":\"Biotonne 28.11.2022\",\"_class\":\"ical_abfallkalender ical_today\",\"_date\":\"2022-11-28T00:00:00.000Z\",\"_end\":\"2022-11-29T00:00:00.000Z\",\"_section\":\"www.xxxxxxxxxx.de\",\"_IDID\":\"62349601e7936\",\"_allDay\":true,\"_private\":false,\"_rule\":\" \",\"location\":\"99999 Wxxxxxx Am Mxxxxxxx \",\"_calName\":\"abfallkalender\",\"_calColor\":\"#000000\",\"_object\":{\"type\":\"VEVENT\",\"params\":[],\"start\":\"2022-11-28T00:00:00.000Z\",\"datetype\":\"date\",\"end\":\"2022-11-29T00:00:00.000Z\",\"dtstamp\":\"2022-11-28T11:00:11.000Z\",\"uid\":\"62349601e7936\",\"class\":\"PUBLIC\",\"created\":\"2022-03-18T03:24:01.000Z\",\"description\":\"www.xxxxxxxxxx.de\",\"lastmodified\":\"2022-11-27T08:23:04.000Z\",\"location\":\"99999 Wxxxxxxxxx Am Mxxxxxxxxx \",\"sequence\":\"0\",\"status\":\"CONFIRMED\",\"summary\":\"Biotonne 28.11.2022\",\"transparency\":\"TRANSPARENT\",\"APPLE-TRAVEL-ADVISORY-BEHAVIOR\":\"AUTOMATIC\",\"28AA4631-F9B3-4C31-8A8E-AD4C29F044BC\":{\"type\":\"VALARM\",\"params\":[],\"action\":\"AUDIO\",\"trigger\":\"-PT15H\",\"WR-ALARMUID\":\"28AA4631-F9B3-4C31-8A8E-AD4C29F044BC\",\"uid\":\"28AA4631-F9B3-4C31-8A8E-AD4C29F044BC\",\"attach\":{\"params\":{\"VALUE\":\"URI\"},\"val\":\"Chord\"},\"APPLE-DEFAULT-ALARM\":\"TRUE\",\"acknowledged\":\"20221127T082301Z\",\"end\":\"2022-11-29T11:00:11.960Z\"},\"method\":\"PUBLISH\"}},{\"date\":\"Morgen \",\"event\":\"Restmüll 29.11.2022\",\"_class\":\"ical_abfallkalender ical_today\",\"_date\":\"2022-11-28T00:00:00.000Z\",\"_end\":\"2022-11-29T00:00:00.000Z\",\"_section\":\"www.xxxxxxxxxx.de\",\"_IDID\":\"62349601e7936\",\"_allDay\":true,\"_private\":false,\"_rule\":\" \",\"location\":\"99999 Wxxxxxx Am Mxxxxxxx \",\"_calName\":\"abfallkalender\",\"_calColor\":\"#000000\",\"_object\":{\"type\":\"VEVENT\",\"params\":[],\"start\":\"2022-11-28T00:00:00.000Z\",\"datetype\":\"date\",\"end\":\"2022-11-29T00:00:00.000Z\",\"dtstamp\":\"2022-11-28T11:00:11.000Z\",\"uid\":\"62349601e7936\",\"class\":\"PUBLIC\",\"created\":\"2022-03-18T03:24:01.000Z\",\"description\":\"www.xxxxxxxxxx.de\",\"lastmodified\":\"2022-11-27T08:23:04.000Z\",\"location\":\"99999 Wxxxxxxxxx Am Mxxxxxxxxx \",\"sequence\":\"0\",\"status\":\"CONFIRMED\",\"summary\":\"Biotonne 28.11.2022\",\"transparency\":\"TRANSPARENT\",\"APPLE-TRAVEL-ADVISORY-BEHAVIOR\":\"AUTOMATIC\",\"28AA4631-F9B3-4C31-8A8E-AD4C29F044BC\":{\"type\":\"VALARM\",\"params\":[],\"action\":\"AUDIO\",\"trigger\":\"-PT15H\",\"WR-ALARMUID\":\"28AA4631-F9B3-4C31-8A8E-AD4C29F044BC\",\"uid\":\"28AA4631-F9B3-4C31-8A8E-AD4C29F044BC\",\"attach\":{\"params\":{\"VALUE\":\"URI\"},\"val\":\"Chord\"},\"APPLE-DEFAULT-ALARM\":\"TRUE\",\"acknowledged\":\"20221127T082301Z\",\"end\":\"2022-11-29T11:00:11.960Z\"},\"method\":\"PUBLISH\"}}]",
                       "payloadType": "json",
                       "x": 330,
                       "y": 200,
                       "wires": [
                           [
                               "539d9e5550e92ed2",
                               "b32a34d4ce6cca79",
                               "121ca602f8ef04d8"
                           ]
                       ]
                   },
                   {
                       "id": "539d9e5550e92ed2",
                       "type": "change",
                       "z": "289f539dcc33814e",
                       "name": "",
                       "rules": [
                           {
                               "t": "set",
                               "p": "payload",
                               "pt": "msg",
                               "to": "payload[0].date",
                               "tot": "msg"
                           }
                       ],
                       "action": "",
                       "property": "",
                       "from": "",
                       "to": "",
                       "reg": false,
                       "x": 590,
                       "y": 140,
                       "wires": [
                           [
                               "e91862d9c73b9242"
                           ]
                       ]
                   },
                   {
                       "id": "b32a34d4ce6cca79",
                       "type": "change",
                       "z": "289f539dcc33814e",
                       "name": "",
                       "rules": [
                           {
                               "t": "set",
                               "p": "payload",
                               "pt": "msg",
                               "to": "payload[0].event",
                               "tot": "msg"
                           }
                       ],
                       "action": "",
                       "property": "",
                       "from": "",
                       "to": "",
                       "reg": false,
                       "x": 590,
                       "y": 200,
                       "wires": [
                           [
                               "0edafaa0870df2c0"
                           ]
                       ]
                   },
                   {
                       "id": "e91862d9c73b9242",
                       "type": "debug",
                       "z": "289f539dcc33814e",
                       "name": "Heute Datenpunkt 1",
                       "active": true,
                       "tosidebar": true,
                       "console": false,
                       "tostatus": false,
                       "complete": "payload",
                       "targetType": "msg",
                       "statusVal": "",
                       "statusType": "auto",
                       "x": 860,
                       "y": 140,
                       "wires": []
                   },
                   {
                       "id": "0edafaa0870df2c0",
                       "type": "debug",
                       "z": "289f539dcc33814e",
                       "name": "Heute Datenpunkt 2",
                       "active": true,
                       "tosidebar": true,
                       "console": false,
                       "tostatus": false,
                       "complete": "payload",
                       "targetType": "msg",
                       "statusVal": "",
                       "statusType": "auto",
                       "x": 860,
                       "y": 200,
                       "wires": []
                   },
                   {
                       "id": "121ca602f8ef04d8",
                       "type": "debug",
                       "z": "289f539dcc33814e",
                       "name": "Eingabe-Array",
                       "active": true,
                       "tosidebar": true,
                       "console": false,
                       "tostatus": false,
                       "complete": "payload",
                       "targetType": "msg",
                       "statusVal": "",
                       "statusType": "auto",
                       "x": 580,
                       "y": 80,
                       "wires": []
                   }
                ]
                

                Enorm hilfreich, um die richtigen Daten zu extrahieren, ist die Funktion Pfad kopieren im Debug Fenster:

                copy path.gif

                C 1 Reply Last reply Reply Quote 0
                • C
                  capuccino @mickym last edited by

                  @mickym

                  Vielen Dank dir! bist der beste!

                  hat geklappt. Werde es mal auf Nacht probieren auf denn Bus zu schicken

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

                  Support us

                  ioBroker
                  Community Adapters
                  Donate

                  814
                  Online

                  31.9k
                  Users

                  80.1k
                  Topics

                  1.3m
                  Posts

                  2
                  7
                  287
                  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