Skip to content
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Logo
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Node-Red
  5. [gelöst] http request mit 2-facher Ausgabe

NEWS

  • Wartung am 15.11. – Forum ab 22:00 Uhr nicht erreichbar
    BluefoxB
    Bluefox
    11
    2
    212

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    7.9k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    13
    1
    1.7k

[gelöst] http request mit 2-facher Ausgabe

[gelöst] http request mit 2-facher Ausgabe

Scheduled Pinned Locked Moved Node-Red
5 Posts 3 Posters 395 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MaGe
    wrote on last edited by MaGe
    #1

    Ich wünsche Euch ein gutes neues Jahr.

    Mein Flow ermittelt die Feiertage im Kalenderjahr über die openholidaysapi: https://www.openholidaysapi.org/en/.
    Wenn der aktuelle Tag mit einem Feiertag übereinstimmt, wird in eine Variable ein true und ansonsten ein false zurückgegeben.
    Ich verstehe nur nicht, dass der payload immer 2-fach ausgegeben wird.
    Ein delay nach dem http request ändert daran nichts.
    Und über die node-red-contrib-deduplicate wird nur die zweite Ausgabe unterbunden.
    Die zweite Ausgabe enthält aber erst das korrekte Ergebnis.

    Habt ihr eine Idee, woran das liegen könnte, bzw. wie ich das unterbinden kann?

    Screenshot_node-red.jpg

    [
       {
           "id": "d7ab92de65468601",
           "type": "group",
           "z": "2a5d5250.f178be",
           "style": {
               "stroke": "#999999",
               "stroke-opacity": "1",
               "fill": "none",
               "fill-opacity": "1",
               "label": true,
               "label-position": "nw",
               "color": "#a4a4a4"
           },
           "nodes": [
               "78da17c158e6bef1",
               "3ccc3f42a2375b34",
               "600b30b2fa735916",
               "e91f95671148e3f8",
               "ea826efb6416a0e2",
               "7654c97d19b712d2",
               "c67025781db415b3",
               "3174341e61111e98",
               "a32311fe3f57f596",
               "7a2a6e9862f4b65b",
               "f6e38c9bba13e173",
               "70661c26e7a597bd",
               "6a58ba98af5e39c8",
               "065f77b5ca36d548",
               "f7616b34b78f0752",
               "c277e4c9946def8d",
               "046cbd62d6d59850",
               "32e9962567fafd2e",
               "23232d4ed4efc0cb",
               "b73fa371cde46fa6",
               "c045023939e591be",
               "04c119132bb79324",
               "ca46e7a0adebd311",
               "f61b17dbcca75559",
               "3da2e65605823f27",
               "4ea3728856684ee3"
           ],
           "x": 1454,
           "y": 779,
           "w": 1172,
           "h": 562
       },
       {
           "id": "78da17c158e6bef1",
           "type": "http request",
           "z": "2a5d5250.f178be",
           "g": "d7ab92de65468601",
           "name": "",
           "method": "GET",
           "ret": "obj",
           "paytoqs": "body",
           "url": "",
           "tls": "",
           "persist": false,
           "proxy": "",
           "insecureHTTPParser": false,
           "authType": "",
           "senderr": false,
           "headers": [],
           "x": 1970,
           "y": 860,
           "wires": [
               [
                   "f61b17dbcca75559"
               ]
           ]
       },
       {
           "id": "3ccc3f42a2375b34",
           "type": "inject",
           "z": "2a5d5250.f178be",
           "g": "d7ab92de65468601",
           "name": "Abfrage",
           "props": [
               {
                   "p": "payload"
               }
           ],
           "repeat": "",
           "crontab": "05 00 * * *",
           "once": true,
           "onceDelay": "0.5",
           "topic": "",
           "payload": "",
           "payloadType": "date",
           "x": 1560,
           "y": 820,
           "wires": [
               [
                   "ea826efb6416a0e2",
                   "e91f95671148e3f8"
               ]
           ]
       },
       {
           "id": "600b30b2fa735916",
           "type": "change",
           "z": "2a5d5250.f178be",
           "g": "d7ab92de65468601",
           "name": "Neujahr",
           "rules": [
               {
                   "t": "set",
                   "p": "topic",
                   "pt": "msg",
                   "to": "Neujahr",
                   "tot": "str"
               },
               {
                   "t": "set",
                   "p": "date",
                   "pt": "msg",
                   "to": "$moment(payload[0].startDate,'YYYY-MM-DD').format('DD.MM.YYYY') ",
                   "tot": "jsonata"
               },
               {
                   "t": "set",
                   "p": "date_today",
                   "pt": "msg",
                   "to": "$moment().format('DD.MM.YYYY')",
                   "tot": "jsonata"
               },
               {
                   "t": "set",
                   "p": "payload",
                   "pt": "msg",
                   "to": "(\t    $a := $moment(date_today,['DD.MM.YYYY','x'],'de');     \t    $b := $moment(date,['DD.MM.YYYY','x'],'de');     \t    $a.isSame($b); \t    )",
                   "tot": "jsonata"
               }
           ],
           "action": "",
           "property": "",
           "from": "",
           "to": "",
           "reg": false,
           "x": 2180,
           "y": 820,
           "wires": [
               [
                   "c045023939e591be"
               ]
           ]
       },
       {
           "id": "e91f95671148e3f8",
           "type": "change",
           "z": "2a5d5250.f178be",
           "g": "d7ab92de65468601",
           "name": "Jahr",
           "rules": [
               {
                   "t": "set",
                   "p": "topic",
                   "pt": "msg",
                   "to": "Jahr",
                   "tot": "str"
               },
               {
                   "t": "set",
                   "p": "payload",
                   "pt": "msg",
                   "to": "$moment().year() ",
                   "tot": "jsonata"
               },
               {
                   "t": "set",
                   "p": "payload",
                   "pt": "msg",
                   "to": "$string(payload)",
                   "tot": "jsonata"
               }
           ],
           "action": "",
           "property": "",
           "from": "",
           "to": "",
           "reg": false,
           "x": 1770,
           "y": 860,
           "wires": [
               [
                   "ea826efb6416a0e2"
               ]
           ]
       },
       {
           "id": "ea826efb6416a0e2",
           "type": "function",
           "z": "2a5d5250.f178be",
           "g": "d7ab92de65468601",
           "name": "Url",
           "func": "msg.payload = `https://openholidaysapi.org/PublicHolidays?countryIsoCode=DE&validFrom=${msg.payload}-01-01&validTo=${msg.payload}-12-31&languageIsoCode=DE&subdivisionCode=DE-BY`;\nreturn msg;",
           "outputs": 1,
           "timeout": "",
           "noerr": 0,
           "initialize": "",
           "finalize": "",
           "libs": [],
           "x": 1770,
           "y": 820,
           "wires": [
               [
                   "7654c97d19b712d2"
               ]
           ]
       },
       {
           "id": "7654c97d19b712d2",
           "type": "change",
           "z": "2a5d5250.f178be",
           "g": "d7ab92de65468601",
           "name": "",
           "rules": [
               {
                   "t": "set",
                   "p": "url",
                   "pt": "msg",
                   "to": "payload",
                   "tot": "msg"
               },
               {
                   "t": "set",
                   "p": "url",
                   "pt": "msg",
                   "to": "$.url",
                   "tot": "jsonata"
               }
           ],
           "action": "",
           "property": "",
           "from": "",
           "to": "",
           "reg": false,
           "x": 1950,
           "y": 820,
           "wires": [
               [
                   "78da17c158e6bef1"
               ]
           ]
       },
       {
           "id": "c67025781db415b3",
           "type": "change",
           "z": "2a5d5250.f178be",
           "g": "d7ab92de65468601",
           "name": "Heilige Drei Könige",
           "rules": [
               {
                   "t": "set",
                   "p": "topic",
                   "pt": "msg",
                   "to": "Heilige Drei Könige",
                   "tot": "str"
               },
               {
                   "t": "set",
                   "p": "date",
                   "pt": "msg",
                   "to": "$moment(payload[1].startDate, 'YYYY-MM-DD').format('DD.MM.YYYY') ",
                   "tot": "jsonata"
               },
               {
                   "t": "set",
                   "p": "date_today",
                   "pt": "msg",
                   "to": "$moment().format('DD.MM.YYYY')",
                   "tot": "jsonata"
               },
               {
                   "t": "set",
                   "p": "payload",
                   "pt": "msg",
                   "to": "(     $a := $moment(date_today,['DD.MM.YYYY','x'],'de');          $b := $moment(date,['DD.MM.YYYY','x'],'de');          $a.isSame($b);      )",
                   "tot": "jsonata"
               }
           ],
           "action": "",
           "property": "",
           "from": "",
           "to": "",
           "reg": false,
           "x": 2210,
           "y": 860,
           "wires": [
               [
                   "c045023939e591be"
               ]
           ]
       },
       {
           "id": "3174341e61111e98",
           "type": "change",
           "z": "2a5d5250.f178be",
           "g": "d7ab92de65468601",
           "name": "Karfreitag",
           "rules": [
               {
                   "t": "set",
                   "p": "topic",
                   "pt": "msg",
                   "to": "Karfreitag",
                   "tot": "str"
               },
               {
                   "t": "set",
                   "p": "date",
                   "pt": "msg",
                   "to": "$moment(payload[2].startDate, 'YYYY-MM-DD').format('DD.MM.YYYY') ",
                   "tot": "jsonata"
               },
               {
                   "t": "set",
                   "p": "date_today",
                   "pt": "msg",
                   "to": "$moment().format('DD.MM.YYYY')",
                   "tot": "jsonata"
               },
               {
                   "t": "set",
                   "p": "payload",
                   "pt": "msg",
                   "to": "(     $a := $moment(date_today,['DD.MM.YYYY','x'],'de');          $b := $moment(date,['DD.MM.YYYY','x'],'de');          $a.isSame($b);      )",
                   "tot": "jsonata"
               }
           ],
           "action": "",
           "property": "",
           "from": "",
           "to": "",
           "reg": false,
           "x": 2180,
           "y": 900,
           "wires": [
               [
                   "c045023939e591be"
               ]
           ]
       },
       {
           "id": "a32311fe3f57f596",
           "type": "change",
           "z": "2a5d5250.f178be",
           "g": "d7ab92de65468601",
           "name": "Ostermontag",
           "rules": [
               {
                   "t": "set",
                   "p": "topic",
                   "pt": "msg",
                   "to": "Ostermontag",
                   "tot": "str"
               },
               {
                   "t": "set",
                   "p": "date",
                   "pt": "msg",
                   "to": "$moment(payload[3].startDate, 'YYYY-MM-DD').format('DD.MM.YYYY') ",
                   "tot": "jsonata"
               },
               {
                   "t": "set",
                   "p": "date_today",
                   "pt": "msg",
                   "to": "$moment().format('DD.MM.YYYY')",
                   "tot": "jsonata"
               },
               {
                   "t": "set",
                   "p": "payload",
                   "pt": "msg",
                   "to": "(     $a := $moment(date_today,['DD.MM.YYYY','x'],'de');          $b := $moment(date,['DD.MM.YYYY','x'],'de');          $a.isSame($b);      )",
                   "tot": "jsonata"
               }
           ],
           "action": "",
           "property": "",
           "from": "",
           "to": "",
           "reg": false,
           "x": 2200,
           "y": 940,
           "wires": [
               [
                   "c045023939e591be"
               ]
           ]
       },
       {
           "id": "7a2a6e9862f4b65b",
           "type": "change",
           "z": "2a5d5250.f178be",
           "g": "d7ab92de65468601",
           "name": "Tag der Arbeit",
           "rules": [
               {
                   "t": "set",
                   "p": "topic",
                   "pt": "msg",
                   "to": "Tag der Arbeit",
                   "tot": "str"
               },
               {
                   "t": "set",
                   "p": "date",
                   "pt": "msg",
                   "to": "$moment(payload[4].startDate, 'YYYY-MM-DD').format('DD.MM.YYYY') ",
                   "tot": "jsonata"
               },
               {
                   "t": "set",
                   "p": "date_today",
                   "pt": "msg",
                   "to": "$moment().format('DD.MM.YYYY')",
                   "tot": "jsonata"
               },
               {
                   "t": "set",
                   "p": "payload",
                   "pt": "msg",
                   "to": "(     $a := $moment(date_today,['DD.MM.YYYY','x'],'de');          $b := $moment(date,['DD.MM.YYYY','x'],'de');          $a.isSame($b);      )",
                   "tot": "jsonata"
               }
           ],
           "action": "",
           "property": "",
           "from": "",
           "to": "",
           "reg": false,
           "x": 2200,
           "y": 980,
           "wires": [
               [
                   "c045023939e591be"
               ]
           ]
       },
       {
           "id": "f6e38c9bba13e173",
           "type": "change",
           "z": "2a5d5250.f178be",
           "g": "d7ab92de65468601",
           "name": "Christi Himmelfahrt",
           "rules": [
               {
                   "t": "set",
                   "p": "topic",
                   "pt": "msg",
                   "to": "Christi Himmelfahrt",
                   "tot": "str"
               },
               {
                   "t": "set",
                   "p": "date",
                   "pt": "msg",
                   "to": "$moment(payload[5].startDate, 'YYYY-MM-DD').format('DD.MM.YYYY') ",
                   "tot": "jsonata"
               },
               {
                   "t": "set",
                   "p": "date_today",
                   "pt": "msg",
                   "to": "$moment().format('DD.MM.YYYY')",
                   "tot": "jsonata"
               },
               {
                   "t": "set",
                   "p": "payload",
                   "pt": "msg",
                   "to": "(     $a := $moment(date_today,['DD.MM.YYYY','x'],'de');          $b := $moment(date,['DD.MM.YYYY','x'],'de');          $a.isSame($b);      )",
                   "tot": "jsonata"
               }
           ],
           "action": "",
           "property": "",
           "from": "",
           "to": "",
           "reg": false,
           "x": 2210,
           "y": 1020,
           "wires": [
               [
                   "c045023939e591be"
               ]
           ]
       },
       {
           "id": "70661c26e7a597bd",
           "type": "change",
           "z": "2a5d5250.f178be",
           "g": "d7ab92de65468601",
           "name": "Pfingstmontag",
           "rules": [
               {
                   "t": "set",
                   "p": "topic",
                   "pt": "msg",
                   "to": "Pfingstmontag",
                   "tot": "str"
               },
               {
                   "t": "set",
                   "p": "date",
                   "pt": "msg",
                   "to": "$moment(payload[6].startDate, 'YYYY-MM-DD').format('DD.MM.YYYY') ",
                   "tot": "jsonata"
               },
               {
                   "t": "set",
                   "p": "date_today",
                   "pt": "msg",
                   "to": "$moment().format('DD.MM.YYYY')",
                   "tot": "jsonata"
               },
               {
                   "t": "set",
                   "p": "payload",
                   "pt": "msg",
                   "to": "(     $a := $moment(date_today,['DD.MM.YYYY','x'],'de');          $b := $moment(date,['DD.MM.YYYY','x'],'de');          $a.isSame($b);      )",
                   "tot": "jsonata"
               }
           ],
           "action": "",
           "property": "",
           "from": "",
           "to": "",
           "reg": false,
           "x": 2200,
           "y": 1060,
           "wires": [
               [
                   "c045023939e591be"
               ]
           ]
       },
       {
           "id": "6a58ba98af5e39c8",
           "type": "change",
           "z": "2a5d5250.f178be",
           "g": "d7ab92de65468601",
           "name": "Fronleichnam",
           "rules": [
               {
                   "t": "set",
                   "p": "topic",
                   "pt": "msg",
                   "to": "Fronleichnam",
                   "tot": "str"
               },
               {
                   "t": "set",
                   "p": "date",
                   "pt": "msg",
                   "to": "$moment(payload[7].startDate, 'YYYY-MM-DD').format('DD.MM.YYYY') ",
                   "tot": "jsonata"
               },
               {
                   "t": "set",
                   "p": "date_today",
                   "pt": "msg",
                   "to": "$moment().format('DD.MM.YYYY')",
                   "tot": "jsonata"
               },
               {
                   "t": "set",
                   "p": "payload",
                   "pt": "msg",
                   "to": "(     $a := $moment(date_today,['DD.MM.YYYY','x'],'de');          $b := $moment(date,['DD.MM.YYYY','x'],'de');          $a.isSame($b);      )",
                   "tot": "jsonata"
               }
           ],
           "action": "",
           "property": "",
           "from": "",
           "to": "",
           "reg": false,
           "x": 2200,
           "y": 1100,
           "wires": [
               [
                   "c045023939e591be"
               ]
           ]
       },
       {
           "id": "065f77b5ca36d548",
           "type": "change",
           "z": "2a5d5250.f178be",
           "g": "d7ab92de65468601",
           "name": "Mariä Himmelfahrt",
           "rules": [
               {
                   "t": "set",
                   "p": "topic",
                   "pt": "msg",
                   "to": "Mariä Himmelfahrt",
                   "tot": "str"
               },
               {
                   "t": "set",
                   "p": "date",
                   "pt": "msg",
                   "to": "$moment(payload[9].startDate, 'YYYY-MM-DD').format('DD.MM.YYYY') ",
                   "tot": "jsonata"
               },
               {
                   "t": "set",
                   "p": "date_today",
                   "pt": "msg",
                   "to": "$moment().format('DD.MM.YYYY')",
                   "tot": "jsonata"
               },
               {
                   "t": "set",
                   "p": "payload",
                   "pt": "msg",
                   "to": "(     $a := $moment(date_today,['DD.MM.YYYY','x'],'de');          $b := $moment(date,['DD.MM.YYYY','x'],'de');          $a.isSame($b);      )",
                   "tot": "jsonata"
               }
           ],
           "action": "",
           "property": "",
           "from": "",
           "to": "",
           "reg": false,
           "x": 2210,
           "y": 1140,
           "wires": [
               [
                   "c045023939e591be"
               ]
           ]
       },
       {
           "id": "f7616b34b78f0752",
           "type": "change",
           "z": "2a5d5250.f178be",
           "g": "d7ab92de65468601",
           "name": "Tag der Deutschen Einheit",
           "rules": [
               {
                   "t": "set",
                   "p": "topic",
                   "pt": "msg",
                   "to": "Tag der Deutschen Einheit",
                   "tot": "str"
               },
               {
                   "t": "set",
                   "p": "date",
                   "pt": "msg",
                   "to": "$moment(payload[10].startDate, 'YYYY-MM-DD').format('DD.MM.YYYY') ",
                   "tot": "jsonata"
               },
               {
                   "t": "set",
                   "p": "date_today",
                   "pt": "msg",
                   "to": "$moment().format('DD.MM.YYYY')",
                   "tot": "jsonata"
               },
               {
                   "t": "set",
                   "p": "payload",
                   "pt": "msg",
                   "to": "(     $a := $moment(date_today,['DD.MM.YYYY','x'],'de');          $b := $moment(date,['DD.MM.YYYY','x'],'de');          $a.isSame($b);      )",
                   "tot": "jsonata"
               }
           ],
           "action": "",
           "property": "",
           "from": "",
           "to": "",
           "reg": false,
           "x": 2240,
           "y": 1180,
           "wires": [
               [
                   "c045023939e591be"
               ]
           ]
       },
       {
           "id": "c277e4c9946def8d",
           "type": "change",
           "z": "2a5d5250.f178be",
           "g": "d7ab92de65468601",
           "name": "Allerheiligen",
           "rules": [
               {
                   "t": "set",
                   "p": "topic",
                   "pt": "msg",
                   "to": "Allerheiligen",
                   "tot": "str"
               },
               {
                   "t": "set",
                   "p": "date",
                   "pt": "msg",
                   "to": "$moment(payload[11].startDate, 'YYYY-MM-DD').format('DD.MM.YYYY') ",
                   "tot": "jsonata"
               },
               {
                   "t": "set",
                   "p": "date_today",
                   "pt": "msg",
                   "to": "$moment().format('DD.MM.YYYY')",
                   "tot": "jsonata"
               },
               {
                   "t": "set",
                   "p": "payload",
                   "pt": "msg",
                   "to": "(     $a := $moment(date_today,['DD.MM.YYYY','x'],'de');          $b := $moment(date,['DD.MM.YYYY','x'],'de');          $a.isSame($b);      )",
                   "tot": "jsonata"
               }
           ],
           "action": "",
           "property": "",
           "from": "",
           "to": "",
           "reg": false,
           "x": 2190,
           "y": 1220,
           "wires": [
               [
                   "c045023939e591be"
               ]
           ]
       },
       {
           "id": "046cbd62d6d59850",
           "type": "change",
           "z": "2a5d5250.f178be",
           "g": "d7ab92de65468601",
           "name": "1. Weihnachtsfeiertag",
           "rules": [
               {
                   "t": "set",
                   "p": "topic",
                   "pt": "msg",
                   "to": "1. Weihnachtsfeiertag",
                   "tot": "str"
               },
               {
                   "t": "set",
                   "p": "date",
                   "pt": "msg",
                   "to": "$moment(payload[12].startDate, 'YYYY-MM-DD').format('DD.MM.YYYY') ",
                   "tot": "jsonata"
               },
               {
                   "t": "set",
                   "p": "date_today",
                   "pt": "msg",
                   "to": "$moment().format('DD.MM.YYYY')",
                   "tot": "jsonata"
               },
               {
                   "t": "set",
                   "p": "payload",
                   "pt": "msg",
                   "to": "(     $a := $moment(date_today,['DD.MM.YYYY','x'],'de');          $b := $moment(date,['DD.MM.YYYY','x'],'de');          $a.isSame($b);      )",
                   "tot": "jsonata"
               }
           ],
           "action": "",
           "property": "",
           "from": "",
           "to": "",
           "reg": false,
           "x": 2220,
           "y": 1260,
           "wires": [
               [
                   "c045023939e591be"
               ]
           ]
       },
       {
           "id": "32e9962567fafd2e",
           "type": "change",
           "z": "2a5d5250.f178be",
           "g": "d7ab92de65468601",
           "name": "2. Weihnachtsfeiertag",
           "rules": [
               {
                   "t": "set",
                   "p": "topic",
                   "pt": "msg",
                   "to": "2. Weihnachtsfeiertag",
                   "tot": "str"
               },
               {
                   "t": "set",
                   "p": "date",
                   "pt": "msg",
                   "to": "$moment(payload[13].startDate, 'YYYY-MM-DD').format('DD.MM.YYYY') ",
                   "tot": "jsonata"
               },
               {
                   "t": "set",
                   "p": "date_today",
                   "pt": "msg",
                   "to": "$moment().format('DD.MM.YYYY')",
                   "tot": "jsonata"
               },
               {
                   "t": "set",
                   "p": "payload",
                   "pt": "msg",
                   "to": "(     $a := $moment(date_today,['DD.MM.YYYY','x'],'de');          $b := $moment(date,['DD.MM.YYYY','x'],'de');          $a.isSame($b);      )",
                   "tot": "jsonata"
               }
           ],
           "action": "",
           "property": "",
           "from": "",
           "to": "",
           "reg": false,
           "x": 2220,
           "y": 1300,
           "wires": [
               [
                   "c045023939e591be"
               ]
           ]
       },
       {
           "id": "23232d4ed4efc0cb",
           "type": "inject",
           "z": "2a5d5250.f178be",
           "g": "d7ab92de65468601",
           "name": "Global:Feiertag",
           "props": [
               {
                   "p": "payload"
               }
           ],
           "repeat": "",
           "crontab": "06 00 * * *",
           "once": true,
           "onceDelay": "0.5",
           "topic": "",
           "payload": "Feiertag",
           "payloadType": "global",
           "x": 1590,
           "y": 920,
           "wires": [
               [
                   "b73fa371cde46fa6"
               ]
           ]
       },
       {
           "id": "b73fa371cde46fa6",
           "type": "debug",
           "z": "2a5d5250.f178be",
           "g": "d7ab92de65468601",
           "name": "Info",
           "active": true,
           "tosidebar": false,
           "console": false,
           "tostatus": true,
           "complete": "true",
           "targetType": "full",
           "statusVal": "payload",
           "statusType": "auto",
           "x": 1770,
           "y": 920,
           "wires": []
       },
       {
           "id": "c045023939e591be",
           "type": "change",
           "z": "2a5d5250.f178be",
           "g": "d7ab92de65468601",
           "name": "",
           "rules": [
               {
                   "t": "set",
                   "p": "topic",
                   "pt": "msg",
                   "to": "Feiertag",
                   "tot": "str"
               }
           ],
           "action": "",
           "property": "",
           "from": "",
           "to": "",
           "reg": false,
           "x": 2490,
           "y": 820,
           "wires": [
               [
                   "04c119132bb79324"
               ]
           ]
       },
       {
           "id": "04c119132bb79324",
           "type": "join",
           "z": "2a5d5250.f178be",
           "g": "d7ab92de65468601",
           "name": "",
           "mode": "custom",
           "build": "array",
           "property": "payload",
           "propertyType": "msg",
           "key": "topic",
           "joiner": "\\n",
           "joinerType": "str",
           "accumulate": false,
           "timeout": "",
           "count": "13",
           "reduceRight": false,
           "reduceExp": "",
           "reduceInit": "",
           "reduceInitType": "",
           "reduceFixup": "",
           "x": 2530,
           "y": 860,
           "wires": [
               [
                   "ca46e7a0adebd311"
               ]
           ]
       },
       {
           "id": "ca46e7a0adebd311",
           "type": "function",
           "z": "2a5d5250.f178be",
           "g": "d7ab92de65468601",
           "name": "date = today",
           "func": "const Feiertag = msg.payload;\nmsg.payload = Feiertag.includes(true);\nreturn msg;",
           "outputs": 1,
           "timeout": "",
           "noerr": 0,
           "initialize": "",
           "finalize": "",
           "libs": [],
           "x": 2510,
           "y": 900,
           "wires": [
               [
                   "3da2e65605823f27"
               ]
           ]
       },
       {
           "id": "f61b17dbcca75559",
           "type": "change",
           "z": "2a5d5250.f178be",
           "g": "d7ab92de65468601",
           "name": "Remove",
           "rules": [
               {
                   "t": "delete",
                   "p": "headers",
                   "pt": "msg"
               },
               {
                   "t": "delete",
                   "p": "statusCode",
                   "pt": "msg"
               },
               {
                   "t": "delete",
                   "p": "url",
                   "pt": "msg"
               },
               {
                   "t": "delete",
                   "p": "responseUrl",
                   "pt": "msg"
               },
               {
                   "t": "delete",
                   "p": "retry",
                   "pt": "msg"
               },
               {
                   "t": "delete",
                   "p": "redirectList",
                   "pt": "msg"
               }
           ],
           "action": "",
           "property": "",
           "from": "",
           "to": "",
           "reg": false,
           "x": 1980,
           "y": 900,
           "wires": [
               [
                   "600b30b2fa735916",
                   "c67025781db415b3",
                   "3174341e61111e98",
                   "a32311fe3f57f596",
                   "7a2a6e9862f4b65b",
                   "f6e38c9bba13e173",
                   "70661c26e7a597bd",
                   "6a58ba98af5e39c8",
                   "065f77b5ca36d548",
                   "f7616b34b78f0752",
                   "c277e4c9946def8d",
                   "046cbd62d6d59850",
                   "32e9962567fafd2e"
               ]
           ]
       },
       {
           "id": "3da2e65605823f27",
           "type": "change",
           "z": "2a5d5250.f178be",
           "g": "d7ab92de65468601",
           "name": "Feiertag",
           "rules": [
               {
                   "t": "set",
                   "p": "Feiertag",
                   "pt": "global",
                   "to": "payload",
                   "tot": "msg"
               }
           ],
           "action": "",
           "property": "",
           "from": "",
           "to": "",
           "reg": false,
           "x": 2520,
           "y": 940,
           "wires": [
               [
                   "4ea3728856684ee3"
               ]
           ]
       },
       {
           "id": "4ea3728856684ee3",
           "type": "debug",
           "z": "2a5d5250.f178be",
           "g": "d7ab92de65468601",
           "name": "Info",
           "active": true,
           "tosidebar": true,
           "console": false,
           "tostatus": true,
           "complete": "payload",
           "targetType": "msg",
           "statusVal": "payload",
           "statusType": "auto",
           "x": 2530,
           "y": 980,
           "wires": []
       }
    ]
    

    OliverIOO 1 Reply Last reply
    0
    • M MaGe

      Ich wünsche Euch ein gutes neues Jahr.

      Mein Flow ermittelt die Feiertage im Kalenderjahr über die openholidaysapi: https://www.openholidaysapi.org/en/.
      Wenn der aktuelle Tag mit einem Feiertag übereinstimmt, wird in eine Variable ein true und ansonsten ein false zurückgegeben.
      Ich verstehe nur nicht, dass der payload immer 2-fach ausgegeben wird.
      Ein delay nach dem http request ändert daran nichts.
      Und über die node-red-contrib-deduplicate wird nur die zweite Ausgabe unterbunden.
      Die zweite Ausgabe enthält aber erst das korrekte Ergebnis.

      Habt ihr eine Idee, woran das liegen könnte, bzw. wie ich das unterbinden kann?

      Screenshot_node-red.jpg

      [
         {
             "id": "d7ab92de65468601",
             "type": "group",
             "z": "2a5d5250.f178be",
             "style": {
                 "stroke": "#999999",
                 "stroke-opacity": "1",
                 "fill": "none",
                 "fill-opacity": "1",
                 "label": true,
                 "label-position": "nw",
                 "color": "#a4a4a4"
             },
             "nodes": [
                 "78da17c158e6bef1",
                 "3ccc3f42a2375b34",
                 "600b30b2fa735916",
                 "e91f95671148e3f8",
                 "ea826efb6416a0e2",
                 "7654c97d19b712d2",
                 "c67025781db415b3",
                 "3174341e61111e98",
                 "a32311fe3f57f596",
                 "7a2a6e9862f4b65b",
                 "f6e38c9bba13e173",
                 "70661c26e7a597bd",
                 "6a58ba98af5e39c8",
                 "065f77b5ca36d548",
                 "f7616b34b78f0752",
                 "c277e4c9946def8d",
                 "046cbd62d6d59850",
                 "32e9962567fafd2e",
                 "23232d4ed4efc0cb",
                 "b73fa371cde46fa6",
                 "c045023939e591be",
                 "04c119132bb79324",
                 "ca46e7a0adebd311",
                 "f61b17dbcca75559",
                 "3da2e65605823f27",
                 "4ea3728856684ee3"
             ],
             "x": 1454,
             "y": 779,
             "w": 1172,
             "h": 562
         },
         {
             "id": "78da17c158e6bef1",
             "type": "http request",
             "z": "2a5d5250.f178be",
             "g": "d7ab92de65468601",
             "name": "",
             "method": "GET",
             "ret": "obj",
             "paytoqs": "body",
             "url": "",
             "tls": "",
             "persist": false,
             "proxy": "",
             "insecureHTTPParser": false,
             "authType": "",
             "senderr": false,
             "headers": [],
             "x": 1970,
             "y": 860,
             "wires": [
                 [
                     "f61b17dbcca75559"
                 ]
             ]
         },
         {
             "id": "3ccc3f42a2375b34",
             "type": "inject",
             "z": "2a5d5250.f178be",
             "g": "d7ab92de65468601",
             "name": "Abfrage",
             "props": [
                 {
                     "p": "payload"
                 }
             ],
             "repeat": "",
             "crontab": "05 00 * * *",
             "once": true,
             "onceDelay": "0.5",
             "topic": "",
             "payload": "",
             "payloadType": "date",
             "x": 1560,
             "y": 820,
             "wires": [
                 [
                     "ea826efb6416a0e2",
                     "e91f95671148e3f8"
                 ]
             ]
         },
         {
             "id": "600b30b2fa735916",
             "type": "change",
             "z": "2a5d5250.f178be",
             "g": "d7ab92de65468601",
             "name": "Neujahr",
             "rules": [
                 {
                     "t": "set",
                     "p": "topic",
                     "pt": "msg",
                     "to": "Neujahr",
                     "tot": "str"
                 },
                 {
                     "t": "set",
                     "p": "date",
                     "pt": "msg",
                     "to": "$moment(payload[0].startDate,'YYYY-MM-DD').format('DD.MM.YYYY') ",
                     "tot": "jsonata"
                 },
                 {
                     "t": "set",
                     "p": "date_today",
                     "pt": "msg",
                     "to": "$moment().format('DD.MM.YYYY')",
                     "tot": "jsonata"
                 },
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "(\t    $a := $moment(date_today,['DD.MM.YYYY','x'],'de');     \t    $b := $moment(date,['DD.MM.YYYY','x'],'de');     \t    $a.isSame($b); \t    )",
                     "tot": "jsonata"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 2180,
             "y": 820,
             "wires": [
                 [
                     "c045023939e591be"
                 ]
             ]
         },
         {
             "id": "e91f95671148e3f8",
             "type": "change",
             "z": "2a5d5250.f178be",
             "g": "d7ab92de65468601",
             "name": "Jahr",
             "rules": [
                 {
                     "t": "set",
                     "p": "topic",
                     "pt": "msg",
                     "to": "Jahr",
                     "tot": "str"
                 },
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "$moment().year() ",
                     "tot": "jsonata"
                 },
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "$string(payload)",
                     "tot": "jsonata"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 1770,
             "y": 860,
             "wires": [
                 [
                     "ea826efb6416a0e2"
                 ]
             ]
         },
         {
             "id": "ea826efb6416a0e2",
             "type": "function",
             "z": "2a5d5250.f178be",
             "g": "d7ab92de65468601",
             "name": "Url",
             "func": "msg.payload = `https://openholidaysapi.org/PublicHolidays?countryIsoCode=DE&validFrom=${msg.payload}-01-01&validTo=${msg.payload}-12-31&languageIsoCode=DE&subdivisionCode=DE-BY`;\nreturn msg;",
             "outputs": 1,
             "timeout": "",
             "noerr": 0,
             "initialize": "",
             "finalize": "",
             "libs": [],
             "x": 1770,
             "y": 820,
             "wires": [
                 [
                     "7654c97d19b712d2"
                 ]
             ]
         },
         {
             "id": "7654c97d19b712d2",
             "type": "change",
             "z": "2a5d5250.f178be",
             "g": "d7ab92de65468601",
             "name": "",
             "rules": [
                 {
                     "t": "set",
                     "p": "url",
                     "pt": "msg",
                     "to": "payload",
                     "tot": "msg"
                 },
                 {
                     "t": "set",
                     "p": "url",
                     "pt": "msg",
                     "to": "$.url",
                     "tot": "jsonata"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 1950,
             "y": 820,
             "wires": [
                 [
                     "78da17c158e6bef1"
                 ]
             ]
         },
         {
             "id": "c67025781db415b3",
             "type": "change",
             "z": "2a5d5250.f178be",
             "g": "d7ab92de65468601",
             "name": "Heilige Drei Könige",
             "rules": [
                 {
                     "t": "set",
                     "p": "topic",
                     "pt": "msg",
                     "to": "Heilige Drei Könige",
                     "tot": "str"
                 },
                 {
                     "t": "set",
                     "p": "date",
                     "pt": "msg",
                     "to": "$moment(payload[1].startDate, 'YYYY-MM-DD').format('DD.MM.YYYY') ",
                     "tot": "jsonata"
                 },
                 {
                     "t": "set",
                     "p": "date_today",
                     "pt": "msg",
                     "to": "$moment().format('DD.MM.YYYY')",
                     "tot": "jsonata"
                 },
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "(     $a := $moment(date_today,['DD.MM.YYYY','x'],'de');          $b := $moment(date,['DD.MM.YYYY','x'],'de');          $a.isSame($b);      )",
                     "tot": "jsonata"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 2210,
             "y": 860,
             "wires": [
                 [
                     "c045023939e591be"
                 ]
             ]
         },
         {
             "id": "3174341e61111e98",
             "type": "change",
             "z": "2a5d5250.f178be",
             "g": "d7ab92de65468601",
             "name": "Karfreitag",
             "rules": [
                 {
                     "t": "set",
                     "p": "topic",
                     "pt": "msg",
                     "to": "Karfreitag",
                     "tot": "str"
                 },
                 {
                     "t": "set",
                     "p": "date",
                     "pt": "msg",
                     "to": "$moment(payload[2].startDate, 'YYYY-MM-DD').format('DD.MM.YYYY') ",
                     "tot": "jsonata"
                 },
                 {
                     "t": "set",
                     "p": "date_today",
                     "pt": "msg",
                     "to": "$moment().format('DD.MM.YYYY')",
                     "tot": "jsonata"
                 },
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "(     $a := $moment(date_today,['DD.MM.YYYY','x'],'de');          $b := $moment(date,['DD.MM.YYYY','x'],'de');          $a.isSame($b);      )",
                     "tot": "jsonata"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 2180,
             "y": 900,
             "wires": [
                 [
                     "c045023939e591be"
                 ]
             ]
         },
         {
             "id": "a32311fe3f57f596",
             "type": "change",
             "z": "2a5d5250.f178be",
             "g": "d7ab92de65468601",
             "name": "Ostermontag",
             "rules": [
                 {
                     "t": "set",
                     "p": "topic",
                     "pt": "msg",
                     "to": "Ostermontag",
                     "tot": "str"
                 },
                 {
                     "t": "set",
                     "p": "date",
                     "pt": "msg",
                     "to": "$moment(payload[3].startDate, 'YYYY-MM-DD').format('DD.MM.YYYY') ",
                     "tot": "jsonata"
                 },
                 {
                     "t": "set",
                     "p": "date_today",
                     "pt": "msg",
                     "to": "$moment().format('DD.MM.YYYY')",
                     "tot": "jsonata"
                 },
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "(     $a := $moment(date_today,['DD.MM.YYYY','x'],'de');          $b := $moment(date,['DD.MM.YYYY','x'],'de');          $a.isSame($b);      )",
                     "tot": "jsonata"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 2200,
             "y": 940,
             "wires": [
                 [
                     "c045023939e591be"
                 ]
             ]
         },
         {
             "id": "7a2a6e9862f4b65b",
             "type": "change",
             "z": "2a5d5250.f178be",
             "g": "d7ab92de65468601",
             "name": "Tag der Arbeit",
             "rules": [
                 {
                     "t": "set",
                     "p": "topic",
                     "pt": "msg",
                     "to": "Tag der Arbeit",
                     "tot": "str"
                 },
                 {
                     "t": "set",
                     "p": "date",
                     "pt": "msg",
                     "to": "$moment(payload[4].startDate, 'YYYY-MM-DD').format('DD.MM.YYYY') ",
                     "tot": "jsonata"
                 },
                 {
                     "t": "set",
                     "p": "date_today",
                     "pt": "msg",
                     "to": "$moment().format('DD.MM.YYYY')",
                     "tot": "jsonata"
                 },
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "(     $a := $moment(date_today,['DD.MM.YYYY','x'],'de');          $b := $moment(date,['DD.MM.YYYY','x'],'de');          $a.isSame($b);      )",
                     "tot": "jsonata"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 2200,
             "y": 980,
             "wires": [
                 [
                     "c045023939e591be"
                 ]
             ]
         },
         {
             "id": "f6e38c9bba13e173",
             "type": "change",
             "z": "2a5d5250.f178be",
             "g": "d7ab92de65468601",
             "name": "Christi Himmelfahrt",
             "rules": [
                 {
                     "t": "set",
                     "p": "topic",
                     "pt": "msg",
                     "to": "Christi Himmelfahrt",
                     "tot": "str"
                 },
                 {
                     "t": "set",
                     "p": "date",
                     "pt": "msg",
                     "to": "$moment(payload[5].startDate, 'YYYY-MM-DD').format('DD.MM.YYYY') ",
                     "tot": "jsonata"
                 },
                 {
                     "t": "set",
                     "p": "date_today",
                     "pt": "msg",
                     "to": "$moment().format('DD.MM.YYYY')",
                     "tot": "jsonata"
                 },
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "(     $a := $moment(date_today,['DD.MM.YYYY','x'],'de');          $b := $moment(date,['DD.MM.YYYY','x'],'de');          $a.isSame($b);      )",
                     "tot": "jsonata"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 2210,
             "y": 1020,
             "wires": [
                 [
                     "c045023939e591be"
                 ]
             ]
         },
         {
             "id": "70661c26e7a597bd",
             "type": "change",
             "z": "2a5d5250.f178be",
             "g": "d7ab92de65468601",
             "name": "Pfingstmontag",
             "rules": [
                 {
                     "t": "set",
                     "p": "topic",
                     "pt": "msg",
                     "to": "Pfingstmontag",
                     "tot": "str"
                 },
                 {
                     "t": "set",
                     "p": "date",
                     "pt": "msg",
                     "to": "$moment(payload[6].startDate, 'YYYY-MM-DD').format('DD.MM.YYYY') ",
                     "tot": "jsonata"
                 },
                 {
                     "t": "set",
                     "p": "date_today",
                     "pt": "msg",
                     "to": "$moment().format('DD.MM.YYYY')",
                     "tot": "jsonata"
                 },
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "(     $a := $moment(date_today,['DD.MM.YYYY','x'],'de');          $b := $moment(date,['DD.MM.YYYY','x'],'de');          $a.isSame($b);      )",
                     "tot": "jsonata"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 2200,
             "y": 1060,
             "wires": [
                 [
                     "c045023939e591be"
                 ]
             ]
         },
         {
             "id": "6a58ba98af5e39c8",
             "type": "change",
             "z": "2a5d5250.f178be",
             "g": "d7ab92de65468601",
             "name": "Fronleichnam",
             "rules": [
                 {
                     "t": "set",
                     "p": "topic",
                     "pt": "msg",
                     "to": "Fronleichnam",
                     "tot": "str"
                 },
                 {
                     "t": "set",
                     "p": "date",
                     "pt": "msg",
                     "to": "$moment(payload[7].startDate, 'YYYY-MM-DD').format('DD.MM.YYYY') ",
                     "tot": "jsonata"
                 },
                 {
                     "t": "set",
                     "p": "date_today",
                     "pt": "msg",
                     "to": "$moment().format('DD.MM.YYYY')",
                     "tot": "jsonata"
                 },
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "(     $a := $moment(date_today,['DD.MM.YYYY','x'],'de');          $b := $moment(date,['DD.MM.YYYY','x'],'de');          $a.isSame($b);      )",
                     "tot": "jsonata"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 2200,
             "y": 1100,
             "wires": [
                 [
                     "c045023939e591be"
                 ]
             ]
         },
         {
             "id": "065f77b5ca36d548",
             "type": "change",
             "z": "2a5d5250.f178be",
             "g": "d7ab92de65468601",
             "name": "Mariä Himmelfahrt",
             "rules": [
                 {
                     "t": "set",
                     "p": "topic",
                     "pt": "msg",
                     "to": "Mariä Himmelfahrt",
                     "tot": "str"
                 },
                 {
                     "t": "set",
                     "p": "date",
                     "pt": "msg",
                     "to": "$moment(payload[9].startDate, 'YYYY-MM-DD').format('DD.MM.YYYY') ",
                     "tot": "jsonata"
                 },
                 {
                     "t": "set",
                     "p": "date_today",
                     "pt": "msg",
                     "to": "$moment().format('DD.MM.YYYY')",
                     "tot": "jsonata"
                 },
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "(     $a := $moment(date_today,['DD.MM.YYYY','x'],'de');          $b := $moment(date,['DD.MM.YYYY','x'],'de');          $a.isSame($b);      )",
                     "tot": "jsonata"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 2210,
             "y": 1140,
             "wires": [
                 [
                     "c045023939e591be"
                 ]
             ]
         },
         {
             "id": "f7616b34b78f0752",
             "type": "change",
             "z": "2a5d5250.f178be",
             "g": "d7ab92de65468601",
             "name": "Tag der Deutschen Einheit",
             "rules": [
                 {
                     "t": "set",
                     "p": "topic",
                     "pt": "msg",
                     "to": "Tag der Deutschen Einheit",
                     "tot": "str"
                 },
                 {
                     "t": "set",
                     "p": "date",
                     "pt": "msg",
                     "to": "$moment(payload[10].startDate, 'YYYY-MM-DD').format('DD.MM.YYYY') ",
                     "tot": "jsonata"
                 },
                 {
                     "t": "set",
                     "p": "date_today",
                     "pt": "msg",
                     "to": "$moment().format('DD.MM.YYYY')",
                     "tot": "jsonata"
                 },
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "(     $a := $moment(date_today,['DD.MM.YYYY','x'],'de');          $b := $moment(date,['DD.MM.YYYY','x'],'de');          $a.isSame($b);      )",
                     "tot": "jsonata"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 2240,
             "y": 1180,
             "wires": [
                 [
                     "c045023939e591be"
                 ]
             ]
         },
         {
             "id": "c277e4c9946def8d",
             "type": "change",
             "z": "2a5d5250.f178be",
             "g": "d7ab92de65468601",
             "name": "Allerheiligen",
             "rules": [
                 {
                     "t": "set",
                     "p": "topic",
                     "pt": "msg",
                     "to": "Allerheiligen",
                     "tot": "str"
                 },
                 {
                     "t": "set",
                     "p": "date",
                     "pt": "msg",
                     "to": "$moment(payload[11].startDate, 'YYYY-MM-DD').format('DD.MM.YYYY') ",
                     "tot": "jsonata"
                 },
                 {
                     "t": "set",
                     "p": "date_today",
                     "pt": "msg",
                     "to": "$moment().format('DD.MM.YYYY')",
                     "tot": "jsonata"
                 },
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "(     $a := $moment(date_today,['DD.MM.YYYY','x'],'de');          $b := $moment(date,['DD.MM.YYYY','x'],'de');          $a.isSame($b);      )",
                     "tot": "jsonata"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 2190,
             "y": 1220,
             "wires": [
                 [
                     "c045023939e591be"
                 ]
             ]
         },
         {
             "id": "046cbd62d6d59850",
             "type": "change",
             "z": "2a5d5250.f178be",
             "g": "d7ab92de65468601",
             "name": "1. Weihnachtsfeiertag",
             "rules": [
                 {
                     "t": "set",
                     "p": "topic",
                     "pt": "msg",
                     "to": "1. Weihnachtsfeiertag",
                     "tot": "str"
                 },
                 {
                     "t": "set",
                     "p": "date",
                     "pt": "msg",
                     "to": "$moment(payload[12].startDate, 'YYYY-MM-DD').format('DD.MM.YYYY') ",
                     "tot": "jsonata"
                 },
                 {
                     "t": "set",
                     "p": "date_today",
                     "pt": "msg",
                     "to": "$moment().format('DD.MM.YYYY')",
                     "tot": "jsonata"
                 },
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "(     $a := $moment(date_today,['DD.MM.YYYY','x'],'de');          $b := $moment(date,['DD.MM.YYYY','x'],'de');          $a.isSame($b);      )",
                     "tot": "jsonata"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 2220,
             "y": 1260,
             "wires": [
                 [
                     "c045023939e591be"
                 ]
             ]
         },
         {
             "id": "32e9962567fafd2e",
             "type": "change",
             "z": "2a5d5250.f178be",
             "g": "d7ab92de65468601",
             "name": "2. Weihnachtsfeiertag",
             "rules": [
                 {
                     "t": "set",
                     "p": "topic",
                     "pt": "msg",
                     "to": "2. Weihnachtsfeiertag",
                     "tot": "str"
                 },
                 {
                     "t": "set",
                     "p": "date",
                     "pt": "msg",
                     "to": "$moment(payload[13].startDate, 'YYYY-MM-DD').format('DD.MM.YYYY') ",
                     "tot": "jsonata"
                 },
                 {
                     "t": "set",
                     "p": "date_today",
                     "pt": "msg",
                     "to": "$moment().format('DD.MM.YYYY')",
                     "tot": "jsonata"
                 },
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "(     $a := $moment(date_today,['DD.MM.YYYY','x'],'de');          $b := $moment(date,['DD.MM.YYYY','x'],'de');          $a.isSame($b);      )",
                     "tot": "jsonata"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 2220,
             "y": 1300,
             "wires": [
                 [
                     "c045023939e591be"
                 ]
             ]
         },
         {
             "id": "23232d4ed4efc0cb",
             "type": "inject",
             "z": "2a5d5250.f178be",
             "g": "d7ab92de65468601",
             "name": "Global:Feiertag",
             "props": [
                 {
                     "p": "payload"
                 }
             ],
             "repeat": "",
             "crontab": "06 00 * * *",
             "once": true,
             "onceDelay": "0.5",
             "topic": "",
             "payload": "Feiertag",
             "payloadType": "global",
             "x": 1590,
             "y": 920,
             "wires": [
                 [
                     "b73fa371cde46fa6"
                 ]
             ]
         },
         {
             "id": "b73fa371cde46fa6",
             "type": "debug",
             "z": "2a5d5250.f178be",
             "g": "d7ab92de65468601",
             "name": "Info",
             "active": true,
             "tosidebar": false,
             "console": false,
             "tostatus": true,
             "complete": "true",
             "targetType": "full",
             "statusVal": "payload",
             "statusType": "auto",
             "x": 1770,
             "y": 920,
             "wires": []
         },
         {
             "id": "c045023939e591be",
             "type": "change",
             "z": "2a5d5250.f178be",
             "g": "d7ab92de65468601",
             "name": "",
             "rules": [
                 {
                     "t": "set",
                     "p": "topic",
                     "pt": "msg",
                     "to": "Feiertag",
                     "tot": "str"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 2490,
             "y": 820,
             "wires": [
                 [
                     "04c119132bb79324"
                 ]
             ]
         },
         {
             "id": "04c119132bb79324",
             "type": "join",
             "z": "2a5d5250.f178be",
             "g": "d7ab92de65468601",
             "name": "",
             "mode": "custom",
             "build": "array",
             "property": "payload",
             "propertyType": "msg",
             "key": "topic",
             "joiner": "\\n",
             "joinerType": "str",
             "accumulate": false,
             "timeout": "",
             "count": "13",
             "reduceRight": false,
             "reduceExp": "",
             "reduceInit": "",
             "reduceInitType": "",
             "reduceFixup": "",
             "x": 2530,
             "y": 860,
             "wires": [
                 [
                     "ca46e7a0adebd311"
                 ]
             ]
         },
         {
             "id": "ca46e7a0adebd311",
             "type": "function",
             "z": "2a5d5250.f178be",
             "g": "d7ab92de65468601",
             "name": "date = today",
             "func": "const Feiertag = msg.payload;\nmsg.payload = Feiertag.includes(true);\nreturn msg;",
             "outputs": 1,
             "timeout": "",
             "noerr": 0,
             "initialize": "",
             "finalize": "",
             "libs": [],
             "x": 2510,
             "y": 900,
             "wires": [
                 [
                     "3da2e65605823f27"
                 ]
             ]
         },
         {
             "id": "f61b17dbcca75559",
             "type": "change",
             "z": "2a5d5250.f178be",
             "g": "d7ab92de65468601",
             "name": "Remove",
             "rules": [
                 {
                     "t": "delete",
                     "p": "headers",
                     "pt": "msg"
                 },
                 {
                     "t": "delete",
                     "p": "statusCode",
                     "pt": "msg"
                 },
                 {
                     "t": "delete",
                     "p": "url",
                     "pt": "msg"
                 },
                 {
                     "t": "delete",
                     "p": "responseUrl",
                     "pt": "msg"
                 },
                 {
                     "t": "delete",
                     "p": "retry",
                     "pt": "msg"
                 },
                 {
                     "t": "delete",
                     "p": "redirectList",
                     "pt": "msg"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 1980,
             "y": 900,
             "wires": [
                 [
                     "600b30b2fa735916",
                     "c67025781db415b3",
                     "3174341e61111e98",
                     "a32311fe3f57f596",
                     "7a2a6e9862f4b65b",
                     "f6e38c9bba13e173",
                     "70661c26e7a597bd",
                     "6a58ba98af5e39c8",
                     "065f77b5ca36d548",
                     "f7616b34b78f0752",
                     "c277e4c9946def8d",
                     "046cbd62d6d59850",
                     "32e9962567fafd2e"
                 ]
             ]
         },
         {
             "id": "3da2e65605823f27",
             "type": "change",
             "z": "2a5d5250.f178be",
             "g": "d7ab92de65468601",
             "name": "Feiertag",
             "rules": [
                 {
                     "t": "set",
                     "p": "Feiertag",
                     "pt": "global",
                     "to": "payload",
                     "tot": "msg"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 2520,
             "y": 940,
             "wires": [
                 [
                     "4ea3728856684ee3"
                 ]
             ]
         },
         {
             "id": "4ea3728856684ee3",
             "type": "debug",
             "z": "2a5d5250.f178be",
             "g": "d7ab92de65468601",
             "name": "Info",
             "active": true,
             "tosidebar": true,
             "console": false,
             "tostatus": true,
             "complete": "payload",
             "targetType": "msg",
             "statusVal": "payload",
             "statusType": "auto",
             "x": 2530,
             "y": 980,
             "wires": []
         }
      ]
      

      OliverIOO Offline
      OliverIOO Offline
      OliverIO
      wrote on last edited by
      #2

      @mage

      Du hast 2 Info nodes?

      Meine Adapter und Widgets
      TVProgram, SqueezeboxRPC, OpenLiga, RSSFeed, MyTime,, pi-hole2, vis-json-template, skiinfo, vis-mapwidgets, vis-2-widgets-rssfeed
      Links im Profil

      M 1 Reply Last reply
      0
      • OliverIOO OliverIO

        @mage

        Du hast 2 Info nodes?

        M Offline
        M Offline
        MaGe
        wrote on last edited by
        #3

        @oliverio said in http request mit 2-facher Ausgabe:

        @mage

        Du hast 2 Info nodes?

        Ja, die 1. gibt das Ergebnis der Variable bei inject wieder (zum Test) und die 2. das Ergebnis des flows.
        In welchem Zusammenhang sollte das mit der Ausgabe stehen?

        mickymM 1 Reply Last reply
        0
        • M MaGe

          @oliverio said in http request mit 2-facher Ausgabe:

          @mage

          Du hast 2 Info nodes?

          Ja, die 1. gibt das Ergebnis der Variable bei inject wieder (zum Test) und die 2. das Ergebnis des flows.
          In welchem Zusammenhang sollte das mit der Ausgabe stehen?

          mickymM Offline
          mickymM Offline
          mickym
          Most Active
          wrote on last edited by
          #4

          @mage Das Problem ist meines Erachtens ganz simple und ich verstehe auch nicht, warum man das macht.

          In dem Du aus der 1. Inject Node 2 Kabel schickst, verdoppelst Du die Anzahl Nachrichten.

          6ab980c0-8215-4b8e-800a-b29fcfec80f5-image.png

          Wenn Du also die Nachricht nicht verdoppelst, dann kommt auch nur EINE Nachricht raus.

          Jeder Flow bzw. jedes Script, das ich hier poste implementiert jeder auf eigene Gefahr. Flows und Scripts können Fehler aufweisen und weder der Seitenbetreiber noch ich persönlich können hierfür haftbar gemacht werden. Das gleiche gilt für Empfehlungen aller Art.

          M 1 Reply Last reply
          0
          • mickymM mickym

            @mage Das Problem ist meines Erachtens ganz simple und ich verstehe auch nicht, warum man das macht.

            In dem Du aus der 1. Inject Node 2 Kabel schickst, verdoppelst Du die Anzahl Nachrichten.

            6ab980c0-8215-4b8e-800a-b29fcfec80f5-image.png

            Wenn Du also die Nachricht nicht verdoppelst, dann kommt auch nur EINE Nachricht raus.

            M Offline
            M Offline
            MaGe
            wrote on last edited by
            #5

            @mickym said in http request mit 2-facher Ausgabe:

            @mage Das Problem ist meines Erachtens ganz simple und ich verstehe auch nicht, warum man das macht.

            In dem Du aus der 1. Inject Node 2 Kabel schickst, verdoppelst Du die Anzahl Nachrichten.

            6ab980c0-8215-4b8e-800a-b29fcfec80f5-image.png

            Wenn Du also die Nachricht nicht verdoppelst, dann kommt auch nur EINE Nachricht raus.

            Vielen lieben Dank. Die doppelte Verbindung hatte ich total übersehen. 🙂
            Jetzt funktioniert es wie es soll.
            Screenshot_node-red2.jpg

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            Support us

            ioBroker
            Community Adapters
            Donate

            73

            Online

            32.4k

            Users

            81.3k

            Topics

            1.3m

            Posts
            Community
            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
            ioBroker Community 2014-2025
            logo
            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Recent
            • Tags
            • Unread 0
            • Categories
            • Unreplied
            • Popular
            • GitHub
            • Docu
            • Hilfe