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. [Gelöst] Benötige Hilfe mit Node-Red in Verbindung mit homee

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    [Gelöst] Benötige Hilfe mit Node-Red in Verbindung mit homee

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

      @oli sagte in Benötige Hilfe mit Node-Red in Verbindung mit homee:

      Ich fange auch gerne nochmal bei null an, wie würdest du das denn umsetzen?

      Nun da würde ich generell immer mit den Daten anfangen und dann was Du alles erreichen möchtest.

      O 1 Reply Last reply Reply Quote 0
      • O
        Oli @mickym last edited by

        @mickym

        {"node":{"id":5,"name":"EG%20%2F%20WC%20%2F%20Heizung","profile":3006,"image":"nodeicon_temperature","favorite":0,"order":6,"protocol":1,"routing":0,"state":1,"state_changed":1678443567,"added":1571490280,"history":0,"cube_type":1,"note":"%23%20EUROtronic%20Spirit%20Z-Wave%20Plus","services":7,"phonetic_name":"Heizung%20Toilette","owner":1,"security":0,"attributes":[{"id":74,"node_id":5,"instance":0,"minimum":0,"maximum":0,"current_value":0,"target_value":0,"last_value":0,"unit":"text","step_value":1,"editable":0,"type":44,"state":1,"last_changed":1571490280,"changed_by":1,"changed_by_id":0,"based_on":1,"data":"4.61","name":""},{"id":75,"node_id":5,"instance":0,"minimum":0,"maximum":0,"current_value":0,"target_value":0,"last_value":0,"unit":"text","step_value":1,"editable":0,"type":45,"state":1,"last_changed":1571490280,"changed_by":1,"changed_by_id":0,"based_on":1,"data":"0.16","name":""},{"id":76,"node_id":5,"instance":0,"minimum":0,"maximum":1,"current_value":0,"target_value":0,"last_value":0,"unit":"","step_value":1,"editable":1,"type":91,"state":1,"last_changed":1583340481,"changed_by":1,"changed_by_id":0,"based_on":1,"data":"","name":""},{"id":77,"node_id":5,"instance":0,"minimum":0,"maximum":100,"current_value":34,"target_value":34,"last_value":35,"unit":"%25","step_value":1,"editable":0,"type":18,"state":1,"last_changed":1678473765,"changed_by":1,"changed_by_id":0,"based_on":1,"data":"","name":""},{"id":78,"node_id":5,"instance":0,"minimum":0,"maximum":100,"current_value":55,"target_value":55,"last_value":55,"unit":"%25","step_value":1,"editable":0,"type":8,"state":1,"last_changed":1678459725,"changed_by":1,"changed_by_id":0,"based_on":1,"data":"","name":"","options":{"history":{"day":182,"week":26,"month":6}}},{"id":79,"node_id":5,"instance":0,"minimum":0,"maximum":4,"current_value":1,"target_value":1,"last_value":1,"unit":"","step_value":1,"editable":1,"type":258,"state":1,"last_changed":1678428356,"changed_by":1,"changed_by_id":0,"based_on":1,"data":"","name":""},{"id":80,"node_id":5,"instance":0,"minimum":0,"maximum":180,"current_value":0,"target_value":0,"last_value":0,"unit":"%C2%B0","step_value":180,"editable":1,"type":90,"state":1,"last_changed":1571490280,"changed_by":1,"changed_by_id":0,"based_on":1,"data":"","name":""},{"id":81,"node_id":5,"instance":0,"minimum":0,"maximum":30,"current_value":0,"target_value":0,"last_value":0,"unit":"s","step_value":5,"editable":1,"type":259,"state":1,"last_changed":1571490280,"changed_by":1,"changed_by_id":0,"based_on":1,"data":"","name":""},{"id":82,"node_id":5,"instance":0,"minimum":0,"maximum":1,"current_value":1,"target_value":1,"last_value":0,"unit":"","step_value":1,"editable":1,"type":260,"state":1,"last_changed":1571490280,"changed_by":1,"changed_by_id":0,"based_on":1,"data":"","name":""},{"id":83,"node_id":5,"instance":0,"minimum":0,"maximum":3,"current_value":2,"target_value":2,"last_value":0,"unit":"","step_value":1,"editable":1,"type":261,"state":1,"last_changed":1571490280,"changed_by":1,"changed_by_id":0,"based_on":1,"data":"","name":""},{"id":84,"node_id":5,"instance":0,"minimum":-5,"maximum":5,"current_value":0,"target_value":0,"last_value":0,"unit":"%C2%B0C","step_value":0.1,"editable":1,"type":64,"state":1,"last_changed":1571490280,"changed_by":1,"changed_by_id":0,"based_on":1,"data":"","name":""},{"id":85,"node_id":5,"instance":0,"minimum":-50,"maximum":125,"current_value":19.1,"target_value":19.1,"last_value":19.02,"unit":"%C2%B0C","step_value":1,"editable":0,"type":5,"state":1,"last_changed":1678476525,"changed_by":1,"changed_by_id":0,"based_on":1,"data":"","name":"","options":{"can_observe":[5],"history":{"day":1,"week":26,"month":6}}},{"id":86,"node_id":5,"instance":0,"minimum":8,"maximum":28,"current_value":19,"target_value":19,"last_value":8,"unit":"%C2%B0C","step_value":0.5,"editable":1,"type":6,"state":1,"last_changed":1678443559,"changed_by":1,"changed_by_id":0,"based_on":1,"data":"","name":"","options":{"can_observe":[6],"automations":["step"],"history":{"day":35,"week":5,"month":1,"stepped":true}}},{"id":87,"node_id":5,"instance":0,"minimum":0,"maximum":1,"current_value":0,"target_value":0,"last_value":0,"unit":"","step_value":1,"editable":0,"type":69,"state":1,"last_changed":1661403111,"changed_by":1,"changed_by_id":0,"based_on":1,"data":"","name":"","options":{"history":{"day":182,"week":26,"month":6,"stepped":true}}},{"id":459,"node_id":5,"instance":0,"minimum":0,"maximum":1,"current_value":1,"target_value":1,"last_value":0,"unit":"","step_value":1,"editable":1,"type":385,"state":1,"last_changed":0,"changed_by":0,"changed_by_id":0,"based_on":0,"data":"","name":""}]}}
        

        Vom Prinzip möchte ich das umsetzten, was der der Flow bis jetzt zum großen Teil auch schon macht:

        1. Alles Geräte nach ihrem Status abfragen
        2. Die Anzahl der Geräte nach dem jeweilen Status zählen
        3. Einen Text mit Namen, Status und Anzahl verfassen
        4. Eine Pushnachricht in der homee App mit dem Text auslösen
        5. Den Text in einen Datenpunkt schreiben.
        6. Die Anzahl der nicht Verfügbaren Geräte in einen Datenpunkt schreiben
        7. Die ganze Aktion zusätzlich mit einem Button starten
        mickym 1 Reply Last reply Reply Quote 0
        • mickym
          mickym Most Active @Oli last edited by

          Nun wie gesagt . wenn du zufrieden bist - ist ja OK.

          Ich habe mal deine Daten genommen:

          4ede6d45-f97d-4f64-a50b-bb9a9a51bd10-image.png

          Ist das nun ein Gerät - und was sind die 15 Attribute zu dem Gerät. Sorry kenn mich halt mit homee 0,0 aus.

          O 1 Reply Last reply Reply Quote 0
          • O
            Oli @mickym last edited by

            @mickym

            ja, dass ist nur 1 Gerät von 46. In den Attributen stehen die einzelnen Werte drin, wie z.B. Temperatur und Batteriestand u.s.w

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

              @oli OK . das heisst die Attribute interessieren nicht, sondern es ist nur der Status in der "node" Eigenschaft selbst relevant und nicht die Attribute?

              7f896b62-df67-4927-a0d1-4c670c16a8f7-image.png

              Kannst Du mir dann auch das komplette Array - oder halt mehrere Geräte mit unterschiedlichem Status genauso zur Verfügung stellen. Wenn das ggf. zu groß ist, dann halt in eine Datei packen.

              O 1 Reply Last reply Reply Quote 0
              • O
                Oli @mickym last edited by

                @mickym

                homee.txt

                Aber gerne doch, danke für deine Hilfe!!!

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

                  So hier mal wieder eine Version ohne function Node - mit Spaghetti-Code. 😉

                  Ja ich musste auch erst lernen, wie man JSONATA liest - wir können das gerne genauer anschauen, aber Du musst Dich halt generell mit Objekte und Arrays auseinandersetzen.

                  567ff4a3-21da-4e99-8181-c965db4f1d83-image.png

                  Ich hab einfach die verschiedenen Filterfunktionen und Möglichkeiten von JSONATA genutzt. Im Prinzip dient dir diese ganzen Debug Nodes, damit du siehst, wie Du selektierst und auf verschiedenene Eigenschaften der Objekte zugreifst.

                  Im Prinzip habe ich alle Geräte nicht nur nach den Status (aktiv, inaktiv, updating) getrennt, sondern dies auch im Flow-Kontext gespeichert, so dass Du zeitlich unabhängig auf diese Informationen zugreifen kannst.

                  ad415215-7d83-4a49-b4b0-4de3b6c6d19c-image.png

                  Hier eine Inject Node - aber das kann natürlich auch ein trigger Datenpunkt über VIS sein.

                  Ich hab jetzt mal bewusst nicht die Namen, sondern die phonetischen Namen gewählt - aber das dient ja alles nur der Demo.

                  Es wird unten nicht nur mit der template Node gezeigt, wie Du eine Textausgabe erzeugst, sondern ich hab mal HTML Code verwendet.
                  Diese seite wird im iobroker Home Verzeichnis gespeichert. So könnte dann ein Report aussehen:

                  1519756f-dcab-4d2f-b9d3-2c2c7c5e40a0-image.png

                  Somit schau ich mal - was ich von Deinem Pflichtenheft erledigt habe:

                  1. Alles Geräte nach ihrem Status abfragen => erledigt
                  2. Die Anzahl der Geräte nach dem jeweilen Status zählen => erledigt
                  3. Einen Text mit Namen, Status und Anzahl verfassen => erledigt - ich habe HTML code erzeugt, aber reiner Text ist ja einfacher
                  4. Eine Pushnachricht in der homee App mit dem Text auslösen => musst Du machen - bzw. halt das von dem bestehenden Flow übernehmen
                  5. Den Text in einen Datenpunkt schreiben. => Nun da brauchst Du ja nur ein iobroker Out Node an die Ausgabe die Du wünschst dranhängen
                  6. Die Anzahl der nicht Verfügbaren Geräte in einen Datenpunkt schreiben => erledigt nur noch iobroker-Out Node dranhängen
                  7. Die ganze Aktion zusätzlich mit einem Button starten => erledigt, trigger mit VIS

                  Hier nun der Flow zum Import und Ausprobieren:

                  [
                     {
                         "id": "1a49f3e7a72eeb98",
                         "type": "debug",
                         "z": "9c280ddf049b2b4d",
                         "name": "inaktive Geräte",
                         "active": false,
                         "tosidebar": true,
                         "console": false,
                         "tostatus": false,
                         "complete": "payload",
                         "targetType": "msg",
                         "statusVal": "",
                         "statusType": "auto",
                         "x": 1340,
                         "y": 1120,
                         "wires": []
                     },
                     {
                         "id": "6f4c16eed7166074",
                         "type": "change",
                         "z": "9c280ddf049b2b4d",
                         "name": "decodeUrlComponents",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "payload ~> |$.nodes|{\"name\":$decodeUrlComponent(name),\t\"note\":$decodeUrlComponent(note),\t\"phonetic_name\":$decodeUrlComponent(phonetic_name)},\"attributes\"|",
                                 "tot": "jsonata"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 340,
                         "y": 1180,
                         "wires": [
                             [
                                 "5c62dbd7992ee76d"
                             ]
                         ]
                     },
                     {
                         "id": "5c62dbd7992ee76d",
                         "type": "change",
                         "z": "9c280ddf049b2b4d",
                         "name": "Alle Geräte",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "payload.nodes",
                                 "tot": "msg"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 550,
                         "y": 1180,
                         "wires": [
                             [
                                 "9ed44d883152b608"
                             ]
                         ]
                     },
                     {
                         "id": "99528e0bbb0f2491",
                         "type": "change",
                         "z": "9c280ddf049b2b4d",
                         "name": "Alle inaktiven Geräte",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "payload[state = 2]",
                                 "tot": "jsonata"
                             },
                             {
                                 "t": "set",
                                 "p": "homee.inactive",
                                 "pt": "flow",
                                 "to": "payload",
                                 "tot": "msg"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 1060,
                         "y": 1180,
                         "wires": [
                             [
                                 "1a49f3e7a72eeb98",
                                 "79c90e3a205144c8",
                                 "852a4580fa93381d"
                             ]
                         ]
                     },
                     {
                         "id": "139fe3d8efb20402",
                         "type": "change",
                         "z": "9c280ddf049b2b4d",
                         "name": "Alle aktiven Geräte",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "payload[state = 1]",
                                 "tot": "jsonata"
                             },
                             {
                                 "t": "set",
                                 "p": "homee.active",
                                 "pt": "flow",
                                 "to": "payload",
                                 "tot": "msg"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 1050,
                         "y": 940,
                         "wires": [
                             [
                                 "f8402a89bc3c1103",
                                 "b1946c337b7d80ef",
                                 "d95e18df200eadee"
                             ]
                         ]
                     },
                     {
                         "id": "f8402a89bc3c1103",
                         "type": "debug",
                         "z": "9c280ddf049b2b4d",
                         "name": "aktive Geräte",
                         "active": false,
                         "tosidebar": true,
                         "console": false,
                         "tostatus": false,
                         "complete": "payload",
                         "targetType": "msg",
                         "statusVal": "",
                         "statusType": "auto",
                         "x": 1270,
                         "y": 900,
                         "wires": []
                     },
                     {
                         "id": "43f88f1028d1af0a",
                         "type": "change",
                         "z": "9c280ddf049b2b4d",
                         "name": "Geräte, die aktualisiert werden",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "payload[state = 12] ",
                                 "tot": "jsonata"
                             },
                             {
                                 "t": "set",
                                 "p": "homee.updating",
                                 "pt": "flow",
                                 "to": "payload",
                                 "tot": "msg"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 1090,
                         "y": 1440,
                         "wires": [
                             [
                                 "ceb8932892417bf3",
                                 "4e3680fd1ba7cc1e",
                                 "21b0ae03da03035d"
                             ]
                         ]
                     },
                     {
                         "id": "ceb8932892417bf3",
                         "type": "debug",
                         "z": "9c280ddf049b2b4d",
                         "name": "Geräte die aktualisiert werden",
                         "active": false,
                         "tosidebar": true,
                         "console": false,
                         "tostatus": false,
                         "complete": "payload",
                         "targetType": "msg",
                         "statusVal": "",
                         "statusType": "auto",
                         "x": 1410,
                         "y": 1380,
                         "wires": []
                     },
                     {
                         "id": "4e3680fd1ba7cc1e",
                         "type": "change",
                         "z": "9c280ddf049b2b4d",
                         "name": "Anzahl",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "payload ? $count(payload) : \"Keine Geräte im Aktualisierungsstatus\"",
                                 "tot": "jsonata"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 1350,
                         "y": 1440,
                         "wires": [
                             [
                                 "d629bd7188fa7121"
                             ]
                         ]
                     },
                     {
                         "id": "d629bd7188fa7121",
                         "type": "debug",
                         "z": "9c280ddf049b2b4d",
                         "name": "Anzahl Geräte im Aktualisierungsstatus",
                         "active": false,
                         "tosidebar": true,
                         "console": false,
                         "tostatus": false,
                         "complete": "payload",
                         "targetType": "msg",
                         "statusVal": "",
                         "statusType": "auto",
                         "x": 1600,
                         "y": 1440,
                         "wires": []
                     },
                     {
                         "id": "79c90e3a205144c8",
                         "type": "change",
                         "z": "9c280ddf049b2b4d",
                         "name": "Anzahl",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "payload ? $count(payload) : \"Keine Geräte im Aktualisierungsstatus\"",
                                 "tot": "jsonata"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 1330,
                         "y": 1180,
                         "wires": [
                             [
                                 "6636132bd627fd5a"
                             ]
                         ]
                     },
                     {
                         "id": "6636132bd627fd5a",
                         "type": "debug",
                         "z": "9c280ddf049b2b4d",
                         "name": "Anzahl inaktive Geräte",
                         "active": false,
                         "tosidebar": true,
                         "console": false,
                         "tostatus": false,
                         "complete": "payload",
                         "targetType": "msg",
                         "statusVal": "",
                         "statusType": "auto",
                         "x": 1520,
                         "y": 1180,
                         "wires": []
                     },
                     {
                         "id": "b1946c337b7d80ef",
                         "type": "change",
                         "z": "9c280ddf049b2b4d",
                         "name": "Anzahl",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "payload ? $count(payload) : \"Keine Geräte im Aktualisierungsstatus\"",
                                 "tot": "jsonata"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 1270,
                         "y": 940,
                         "wires": [
                             [
                                 "1871f120aa223a8d"
                             ]
                         ]
                     },
                     {
                         "id": "1871f120aa223a8d",
                         "type": "debug",
                         "z": "9c280ddf049b2b4d",
                         "name": "Anzahl aktiver Geräte",
                         "active": false,
                         "tosidebar": true,
                         "console": false,
                         "tostatus": false,
                         "complete": "payload",
                         "targetType": "msg",
                         "statusVal": "",
                         "statusType": "auto",
                         "x": 1460,
                         "y": 940,
                         "wires": []
                     },
                     {
                         "id": "d95e18df200eadee",
                         "type": "change",
                         "z": "9c280ddf049b2b4d",
                         "name": "Namen",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "payload.phonetic_name",
                                 "tot": "jsonata"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 1260,
                         "y": 1000,
                         "wires": [
                             [
                                 "ae2e5ba148bb399a"
                             ]
                         ]
                     },
                     {
                         "id": "ae2e5ba148bb399a",
                         "type": "debug",
                         "z": "9c280ddf049b2b4d",
                         "name": "Namen aktiver Geräte (Phoenetic Name)",
                         "active": false,
                         "tosidebar": true,
                         "console": false,
                         "tostatus": false,
                         "complete": "payload",
                         "targetType": "msg",
                         "statusVal": "",
                         "statusType": "auto",
                         "x": 1540,
                         "y": 1040,
                         "wires": []
                     },
                     {
                         "id": "852a4580fa93381d",
                         "type": "change",
                         "z": "9c280ddf049b2b4d",
                         "name": "Namen",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "payload.phonetic_name",
                                 "tot": "jsonata"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 1340,
                         "y": 1240,
                         "wires": [
                             [
                                 "43f62f9f3bc5bc3d"
                             ]
                         ]
                     },
                     {
                         "id": "43f62f9f3bc5bc3d",
                         "type": "debug",
                         "z": "9c280ddf049b2b4d",
                         "name": "Namen inaktiver Geräte (Phoenetic Name)",
                         "active": false,
                         "tosidebar": true,
                         "console": false,
                         "tostatus": false,
                         "complete": "payload",
                         "targetType": "msg",
                         "statusVal": "",
                         "statusType": "auto",
                         "x": 1630,
                         "y": 1240,
                         "wires": []
                     },
                     {
                         "id": "21b0ae03da03035d",
                         "type": "change",
                         "z": "9c280ddf049b2b4d",
                         "name": "Namen",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "payload.phonetic_name",
                                 "tot": "jsonata"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 1360,
                         "y": 1500,
                         "wires": [
                             [
                                 "02eb40a627f4e90d"
                             ]
                         ]
                     },
                     {
                         "id": "02eb40a627f4e90d",
                         "type": "debug",
                         "z": "9c280ddf049b2b4d",
                         "name": "Namen aktualisierende Geräte (Phoenetic Name)",
                         "active": false,
                         "tosidebar": true,
                         "console": false,
                         "tostatus": false,
                         "complete": "payload",
                         "targetType": "msg",
                         "statusVal": "",
                         "statusType": "auto",
                         "x": 1670,
                         "y": 1500,
                         "wires": []
                     },
                     {
                         "id": "9ed44d883152b608",
                         "type": "change",
                         "z": "9c280ddf049b2b4d",
                         "name": "Geräte ausschliessen",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "payload ~> $filter(function($value){$value.id in [-1] != true})",
                                 "tot": "jsonata"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 760,
                         "y": 1180,
                         "wires": [
                             [
                                 "bc383b50669e8145"
                             ]
                         ]
                     },
                     {
                         "id": "8295d28d57fdb5f9",
                         "type": "inject",
                         "z": "9c280ddf049b2b4d",
                         "name": "Trigger Report",
                         "props": [
                             {
                                 "p": "payload"
                             }
                         ],
                         "repeat": "",
                         "crontab": "",
                         "once": false,
                         "onceDelay": 0.1,
                         "topic": "",
                         "payload": "",
                         "payloadType": "date",
                         "x": 210,
                         "y": 1620,
                         "wires": [
                             [
                                 "bb70522cf511b632"
                             ]
                         ]
                     },
                     {
                         "id": "bb70522cf511b632",
                         "type": "change",
                         "z": "9c280ddf049b2b4d",
                         "name": "",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "homee",
                                 "tot": "flow"
                             },
                             {
                                 "t": "set",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "{\t   \"active\" : {\t       \"count\": payload.active ? $count(payload.active): 0,\t       \"names\" :  payload.active ?  $join(payload.active.phonetic_name,\"\\n\") : \"Keine aktiven Geräte vorhanden\"\t   },\t   \"inactive\" : {\t       \"count\": payload.inactive ? $count(payload.inactive): 0,\t        \"names\" :  payload.inactive ?  $join(payload.inactive.phonetic_name,\"\\n\") : \"Keine inaktiven Geräte vorhanden\"\t   },\t   \"updating\" : {\t       \"count\": payload.updating ? $count(payload.inactive): 0,\t        \"names\" :  payload.updating ?  $join(payload.updating.phonetic_name,\"\\n\") : \"Keine Geräte im Aktualisierungsstatus\"\t   },\t   \"summary\" : payload.updating or payload.inactive ? \"Nicht alle Geräte bereit!\" : \"Alle Geräte aktiv\"\t}",
                                 "tot": "jsonata"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 430,
                         "y": 1680,
                         "wires": [
                             [
                                 "886c19b24989ed4d",
                                 "a76c7c09a28be0d6",
                                 "f422b5bcbb03ca87"
                             ]
                         ]
                     },
                     {
                         "id": "886c19b24989ed4d",
                         "type": "template",
                         "z": "9c280ddf049b2b4d",
                         "name": "",
                         "field": "payload",
                         "fieldType": "msg",
                         "format": "html",
                         "syntax": "mustache",
                         "template": "<!DOCTYPE html>\n<html>\n\n<body>\n<h1>Status der Geräte:</h1>\n\n<h3>aktive Geräte: {{payload.active.count}}\n<pre>{{payload.active.names}}</pre>\n\n<h3>inaktive Geräte: {{payload.inactive.count}}\n<pre>{{payload.inactive.names}}</pre>\n\n<h3>aktualisierende Geräte: {{payload.updating.count}}\n<pre>{{payload.updating.names}}</pre>\n\n<h3>{{payload.summary}}</h3>\n</body>\n</html>",
                         "output": "str",
                         "x": 660,
                         "y": 1680,
                         "wires": [
                             [
                                 "e9df565834fa1f46"
                             ]
                         ]
                     },
                     {
                         "id": "ea538b90d2d339e0",
                         "type": "file",
                         "z": "9c280ddf049b2b4d",
                         "name": "",
                         "filename": "filename",
                         "filenameType": "msg",
                         "appendNewline": false,
                         "createDir": false,
                         "overwriteFile": "true",
                         "encoding": "none",
                         "x": 1080,
                         "y": 1680,
                         "wires": [
                             []
                         ]
                     },
                     {
                         "id": "e9df565834fa1f46",
                         "type": "change",
                         "z": "9c280ddf049b2b4d",
                         "name": "",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "filename",
                                 "pt": "msg",
                                 "to": "/home/iobroker/homee-report.html",
                                 "tot": "str"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 870,
                         "y": 1680,
                         "wires": [
                             [
                                 "ea538b90d2d339e0"
                             ]
                         ]
                     },
                     {
                         "id": "a76c7c09a28be0d6",
                         "type": "switch",
                         "z": "9c280ddf049b2b4d",
                         "name": "",
                         "property": "payload.summary",
                         "propertyType": "msg",
                         "rules": [
                             {
                                 "t": "neq",
                                 "v": "Alle Geräte aktiv",
                                 "vt": "str"
                             }
                         ],
                         "checkall": "true",
                         "repair": false,
                         "outputs": 1,
                         "x": 650,
                         "y": 1760,
                         "wires": [
                             [
                                 "d8673a8fe1b1dfc2"
                             ]
                         ]
                     },
                     {
                         "id": "48226cba37067157",
                         "type": "debug",
                         "z": "9c280ddf049b2b4d",
                         "name": "Warnung ausgeben - wenn nicht alle Geräte aktiv",
                         "active": false,
                         "tosidebar": true,
                         "console": false,
                         "tostatus": false,
                         "complete": "payload",
                         "targetType": "msg",
                         "statusVal": "",
                         "statusType": "auto",
                         "x": 1150,
                         "y": 1760,
                         "wires": []
                     },
                     {
                         "id": "d8673a8fe1b1dfc2",
                         "type": "change",
                         "z": "9c280ddf049b2b4d",
                         "name": "",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "payload.summary",
                                 "tot": "msg"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 830,
                         "y": 1760,
                         "wires": [
                             [
                                 "48226cba37067157"
                             ]
                         ]
                     },
                     {
                         "id": "f99cd78780beb8e7",
                         "type": "ioBroker in",
                         "z": "9c280ddf049b2b4d",
                         "name": "start",
                         "topic": "0_userdata.0.System.homee.StartGeräteinfo",
                         "payloadType": "value",
                         "onlyack": "",
                         "func": "all",
                         "gap": "",
                         "fireOnStart": "false",
                         "outFormat": "MQTT",
                         "x": 190,
                         "y": 1680,
                         "wires": [
                             [
                                 "bb70522cf511b632"
                             ]
                         ]
                     },
                     {
                         "id": "f422b5bcbb03ca87",
                         "type": "change",
                         "z": "9c280ddf049b2b4d",
                         "name": "Anzahl nicht aktiver Geräte",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "payload.inactive.count + payload.updating.count",
                                 "tot": "jsonata"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 720,
                         "y": 1840,
                         "wires": [
                             [
                                 "8b40e4fbe4ba993d"
                             ]
                         ]
                     },
                     {
                         "id": "8b40e4fbe4ba993d",
                         "type": "debug",
                         "z": "9c280ddf049b2b4d",
                         "name": "Nicht aktive Geräte (updating oder inaktiv)",
                         "active": true,
                         "tosidebar": true,
                         "console": false,
                         "tostatus": false,
                         "complete": "payload",
                         "targetType": "msg",
                         "statusVal": "",
                         "statusType": "auto",
                         "x": 1060,
                         "y": 1840,
                         "wires": []
                     },
                     {
                         "id": "bc383b50669e8145",
                         "type": "junction",
                         "z": "9c280ddf049b2b4d",
                         "x": 880,
                         "y": 1180,
                         "wires": [
                             [
                                 "43f88f1028d1af0a",
                                 "99528e0bbb0f2491",
                                 "139fe3d8efb20402"
                             ]
                         ]
                     }
                  ]
                  

                  Die Inject Node mit den Daten der 46 Geräte ist in diesem Export nicht enthalten - also den Dateninput musst Du halt liefern. 😉

                  Der Vorteil nicht alles in einer function Node zu verstecken ist halt auch, dass Du individuell Aktionen mit bestimmten Geräten ggf. anschließen kannst.

                  Und zum Schluss - Du hast so einen Flow dann selbst erarbeitet. Ich kann Dich nur ermuntern, das zu Probieren, anstelle im Netz nach fertigen Flows zu suchen. Es kann eine Anregung sein - man muss das Rad nicht neu erfinden. Der Mensch, der den Flow gemacht hat, ist zwar ein sehr fitter Javascript Programmierer (diese template Literals habe ich noch nie benutzt), aber er kapselt viel zu viel in der function Node und beschneidet deshalb die Möglichkeiten eines Flows.

                  O 1 Reply Last reply Reply Quote 0
                  • O
                    Oli last edited by

                    @mickym

                    wow, erstmal vielen Dank, dass muss ich mir heute nach dem aufstehen mal etwas genau anschauen, momentan erschlägt es mich erstmal.

                    Da werden bestimmt einige Fragen aufkommen, mit denen ich auf dich zukommen werde 😉

                    1 Reply Last reply Reply Quote 0
                    • O
                      Oli @mickym last edited by

                      @mickym
                      habe mir das ganze mal angesehen und versucht durch zu blicken, aber leider funktioniert es nicht.

                      Der Obere Teil sieht wie folgt aus:
                      bfcbffbd-8552-4268-b5d3-59950f73830d-image.png
                      Bei den Debug-Nodes der einzelnen Geräte kommt immer folgendes:
                      e998934d-4a0d-403c-8225-37bc566023ac-image.png

                      Bei der Debug-Node 5 schreibt er folgendes:

                      {"attribute":{"id":358,"node_id":56,"instance":0,"minimum":0,"maximum":20,"current_value":0.412,"target_value":0.412,"last_value":0.438,"unit":"A","step_value":1,"editable":0,"type":193,"state":1,"last_changed":1678519354,"changed_by":1,"changed_by_id":0,"based_on":1,"data":"","name":"","options":{"history":{"day":1,"week":26,"month":6}}}}
                      

                      Aber nach meinem Verständnis, sollte doch eigentlich die "node" abgefragt werden, nicht die "attribute"

                      {"node":{"id":29,"name":"EG%20%2F%20Wohnzimmer%20%2F%20Netatmo","profile":3014,"image":"default","favorite":0,"order":42,"protocol":9,"routing":0,"state":1,"state_changed":1678428037,"added":1607519624,"history":0,"cube_type":8,"note":"","services":5,"phonetic_name":"Klima%20Wohnzimmer","owner":1,"security":0,"attributes":[{"id":253,"node_id":29,"instance":0,"minimum":0,"maximum":50,"current_value":20.6,"target_value":20.6,"last_value":20.5,"unit":"%C2%B0C","step_value":0.5,"editable":0,"type":5,"state":1,"last_changed":1678519389,"changed_by":1,"changed_by_id":0,"based_on":4,"data":"","name":"","options":{"history":{"day":1,"week":26,"month":6}}},{"id":254,"node_id":29,"instance":0,"minimum":0,"maximum":100,"current_value":33,"target_value":33,"last_value":34,"unit":"%25","step_value":1,"editable":0,"type":7,"state":1,"last_changed":1678515784,"changed_by":1,"changed_by_id":0,"based_on":4,"data":"","name":"","options":{"history":{"day":1,"week":26,"month":6}}},{"id":255,"node_id":29,"instance":0,"minimum":0,"maximum":5000,"current_value":444,"target_value":444,"last_value":449,"unit":"ppm","step_value":50,"editable":0,"type":20,"state":1,"last_changed":1678519389,"changed_by":1,"changed_by_id":0,"based_on":4,"data":"","name":"","options":{"history":{"day":1,"week":26,"month":6}}},{"id":256,"node_id":29,"instance":0,"minimum":35,"maximum":120,"current_value":32,"target_value":32,"last_value":33,"unit":"dB","step_value":1,"editable":0,"type":93,"state":1,"last_changed":1678515183,"changed_by":1,"changed_by_id":0,"based_on":4,"data":"","name":"","options":{"history":{"day":1,"week":26,"month":6}}},{"id":257,"node_id":29,"instance":0,"minimum":260,"maximum":1160,"current_value":1003.7,"target_value":1003.7,"last_value":1003.6,"unit":"mBar","step_value":5,"editable":0,"type":94,"state":1,"last_changed":1678519389,"changed_by":1,"changed_by_id":0,"based_on":4,"data":"","name":"","options":{"history":{"day":1,"week":26,"month":6}}},{"id":258,"node_id":29,"instance":0,"minimum":0,"maximum":4,"current_value":4,"target_value":4,"last_value":2,"unit":"n%2Fa","step_value":1,"editable":0,"type":33,"state":1,"last_changed":1677083197,"changed_by":1,"changed_by_id":0,"based_on":4,"data":"","name":""},{"id":475,"node_id":29,"instance":0,"minimum":0,"maximum":1,"current_value":1,"target_value":1,"last_value":0,"unit":"","step_value":1,"editable":1,"type":385,"state":1,"last_changed":0,"changed_by":0,"changed_by_id":0,"based_on":0,"data":"","name":""}]}}
                      

                      Wenn dem so ist, wo kann ich das ändern?

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

                        @oli Nein dem ist nicht so - im Gegenteil die attribute werden entfernt. - Ich denke wir haben ggf. nicht mit der gleichen Datenbasis gearbeitet.

                        8efab0f7-1139-4609-b744-702482c38db8-image.png

                        Bei mir sind also in dem Input alle 46 Geräte zu sehen.

                        54841029-86ec-4ae8-afad-b7aba5758d2c-image.png

                        Mit der Change Node - werden im Gegenteil die einzelnen attribute weggenommen.

                        Also haben wir eine unterschiedliche Ausgangsbasis. Kommen denn die Geräte einzeln an? oder insgesamt?

                        8ee40a7e-5956-4eaf-8e9e-3319270301fe-image.png

                        Ich habe halt mit der Datenbasis gearbeitet, bei der alle Geräte aufeinmal ankommen. Also im Prinzip mit dem was Du mir in der Datei aus : https://forum.iobroker.net/post/960869 geschickt hast.

                        7567a92a-cb3d-48ab-aa49-6cba35e54d49-image.png

                        Deswegen heißt mein Array auch nodes und nicht node. 😉

                        Jetzt ist halt die Frage - kannst Du das auch so machen oder müssen wir die einzelnen Geräte mühsam sammeln? Wenn die Geräte einzeln ankommen - müssen wir den Flow umändern.

                        Also sag mir, ob die Geräte sich da nun einzeln melden oder ob Du die ganze Geräteliste als Input zur Verfügung stellen kannst?

                        Im Prinzip hat der wohl die Nodes global gesammelt, da dies in der 1. Zeile der function Node so steht:

                        const nodes = global.get('homee.nodes');
                        

                        Falls dem so ist, kannst Du mal in Deinem globalen Kontext schauen, ob da die vollständigen Nodeliste drin ist 😉 ?

                        Wenn ja dann - ignorieren wir nämlich den Input und setzen die payload am Anfang auf den globalen Kontext.

                        Also schau mal, was ggf. hier in Deinem globalen Kontext drin steht:

                        a1f6d18c-4671-452d-97b9-201f47ff72dd-image.png

                        Du musst rechts auf das Aktualisieren Icon drücken.

                        Falls dem so ist, wie ich vermute, dann ist das was rein kommt in Deinen Flow nur ein trigger - den wir später auch verfeinern können.

                        Du kannst die payload - wie in der function Node auf alle Nodes setzen, wenn Du vorher noch folgende Change Node dran machst:

                        d4632383-25d5-4298-a50b-ce4de054b10d-image.png

                        die Change Node muss folgenden Inhalt haben:
                        c057e3b5-fb79-45e9-966b-c7e730bb35af-image.png

                        [
                            {
                                "id": "4bb866d9e36a197e",
                                "type": "change",
                                "z": "9c280ddf049b2b4d",
                                "name": "",
                                "rules": [
                                    {
                                        "t": "set",
                                        "p": "payload.nodes",
                                        "pt": "msg",
                                        "to": "homee.nodes",
                                        "tot": "global"
                                    }
                                ],
                                "action": "",
                                "property": "",
                                "from": "",
                                "to": "",
                                "reg": false,
                                "x": 390,
                                "y": 460,
                                "wires": [
                                    [
                                        "6f4c16eed7166074"
                                    ]
                                ]
                            }
                        ]
                        

                        Im Prinzip holen wir dann bei jedem Geräteupdate die vollständige Liste bzw. analysieren diese.

                        Im Prinzip filtert er aus, dass nur diese Ereignisse triggern:

                        if((msg.payload.node && ((msg.payload.node.state === 2)||(msg.payload.node.state === 12)))||msg.payload === true)
                        

                        das müssen wir halt nochmal schauen, ob das Sinn macht. Das bedeutet, dass momentan die Auswertung nur läuft wenn die payload nur true ist oder die payload eine Eigenschaft node hat, deren states 2 oder 12 ist.

                        Ich hoffe ich habe mich verständlich ausgedrückt. - Also setze mal die payload auf den globalen Kontext, mit der Change Node und mit den triggern überlegen wir uns noch.

                        =====================================================================================

                        So ich hab das jetzt nochmal simuliert:

                        Wenn bei Dir der globale Kontext so aussieht:

                        d1886a53-8e9d-4ba7-b1ae-9af7ac4e3abd-image.png

                        Dann sollte jetzt dieser ganze Flow funktionieren, indem Du einfach auf den trigger Knopf drückst oder auch von Deinem anderen Flow triggern lässt:

                        9f8dca57-cead-440d-aa51-e51cd450496a-image.png

                        [
                           {
                               "id": "1a49f3e7a72eeb98",
                               "type": "debug",
                               "z": "9c280ddf049b2b4d",
                               "name": "inaktive Geräte",
                               "active": false,
                               "tosidebar": true,
                               "console": false,
                               "tostatus": false,
                               "complete": "payload",
                               "targetType": "msg",
                               "statusVal": "",
                               "statusType": "auto",
                               "x": 1620,
                               "y": 620,
                               "wires": []
                           },
                           {
                               "id": "6f4c16eed7166074",
                               "type": "change",
                               "z": "9c280ddf049b2b4d",
                               "name": "decodeUrlComponents",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "payload",
                                       "pt": "msg",
                                       "to": "payload ~> |$.nodes|{\"name\":$decodeUrlComponent(name),\t\"note\":$decodeUrlComponent(note),\t\"phonetic_name\":$decodeUrlComponent(phonetic_name)},\"attributes\"|",
                                       "tot": "jsonata"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 580,
                               "y": 680,
                               "wires": [
                                   [
                                       "5c62dbd7992ee76d"
                                   ]
                               ]
                           },
                           {
                               "id": "5c62dbd7992ee76d",
                               "type": "change",
                               "z": "9c280ddf049b2b4d",
                               "name": "Alle Geräte",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "payload",
                                       "pt": "msg",
                                       "to": "payload.nodes",
                                       "tot": "msg"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 790,
                               "y": 680,
                               "wires": [
                                   [
                                       "9ed44d883152b608"
                                   ]
                               ]
                           },
                           {
                               "id": "99528e0bbb0f2491",
                               "type": "change",
                               "z": "9c280ddf049b2b4d",
                               "name": "Alle inaktiven Geräte",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "payload",
                                       "pt": "msg",
                                       "to": "payload[state = 2]",
                                       "tot": "jsonata"
                                   },
                                   {
                                       "t": "set",
                                       "p": "homee.inactive",
                                       "pt": "flow",
                                       "to": "payload",
                                       "tot": "msg"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1340,
                               "y": 680,
                               "wires": [
                                   [
                                       "1a49f3e7a72eeb98",
                                       "79c90e3a205144c8",
                                       "852a4580fa93381d"
                                   ]
                               ]
                           },
                           {
                               "id": "139fe3d8efb20402",
                               "type": "change",
                               "z": "9c280ddf049b2b4d",
                               "name": "Alle aktiven Geräte",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "payload",
                                       "pt": "msg",
                                       "to": "payload[state = 1]",
                                       "tot": "jsonata"
                                   },
                                   {
                                       "t": "set",
                                       "p": "homee.active",
                                       "pt": "flow",
                                       "to": "payload",
                                       "tot": "msg"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1330,
                               "y": 440,
                               "wires": [
                                   [
                                       "f8402a89bc3c1103",
                                       "b1946c337b7d80ef",
                                       "d95e18df200eadee"
                                   ]
                               ]
                           },
                           {
                               "id": "f8402a89bc3c1103",
                               "type": "debug",
                               "z": "9c280ddf049b2b4d",
                               "name": "aktive Geräte",
                               "active": false,
                               "tosidebar": true,
                               "console": false,
                               "tostatus": false,
                               "complete": "payload",
                               "targetType": "msg",
                               "statusVal": "",
                               "statusType": "auto",
                               "x": 1550,
                               "y": 400,
                               "wires": []
                           },
                           {
                               "id": "43f88f1028d1af0a",
                               "type": "change",
                               "z": "9c280ddf049b2b4d",
                               "name": "Geräte, die aktualisiert werden",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "payload",
                                       "pt": "msg",
                                       "to": "payload[state = 12] ",
                                       "tot": "jsonata"
                                   },
                                   {
                                       "t": "set",
                                       "p": "homee.updating",
                                       "pt": "flow",
                                       "to": "payload",
                                       "tot": "msg"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1370,
                               "y": 940,
                               "wires": [
                                   [
                                       "ceb8932892417bf3",
                                       "4e3680fd1ba7cc1e",
                                       "21b0ae03da03035d"
                                   ]
                               ]
                           },
                           {
                               "id": "ceb8932892417bf3",
                               "type": "debug",
                               "z": "9c280ddf049b2b4d",
                               "name": "Geräte die aktualisiert werden",
                               "active": false,
                               "tosidebar": true,
                               "console": false,
                               "tostatus": false,
                               "complete": "payload",
                               "targetType": "msg",
                               "statusVal": "",
                               "statusType": "auto",
                               "x": 1690,
                               "y": 880,
                               "wires": []
                           },
                           {
                               "id": "4e3680fd1ba7cc1e",
                               "type": "change",
                               "z": "9c280ddf049b2b4d",
                               "name": "Anzahl",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "payload",
                                       "pt": "msg",
                                       "to": "payload ? $count(payload) : \"Keine Geräte im Aktualisierungsstatus\"",
                                       "tot": "jsonata"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1630,
                               "y": 940,
                               "wires": [
                                   [
                                       "d629bd7188fa7121"
                                   ]
                               ]
                           },
                           {
                               "id": "d629bd7188fa7121",
                               "type": "debug",
                               "z": "9c280ddf049b2b4d",
                               "name": "Anzahl Geräte im Aktualisierungsstatus",
                               "active": false,
                               "tosidebar": true,
                               "console": false,
                               "tostatus": false,
                               "complete": "payload",
                               "targetType": "msg",
                               "statusVal": "",
                               "statusType": "auto",
                               "x": 1880,
                               "y": 940,
                               "wires": []
                           },
                           {
                               "id": "79c90e3a205144c8",
                               "type": "change",
                               "z": "9c280ddf049b2b4d",
                               "name": "Anzahl",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "payload",
                                       "pt": "msg",
                                       "to": "payload ? $count(payload) : \"Keine Geräte im Aktualisierungsstatus\"",
                                       "tot": "jsonata"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1610,
                               "y": 680,
                               "wires": [
                                   [
                                       "6636132bd627fd5a"
                                   ]
                               ]
                           },
                           {
                               "id": "6636132bd627fd5a",
                               "type": "debug",
                               "z": "9c280ddf049b2b4d",
                               "name": "Anzahl inaktive Geräte",
                               "active": false,
                               "tosidebar": true,
                               "console": false,
                               "tostatus": false,
                               "complete": "payload",
                               "targetType": "msg",
                               "statusVal": "",
                               "statusType": "auto",
                               "x": 1800,
                               "y": 680,
                               "wires": []
                           },
                           {
                               "id": "b1946c337b7d80ef",
                               "type": "change",
                               "z": "9c280ddf049b2b4d",
                               "name": "Anzahl",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "payload",
                                       "pt": "msg",
                                       "to": "payload ? $count(payload) : \"Keine Geräte im Aktualisierungsstatus\"",
                                       "tot": "jsonata"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1550,
                               "y": 440,
                               "wires": [
                                   [
                                       "1871f120aa223a8d"
                                   ]
                               ]
                           },
                           {
                               "id": "1871f120aa223a8d",
                               "type": "debug",
                               "z": "9c280ddf049b2b4d",
                               "name": "Anzahl aktiver Geräte",
                               "active": false,
                               "tosidebar": true,
                               "console": false,
                               "tostatus": false,
                               "complete": "payload",
                               "targetType": "msg",
                               "statusVal": "",
                               "statusType": "auto",
                               "x": 1740,
                               "y": 440,
                               "wires": []
                           },
                           {
                               "id": "d95e18df200eadee",
                               "type": "change",
                               "z": "9c280ddf049b2b4d",
                               "name": "Namen",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "payload",
                                       "pt": "msg",
                                       "to": "payload.phonetic_name",
                                       "tot": "jsonata"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1540,
                               "y": 500,
                               "wires": [
                                   [
                                       "ae2e5ba148bb399a"
                                   ]
                               ]
                           },
                           {
                               "id": "ae2e5ba148bb399a",
                               "type": "debug",
                               "z": "9c280ddf049b2b4d",
                               "name": "Namen aktiver Geräte (Phoenetic Name)",
                               "active": false,
                               "tosidebar": true,
                               "console": false,
                               "tostatus": false,
                               "complete": "payload",
                               "targetType": "msg",
                               "statusVal": "",
                               "statusType": "auto",
                               "x": 1820,
                               "y": 540,
                               "wires": []
                           },
                           {
                               "id": "852a4580fa93381d",
                               "type": "change",
                               "z": "9c280ddf049b2b4d",
                               "name": "Namen",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "payload",
                                       "pt": "msg",
                                       "to": "payload.phonetic_name",
                                       "tot": "jsonata"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1620,
                               "y": 740,
                               "wires": [
                                   [
                                       "43f62f9f3bc5bc3d"
                                   ]
                               ]
                           },
                           {
                               "id": "43f62f9f3bc5bc3d",
                               "type": "debug",
                               "z": "9c280ddf049b2b4d",
                               "name": "Namen inaktiver Geräte (Phoenetic Name)",
                               "active": false,
                               "tosidebar": true,
                               "console": false,
                               "tostatus": false,
                               "complete": "payload",
                               "targetType": "msg",
                               "statusVal": "",
                               "statusType": "auto",
                               "x": 1910,
                               "y": 740,
                               "wires": []
                           },
                           {
                               "id": "21b0ae03da03035d",
                               "type": "change",
                               "z": "9c280ddf049b2b4d",
                               "name": "Namen",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "payload",
                                       "pt": "msg",
                                       "to": "payload.phonetic_name",
                                       "tot": "jsonata"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1640,
                               "y": 1000,
                               "wires": [
                                   [
                                       "02eb40a627f4e90d"
                                   ]
                               ]
                           },
                           {
                               "id": "02eb40a627f4e90d",
                               "type": "debug",
                               "z": "9c280ddf049b2b4d",
                               "name": "Namen aktualisierende Geräte (Phoenetic Name)",
                               "active": false,
                               "tosidebar": true,
                               "console": false,
                               "tostatus": false,
                               "complete": "payload",
                               "targetType": "msg",
                               "statusVal": "",
                               "statusType": "auto",
                               "x": 1950,
                               "y": 1000,
                               "wires": []
                           },
                           {
                               "id": "9ed44d883152b608",
                               "type": "change",
                               "z": "9c280ddf049b2b4d",
                               "name": "Geräte ausschliessen",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "payload",
                                       "pt": "msg",
                                       "to": "payload ~> $filter(function($value){$value.id in [-1] != true})",
                                       "tot": "jsonata"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1000,
                               "y": 680,
                               "wires": [
                                   [
                                       "bc383b50669e8145"
                                   ]
                               ]
                           },
                           {
                               "id": "8295d28d57fdb5f9",
                               "type": "inject",
                               "z": "9c280ddf049b2b4d",
                               "name": "Trigger Report",
                               "props": [
                                   {
                                       "p": "payload"
                                   }
                               ],
                               "repeat": "",
                               "crontab": "",
                               "once": false,
                               "onceDelay": 0.1,
                               "topic": "",
                               "payload": "",
                               "payloadType": "date",
                               "x": 250,
                               "y": 1140,
                               "wires": [
                                   [
                                       "bb70522cf511b632"
                                   ]
                               ]
                           },
                           {
                               "id": "bb70522cf511b632",
                               "type": "change",
                               "z": "9c280ddf049b2b4d",
                               "name": "",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "payload",
                                       "pt": "msg",
                                       "to": "homee",
                                       "tot": "flow"
                                   },
                                   {
                                       "t": "set",
                                       "p": "payload",
                                       "pt": "msg",
                                       "to": "{\t   \"active\" : {\t       \"count\": payload.active ? $count(payload.active): 0,\t       \"names\" :  payload.active ?  $join(payload.active.phonetic_name,\"\\n\") : \"Keine aktiven Geräte vorhanden\"\t   },\t   \"inactive\" : {\t       \"count\": payload.inactive ? $count(payload.inactive): 0,\t        \"names\" :  payload.inactive ?  $join(payload.inactive.phonetic_name,\"\\n\") : \"Keine inaktiven Geräte vorhanden\"\t   },\t   \"updating\" : {\t       \"count\": payload.updating ? $count(payload.inactive): 0,\t        \"names\" :  payload.updating ?  $join(payload.updating.phonetic_name,\"\\n\") : \"Keine Geräte im Aktualisierungsstatus\"\t   },\t   \"summary\" : payload.updating or payload.inactive ? \"Nicht alle Geräte bereit!\" : \"Alle Geräte aktiv\"\t}",
                                       "tot": "jsonata"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 470,
                               "y": 1200,
                               "wires": [
                                   [
                                       "886c19b24989ed4d",
                                       "a76c7c09a28be0d6",
                                       "f422b5bcbb03ca87",
                                       "5ea7fcec46176042"
                                   ]
                               ]
                           },
                           {
                               "id": "886c19b24989ed4d",
                               "type": "template",
                               "z": "9c280ddf049b2b4d",
                               "name": "",
                               "field": "payload",
                               "fieldType": "msg",
                               "format": "html",
                               "syntax": "mustache",
                               "template": "<!DOCTYPE html>\n<html>\n\n<body>\n<h1>Status der Geräte:</h1>\n\n<h3>aktive Geräte: {{payload.active.count}}\n<pre>{{payload.active.names}}</pre>\n\n<h3>inaktive Geräte: {{payload.inactive.count}}\n<pre>{{payload.inactive.names}}</pre>\n\n<h3>aktualisierende Geräte: {{payload.updating.count}}\n<pre>{{payload.updating.names}}</pre>\n\n<h3>{{payload.summary}}</h3>\n</body>\n</html>",
                               "output": "str",
                               "x": 700,
                               "y": 1200,
                               "wires": [
                                   [
                                       "e9df565834fa1f46"
                                   ]
                               ]
                           },
                           {
                               "id": "ea538b90d2d339e0",
                               "type": "file",
                               "z": "9c280ddf049b2b4d",
                               "name": "",
                               "filename": "filename",
                               "filenameType": "msg",
                               "appendNewline": false,
                               "createDir": false,
                               "overwriteFile": "true",
                               "encoding": "none",
                               "x": 1120,
                               "y": 1200,
                               "wires": [
                                   []
                               ]
                           },
                           {
                               "id": "e9df565834fa1f46",
                               "type": "change",
                               "z": "9c280ddf049b2b4d",
                               "name": "",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "filename",
                                       "pt": "msg",
                                       "to": "/home/iobroker/homee-report.html",
                                       "tot": "str"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 910,
                               "y": 1200,
                               "wires": [
                                   [
                                       "ea538b90d2d339e0"
                                   ]
                               ]
                           },
                           {
                               "id": "a76c7c09a28be0d6",
                               "type": "switch",
                               "z": "9c280ddf049b2b4d",
                               "name": "",
                               "property": "payload.summary",
                               "propertyType": "msg",
                               "rules": [
                                   {
                                       "t": "neq",
                                       "v": "Alle Geräte aktiv",
                                       "vt": "str"
                                   }
                               ],
                               "checkall": "true",
                               "repair": false,
                               "outputs": 1,
                               "x": 690,
                               "y": 1280,
                               "wires": [
                                   [
                                       "d8673a8fe1b1dfc2"
                                   ]
                               ]
                           },
                           {
                               "id": "48226cba37067157",
                               "type": "debug",
                               "z": "9c280ddf049b2b4d",
                               "name": "Warnung ausgeben - wenn nicht alle Geräte aktiv",
                               "active": false,
                               "tosidebar": true,
                               "console": false,
                               "tostatus": false,
                               "complete": "payload",
                               "targetType": "msg",
                               "statusVal": "",
                               "statusType": "auto",
                               "x": 1190,
                               "y": 1280,
                               "wires": []
                           },
                           {
                               "id": "d8673a8fe1b1dfc2",
                               "type": "change",
                               "z": "9c280ddf049b2b4d",
                               "name": "",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "payload",
                                       "pt": "msg",
                                       "to": "payload.summary",
                                       "tot": "msg"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 870,
                               "y": 1280,
                               "wires": [
                                   [
                                       "48226cba37067157"
                                   ]
                               ]
                           },
                           {
                               "id": "f99cd78780beb8e7",
                               "type": "ioBroker in",
                               "z": "9c280ddf049b2b4d",
                               "name": "start",
                               "topic": "0_userdata.0.System.homee.StartGeräteinfo",
                               "payloadType": "value",
                               "onlyack": "",
                               "func": "all",
                               "gap": "",
                               "fireOnStart": "false",
                               "outFormat": "MQTT",
                               "x": 230,
                               "y": 1200,
                               "wires": [
                                   [
                                       "bb70522cf511b632"
                                   ]
                               ]
                           },
                           {
                               "id": "f422b5bcbb03ca87",
                               "type": "change",
                               "z": "9c280ddf049b2b4d",
                               "name": "Anzahl nicht aktiver Geräte",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "payload",
                                       "pt": "msg",
                                       "to": "payload.inactive.count + payload.updating.count",
                                       "tot": "jsonata"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 760,
                               "y": 1360,
                               "wires": [
                                   [
                                       "8b40e4fbe4ba993d"
                                   ]
                               ]
                           },
                           {
                               "id": "8b40e4fbe4ba993d",
                               "type": "debug",
                               "z": "9c280ddf049b2b4d",
                               "name": "Nicht aktive Geräte (updating oder inaktiv)",
                               "active": false,
                               "tosidebar": true,
                               "console": false,
                               "tostatus": false,
                               "complete": "payload",
                               "targetType": "msg",
                               "statusVal": "",
                               "statusType": "auto",
                               "x": 1100,
                               "y": 1360,
                               "wires": []
                           },
                           {
                               "id": "4bb866d9e36a197e",
                               "type": "change",
                               "z": "9c280ddf049b2b4d",
                               "name": "hole alle Geräte",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "payload",
                                       "pt": "msg",
                                       "to": "homee",
                                       "tot": "global"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 340,
                               "y": 680,
                               "wires": [
                                   [
                                       "6f4c16eed7166074"
                                   ]
                               ]
                           },
                           {
                               "id": "a48d4a225b9f0daa",
                               "type": "inject",
                               "z": "9c280ddf049b2b4d",
                               "name": "trigger",
                               "props": [
                                   {
                                       "p": "payload"
                                   }
                               ],
                               "repeat": "",
                               "crontab": "",
                               "once": false,
                               "onceDelay": 0.1,
                               "topic": "",
                               "payload": "true",
                               "payloadType": "bool",
                               "x": 170,
                               "y": 680,
                               "wires": [
                                   [
                                       "4bb866d9e36a197e"
                                   ]
                               ]
                           },
                           {
                               "id": "5ea7fcec46176042",
                               "type": "debug",
                               "z": "9c280ddf049b2b4d",
                               "name": "Zusammenfassung",
                               "active": true,
                               "tosidebar": true,
                               "console": false,
                               "tostatus": false,
                               "complete": "payload",
                               "targetType": "msg",
                               "statusVal": "",
                               "statusType": "auto",
                               "x": 730,
                               "y": 1140,
                               "wires": []
                           },
                           {
                               "id": "bc383b50669e8145",
                               "type": "junction",
                               "z": "9c280ddf049b2b4d",
                               "x": 1160,
                               "y": 680,
                               "wires": [
                                   [
                                       "43f88f1028d1af0a",
                                       "99528e0bbb0f2491",
                                       "139fe3d8efb20402"
                                   ]
                               ]
                           }
                        ]
                        

                        Wenn Du dann unten den Trigger Report anklickst - dann solltest Du im Debug Fenster folgende Daten erhalten:

                        {
                          "active": {
                            "count": 44,
                            "names": "Bewegungsmelder Kirsten\nBewegungsmelder Oliver\nLuftreiniger\nNachtlicht TV\nNachtlicht Kirsten\n\nNachtlicht Oliver\nHeizung Wohnzimmer Balkon\nWaschmaschine\nMultimedia\nRauchmelder Flur Dachgeschoss\nRauchmelder Flur Erdgeschoss\nRauchmelder Flur Keller\nFenster Bad\nBalkontür Esszimmer\nBalkontür Wohnzimmer\nFenster Toilette\nFenster Büro Rechts\nFenster Büro Links\nSchlafzimmer Rauchmelder\nRauchmelder Schlafzimmer Keller\nHeizung Büro\nVitrine Wohnzimmer\nTemperatur Weinkühlschrank\nHeizung Wohnzimmer Links\nSchrank Wohnzimmer\nHeizung Esszimmer\nHeizung Toilette\nWeinschrank Wohnzimmer\nThermostat Wohnzimmer\nComputer\nKühlschrank\nGeschirrspüler\nWassersensor Küche\nHeizung Bad\nKlima Wohnzimmer\nKlima Balkon\nKlima Büro\nKlima Schlafzimmer\nKlimaanlage\nTablet\nStehlampe Wohnzimmer\nBar Wohnzimmer\nTemperatur Kühlschrank"
                          },
                          "inactive": {
                            "count": 1,
                            "names": "Licht Glasvitrine Flur"
                          },
                          "updating": {
                            "count": 0,
                            "names": "Keine Geräte im Aktualisierungsstatus"
                          },
                          "summary": "Nicht alle Geräte bereit!"
                        }
                        
                        O 1 Reply Last reply Reply Quote 0
                        • O
                          Oli @mickym last edited by

                          @mickym
                          sieht bei mir so aus:
                          8530fe35-e32b-4bb1-a6a2-fa6ab5dc4ca2-image.png

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

                            @oli Ok - dann lass mich noch eine kleine Modifikation machen. 😉

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

                              @oli sagte in Benötige Hilfe mit Node-Red in Verbindung mit homee:

                              @mickym
                              sieht bei mir so aus:
                              8530fe35-e32b-4bb1-a6a2-fa6ab5dc4ca2-image.png

                              Wobei es jetzt eigentlich bei Dir schon gehen sollte, weil ich Deinen Flow Kontext sehe. 😉

                              so hier nochmal der gesamte Flow:

                              [
                                 {
                                     "id": "1a49f3e7a72eeb98",
                                     "type": "debug",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "inaktive Geräte",
                                     "active": false,
                                     "tosidebar": true,
                                     "console": false,
                                     "tostatus": false,
                                     "complete": "payload",
                                     "targetType": "msg",
                                     "statusVal": "",
                                     "statusType": "auto",
                                     "x": 1620,
                                     "y": 620,
                                     "wires": []
                                 },
                                 {
                                     "id": "6f4c16eed7166074",
                                     "type": "change",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "decodeUrlComponents",
                                     "rules": [
                                         {
                                             "t": "set",
                                             "p": "payload",
                                             "pt": "msg",
                                             "to": "payload ~> |$.nodes|{\"name\":$decodeUrlComponent(name),\t\"note\":$decodeUrlComponent(note),\t\"phonetic_name\":$decodeUrlComponent(phonetic_name)},\"attributes\"|",
                                             "tot": "jsonata"
                                         }
                                     ],
                                     "action": "",
                                     "property": "",
                                     "from": "",
                                     "to": "",
                                     "reg": false,
                                     "x": 580,
                                     "y": 680,
                                     "wires": [
                                         [
                                             "5c62dbd7992ee76d"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "5c62dbd7992ee76d",
                                     "type": "change",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "Alle Geräte",
                                     "rules": [
                                         {
                                             "t": "set",
                                             "p": "payload",
                                             "pt": "msg",
                                             "to": "payload.nodes",
                                             "tot": "msg"
                                         }
                                     ],
                                     "action": "",
                                     "property": "",
                                     "from": "",
                                     "to": "",
                                     "reg": false,
                                     "x": 790,
                                     "y": 680,
                                     "wires": [
                                         [
                                             "9ed44d883152b608"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "99528e0bbb0f2491",
                                     "type": "change",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "Alle inaktiven Geräte",
                                     "rules": [
                                         {
                                             "t": "set",
                                             "p": "payload",
                                             "pt": "msg",
                                             "to": "payload[state = 2]",
                                             "tot": "jsonata"
                                         },
                                         {
                                             "t": "set",
                                             "p": "homee.inactive",
                                             "pt": "flow",
                                             "to": "payload",
                                             "tot": "msg"
                                         }
                                     ],
                                     "action": "",
                                     "property": "",
                                     "from": "",
                                     "to": "",
                                     "reg": false,
                                     "x": 1340,
                                     "y": 680,
                                     "wires": [
                                         [
                                             "1a49f3e7a72eeb98",
                                             "79c90e3a205144c8",
                                             "852a4580fa93381d"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "139fe3d8efb20402",
                                     "type": "change",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "Alle aktiven Geräte",
                                     "rules": [
                                         {
                                             "t": "set",
                                             "p": "payload",
                                             "pt": "msg",
                                             "to": "payload[state = 1]",
                                             "tot": "jsonata"
                                         },
                                         {
                                             "t": "set",
                                             "p": "homee.active",
                                             "pt": "flow",
                                             "to": "payload",
                                             "tot": "msg"
                                         }
                                     ],
                                     "action": "",
                                     "property": "",
                                     "from": "",
                                     "to": "",
                                     "reg": false,
                                     "x": 1330,
                                     "y": 440,
                                     "wires": [
                                         [
                                             "f8402a89bc3c1103",
                                             "b1946c337b7d80ef",
                                             "d95e18df200eadee"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "f8402a89bc3c1103",
                                     "type": "debug",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "aktive Geräte",
                                     "active": false,
                                     "tosidebar": true,
                                     "console": false,
                                     "tostatus": false,
                                     "complete": "payload",
                                     "targetType": "msg",
                                     "statusVal": "",
                                     "statusType": "auto",
                                     "x": 1550,
                                     "y": 400,
                                     "wires": []
                                 },
                                 {
                                     "id": "43f88f1028d1af0a",
                                     "type": "change",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "Geräte, die aktualisiert werden",
                                     "rules": [
                                         {
                                             "t": "set",
                                             "p": "payload",
                                             "pt": "msg",
                                             "to": "payload[state = 12] ",
                                             "tot": "jsonata"
                                         },
                                         {
                                             "t": "set",
                                             "p": "homee.updating",
                                             "pt": "flow",
                                             "to": "payload",
                                             "tot": "msg"
                                         }
                                     ],
                                     "action": "",
                                     "property": "",
                                     "from": "",
                                     "to": "",
                                     "reg": false,
                                     "x": 1370,
                                     "y": 940,
                                     "wires": [
                                         [
                                             "ceb8932892417bf3",
                                             "4e3680fd1ba7cc1e",
                                             "21b0ae03da03035d"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "ceb8932892417bf3",
                                     "type": "debug",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "Geräte die aktualisiert werden",
                                     "active": false,
                                     "tosidebar": true,
                                     "console": false,
                                     "tostatus": false,
                                     "complete": "payload",
                                     "targetType": "msg",
                                     "statusVal": "",
                                     "statusType": "auto",
                                     "x": 1690,
                                     "y": 880,
                                     "wires": []
                                 },
                                 {
                                     "id": "4e3680fd1ba7cc1e",
                                     "type": "change",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "Anzahl",
                                     "rules": [
                                         {
                                             "t": "set",
                                             "p": "payload",
                                             "pt": "msg",
                                             "to": "payload ? $count(payload) : \"Keine Geräte im Aktualisierungsstatus\"",
                                             "tot": "jsonata"
                                         }
                                     ],
                                     "action": "",
                                     "property": "",
                                     "from": "",
                                     "to": "",
                                     "reg": false,
                                     "x": 1630,
                                     "y": 940,
                                     "wires": [
                                         [
                                             "d629bd7188fa7121"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "d629bd7188fa7121",
                                     "type": "debug",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "Anzahl Geräte im Aktualisierungsstatus",
                                     "active": false,
                                     "tosidebar": true,
                                     "console": false,
                                     "tostatus": false,
                                     "complete": "payload",
                                     "targetType": "msg",
                                     "statusVal": "",
                                     "statusType": "auto",
                                     "x": 1880,
                                     "y": 940,
                                     "wires": []
                                 },
                                 {
                                     "id": "79c90e3a205144c8",
                                     "type": "change",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "Anzahl",
                                     "rules": [
                                         {
                                             "t": "set",
                                             "p": "payload",
                                             "pt": "msg",
                                             "to": "payload ? $count(payload) : \"Keine Geräte im Aktualisierungsstatus\"",
                                             "tot": "jsonata"
                                         }
                                     ],
                                     "action": "",
                                     "property": "",
                                     "from": "",
                                     "to": "",
                                     "reg": false,
                                     "x": 1610,
                                     "y": 680,
                                     "wires": [
                                         [
                                             "6636132bd627fd5a"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "6636132bd627fd5a",
                                     "type": "debug",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "Anzahl inaktive Geräte",
                                     "active": false,
                                     "tosidebar": true,
                                     "console": false,
                                     "tostatus": false,
                                     "complete": "payload",
                                     "targetType": "msg",
                                     "statusVal": "",
                                     "statusType": "auto",
                                     "x": 1800,
                                     "y": 680,
                                     "wires": []
                                 },
                                 {
                                     "id": "b1946c337b7d80ef",
                                     "type": "change",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "Anzahl",
                                     "rules": [
                                         {
                                             "t": "set",
                                             "p": "payload",
                                             "pt": "msg",
                                             "to": "payload ? $count(payload) : \"Keine Geräte im Aktualisierungsstatus\"",
                                             "tot": "jsonata"
                                         }
                                     ],
                                     "action": "",
                                     "property": "",
                                     "from": "",
                                     "to": "",
                                     "reg": false,
                                     "x": 1550,
                                     "y": 440,
                                     "wires": [
                                         [
                                             "1871f120aa223a8d"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "1871f120aa223a8d",
                                     "type": "debug",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "Anzahl aktiver Geräte",
                                     "active": false,
                                     "tosidebar": true,
                                     "console": false,
                                     "tostatus": false,
                                     "complete": "payload",
                                     "targetType": "msg",
                                     "statusVal": "",
                                     "statusType": "auto",
                                     "x": 1740,
                                     "y": 440,
                                     "wires": []
                                 },
                                 {
                                     "id": "d95e18df200eadee",
                                     "type": "change",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "Namen",
                                     "rules": [
                                         {
                                             "t": "set",
                                             "p": "payload",
                                             "pt": "msg",
                                             "to": "payload.phonetic_name",
                                             "tot": "jsonata"
                                         }
                                     ],
                                     "action": "",
                                     "property": "",
                                     "from": "",
                                     "to": "",
                                     "reg": false,
                                     "x": 1540,
                                     "y": 500,
                                     "wires": [
                                         [
                                             "ae2e5ba148bb399a"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "ae2e5ba148bb399a",
                                     "type": "debug",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "Namen aktiver Geräte (Phoenetic Name)",
                                     "active": false,
                                     "tosidebar": true,
                                     "console": false,
                                     "tostatus": false,
                                     "complete": "payload",
                                     "targetType": "msg",
                                     "statusVal": "",
                                     "statusType": "auto",
                                     "x": 1820,
                                     "y": 540,
                                     "wires": []
                                 },
                                 {
                                     "id": "852a4580fa93381d",
                                     "type": "change",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "Namen",
                                     "rules": [
                                         {
                                             "t": "set",
                                             "p": "payload",
                                             "pt": "msg",
                                             "to": "payload.phonetic_name",
                                             "tot": "jsonata"
                                         }
                                     ],
                                     "action": "",
                                     "property": "",
                                     "from": "",
                                     "to": "",
                                     "reg": false,
                                     "x": 1620,
                                     "y": 740,
                                     "wires": [
                                         [
                                             "43f62f9f3bc5bc3d"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "43f62f9f3bc5bc3d",
                                     "type": "debug",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "Namen inaktiver Geräte (Phoenetic Name)",
                                     "active": false,
                                     "tosidebar": true,
                                     "console": false,
                                     "tostatus": false,
                                     "complete": "payload",
                                     "targetType": "msg",
                                     "statusVal": "",
                                     "statusType": "auto",
                                     "x": 1910,
                                     "y": 740,
                                     "wires": []
                                 },
                                 {
                                     "id": "21b0ae03da03035d",
                                     "type": "change",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "Namen",
                                     "rules": [
                                         {
                                             "t": "set",
                                             "p": "payload",
                                             "pt": "msg",
                                             "to": "payload.phonetic_name",
                                             "tot": "jsonata"
                                         }
                                     ],
                                     "action": "",
                                     "property": "",
                                     "from": "",
                                     "to": "",
                                     "reg": false,
                                     "x": 1640,
                                     "y": 1000,
                                     "wires": [
                                         [
                                             "02eb40a627f4e90d"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "02eb40a627f4e90d",
                                     "type": "debug",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "Namen aktualisierende Geräte (Phoenetic Name)",
                                     "active": false,
                                     "tosidebar": true,
                                     "console": false,
                                     "tostatus": false,
                                     "complete": "payload",
                                     "targetType": "msg",
                                     "statusVal": "",
                                     "statusType": "auto",
                                     "x": 1950,
                                     "y": 1000,
                                     "wires": []
                                 },
                                 {
                                     "id": "9ed44d883152b608",
                                     "type": "change",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "Geräte ausschliessen",
                                     "rules": [
                                         {
                                             "t": "set",
                                             "p": "payload",
                                             "pt": "msg",
                                             "to": "payload ~> $filter(function($value){$value.id in [-1] != true})",
                                             "tot": "jsonata"
                                         }
                                     ],
                                     "action": "",
                                     "property": "",
                                     "from": "",
                                     "to": "",
                                     "reg": false,
                                     "x": 1000,
                                     "y": 680,
                                     "wires": [
                                         [
                                             "bc383b50669e8145"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "8295d28d57fdb5f9",
                                     "type": "inject",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "Trigger Report",
                                     "props": [
                                         {
                                             "p": "payload"
                                         }
                                     ],
                                     "repeat": "",
                                     "crontab": "",
                                     "once": false,
                                     "onceDelay": 0.1,
                                     "topic": "",
                                     "payload": "",
                                     "payloadType": "date",
                                     "x": 250,
                                     "y": 1140,
                                     "wires": [
                                         [
                                             "bb70522cf511b632"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "bb70522cf511b632",
                                     "type": "change",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "",
                                     "rules": [
                                         {
                                             "t": "set",
                                             "p": "payload",
                                             "pt": "msg",
                                             "to": "homee",
                                             "tot": "flow"
                                         },
                                         {
                                             "t": "set",
                                             "p": "payload",
                                             "pt": "msg",
                                             "to": "{\t   \"active\" : {\t       \"count\": payload.active ? $count(payload.active): 0,\t       \"names\" :  payload.active ?  $join(payload.active.phonetic_name,\"\\n\") : \"Keine aktiven Geräte vorhanden\"\t   },\t   \"inactive\" : {\t       \"count\": payload.inactive ? $count(payload.inactive): 0,\t        \"names\" :  payload.inactive ?  $join(payload.inactive.phonetic_name,\"\\n\") : \"Keine inaktiven Geräte vorhanden\"\t   },\t   \"updating\" : {\t       \"count\": payload.updating ? $count(payload.inactive): 0,\t        \"names\" :  payload.updating ?  $join(payload.updating.phonetic_name,\"\\n\") : \"Keine Geräte im Aktualisierungsstatus\"\t   },\t   \"summary\" : payload.updating or payload.inactive ? \"Nicht alle Geräte bereit!\" : \"Alle Geräte aktiv\"\t}",
                                             "tot": "jsonata"
                                         }
                                     ],
                                     "action": "",
                                     "property": "",
                                     "from": "",
                                     "to": "",
                                     "reg": false,
                                     "x": 470,
                                     "y": 1200,
                                     "wires": [
                                         [
                                             "886c19b24989ed4d",
                                             "a76c7c09a28be0d6",
                                             "f422b5bcbb03ca87",
                                             "5ea7fcec46176042"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "886c19b24989ed4d",
                                     "type": "template",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "",
                                     "field": "payload",
                                     "fieldType": "msg",
                                     "format": "html",
                                     "syntax": "mustache",
                                     "template": "<!DOCTYPE html>\n<html>\n\n<body>\n<h1>Status der Geräte:</h1>\n\n<h3>aktive Geräte: {{payload.active.count}}\n<pre>{{payload.active.names}}</pre>\n\n<h3>inaktive Geräte: {{payload.inactive.count}}\n<pre>{{payload.inactive.names}}</pre>\n\n<h3>aktualisierende Geräte: {{payload.updating.count}}\n<pre>{{payload.updating.names}}</pre>\n\n<h3>{{payload.summary}}</h3>\n</body>\n</html>",
                                     "output": "str",
                                     "x": 700,
                                     "y": 1200,
                                     "wires": [
                                         [
                                             "e9df565834fa1f46"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "ea538b90d2d339e0",
                                     "type": "file",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "",
                                     "filename": "filename",
                                     "filenameType": "msg",
                                     "appendNewline": false,
                                     "createDir": false,
                                     "overwriteFile": "true",
                                     "encoding": "none",
                                     "x": 1120,
                                     "y": 1200,
                                     "wires": [
                                         []
                                     ]
                                 },
                                 {
                                     "id": "e9df565834fa1f46",
                                     "type": "change",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "",
                                     "rules": [
                                         {
                                             "t": "set",
                                             "p": "filename",
                                             "pt": "msg",
                                             "to": "/home/iobroker/homee-report.html",
                                             "tot": "str"
                                         }
                                     ],
                                     "action": "",
                                     "property": "",
                                     "from": "",
                                     "to": "",
                                     "reg": false,
                                     "x": 910,
                                     "y": 1200,
                                     "wires": [
                                         [
                                             "ea538b90d2d339e0"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "a76c7c09a28be0d6",
                                     "type": "switch",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "",
                                     "property": "payload.summary",
                                     "propertyType": "msg",
                                     "rules": [
                                         {
                                             "t": "neq",
                                             "v": "Alle Geräte aktiv",
                                             "vt": "str"
                                         }
                                     ],
                                     "checkall": "true",
                                     "repair": false,
                                     "outputs": 1,
                                     "x": 690,
                                     "y": 1280,
                                     "wires": [
                                         [
                                             "d8673a8fe1b1dfc2"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "48226cba37067157",
                                     "type": "debug",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "Warnung ausgeben - wenn nicht alle Geräte aktiv",
                                     "active": false,
                                     "tosidebar": true,
                                     "console": false,
                                     "tostatus": false,
                                     "complete": "payload",
                                     "targetType": "msg",
                                     "statusVal": "",
                                     "statusType": "auto",
                                     "x": 1190,
                                     "y": 1280,
                                     "wires": []
                                 },
                                 {
                                     "id": "d8673a8fe1b1dfc2",
                                     "type": "change",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "",
                                     "rules": [
                                         {
                                             "t": "set",
                                             "p": "payload",
                                             "pt": "msg",
                                             "to": "payload.summary",
                                             "tot": "msg"
                                         }
                                     ],
                                     "action": "",
                                     "property": "",
                                     "from": "",
                                     "to": "",
                                     "reg": false,
                                     "x": 870,
                                     "y": 1280,
                                     "wires": [
                                         [
                                             "48226cba37067157"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "f99cd78780beb8e7",
                                     "type": "ioBroker in",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "start",
                                     "topic": "0_userdata.0.System.homee.StartGeräteinfo",
                                     "payloadType": "value",
                                     "onlyack": "",
                                     "func": "all",
                                     "gap": "",
                                     "fireOnStart": "false",
                                     "outFormat": "MQTT",
                                     "x": 230,
                                     "y": 1200,
                                     "wires": [
                                         [
                                             "bb70522cf511b632"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "f422b5bcbb03ca87",
                                     "type": "change",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "Anzahl nicht aktiver Geräte",
                                     "rules": [
                                         {
                                             "t": "set",
                                             "p": "payload",
                                             "pt": "msg",
                                             "to": "payload.inactive.count + payload.updating.count",
                                             "tot": "jsonata"
                                         }
                                     ],
                                     "action": "",
                                     "property": "",
                                     "from": "",
                                     "to": "",
                                     "reg": false,
                                     "x": 760,
                                     "y": 1360,
                                     "wires": [
                                         [
                                             "8b40e4fbe4ba993d"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "8b40e4fbe4ba993d",
                                     "type": "debug",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "Nicht aktive Geräte (updating oder inaktiv)",
                                     "active": false,
                                     "tosidebar": true,
                                     "console": false,
                                     "tostatus": false,
                                     "complete": "payload",
                                     "targetType": "msg",
                                     "statusVal": "",
                                     "statusType": "auto",
                                     "x": 1100,
                                     "y": 1360,
                                     "wires": []
                                 },
                                 {
                                     "id": "4bb866d9e36a197e",
                                     "type": "change",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "hole alle Geräte",
                                     "rules": [
                                         {
                                             "t": "set",
                                             "p": "payload",
                                             "pt": "msg",
                                             "to": "{}",
                                             "tot": "json"
                                         },
                                         {
                                             "t": "set",
                                             "p": "payload.nodes",
                                             "pt": "msg",
                                             "to": "homee.nodes",
                                             "tot": "global"
                                         }
                                     ],
                                     "action": "",
                                     "property": "",
                                     "from": "",
                                     "to": "",
                                     "reg": false,
                                     "x": 340,
                                     "y": 680,
                                     "wires": [
                                         [
                                             "6f4c16eed7166074"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "a48d4a225b9f0daa",
                                     "type": "inject",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "trigger",
                                     "props": [
                                         {
                                             "p": "payload"
                                         }
                                     ],
                                     "repeat": "",
                                     "crontab": "",
                                     "once": false,
                                     "onceDelay": 0.1,
                                     "topic": "",
                                     "payload": "true",
                                     "payloadType": "bool",
                                     "x": 170,
                                     "y": 680,
                                     "wires": [
                                         [
                                             "4bb866d9e36a197e"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "5ea7fcec46176042",
                                     "type": "debug",
                                     "z": "9c280ddf049b2b4d",
                                     "name": "Zusammenfassung",
                                     "active": true,
                                     "tosidebar": true,
                                     "console": false,
                                     "tostatus": false,
                                     "complete": "payload",
                                     "targetType": "msg",
                                     "statusVal": "",
                                     "statusType": "auto",
                                     "x": 730,
                                     "y": 1140,
                                     "wires": []
                                 },
                                 {
                                     "id": "bc383b50669e8145",
                                     "type": "junction",
                                     "z": "9c280ddf049b2b4d",
                                     "x": 1160,
                                     "y": 680,
                                     "wires": [
                                         [
                                             "43f88f1028d1af0a",
                                             "99528e0bbb0f2491",
                                             "139fe3d8efb20402"
                                         ]
                                     ]
                                 }
                              ]
                              

                              Im Wesentlichen holen wir nun nur aus dem globalen Kontext die gesamte Geräteliste:
                              7491a10f-9221-446e-ae40-a11f4e7b8252-image.png

                              Ist halt immer bissi schwierig, wenn man sich halt mit den Daten die Realität zusammensimulieren muss, aber sollte nun eigentlich passen.

                              Wie gesagt wir müssen uns ggf. halt nur über den Trigger unterhalten. Vielleicht langt es da auch wenn Du mit deinem VIS Datenpunkt triggerst - da die globale Geräteliste ja bereits erstellt wird.

                              O 1 Reply Last reply Reply Quote 1
                              • O
                                Oli @mickym last edited by

                                @mickym
                                super, jetzt funktioniert es 🙂

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

                                  @oli sagte in Benötige Hilfe mit Node-Red in Verbindung mit homee:

                                  @mickym
                                  super, jetzt funktioniert es 🙂

                                  Sehr gut. Dann probier halt erst mal bissi aus. Ggf. brauchst Du den Report nur wenn Du ihn antriggerst oder keine Ahnung ob der mit jedem Geräteupdate ausgegeben werden muss. Ich würde es nicht als final bezeichnen, aber es ist eine Basis damit Du die Zusammenhänge verstehst und das nun Deinen Bedürfnissen anpassen kannst.

                                  Und wie gesagt: Hänge Dir so viele Debug-Nodes dran, wie Du willst, nur so verstehst Du wie die Befehle funktionieren.

                                  O 1 Reply Last reply Reply Quote 0
                                  • O
                                    Oli @mickym last edited by

                                    @mickym
                                    den Report bräuchte ich eigentlich nur, wenn sich am Gerätestatus was ändert,
                                    den oberen bräuchte ich ebenfalls nur wenn sich am Gerätestatus was ändert, oder ein neues gerät hinzukommt

                                    ist das möglich?

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

                                      @oli Du sollst das ja nicht als finalen Flow betrachten. Momentan kannst Du das mit der trigger Node anstossen. 😉

                                      den Report bräuchte ich eigentlich nur, wenn sich am Gerätestatus was ändert,

                                      den oberen bräuchte ich ebenfalls nur wenn sich am Gerätestatus was ändert, oder ein neues gerät hinzukommt

                                      Das hängt doch von "Dir" ab, was Du triggern lässt und wie Du das ermittelst. 😉 Ggf. an der Stelle an der die globale Geräteliste zusammen gezimmert wird.

                                      Der Ersteller des ursprünglichen flows hatte das ja als Bedingung - aber das musst Du beurteilen:

                                      if((msg.payload.node && ((msg.payload.node.state === 2)||(msg.payload.node.state === 12)))||msg.payload === true)
                                      

                                      sprich NUR wenn payload eine Eigenschaft node hat oder true ist - und wenn sie eine Eigenschaft node hat - dann nur wenn die Geräte nicht verfügbar sind.

                                      Ob dass das ist, was Du willst - weiss ich nicht, aber dann hättest Du die gleiche Situation wie vorher.

                                      Dazu baust Du für Deine Trigger folgenden Filter davor:

                                      fd7d6d28-7b1d-473e-a79c-1d3b23b22b89-image.png

                                      [
                                         {
                                             "id": "9c97a2e21b3710d3",
                                             "type": "switch",
                                             "z": "9c280ddf049b2b4d",
                                             "name": "filter trigger",
                                             "property": "(payload.node and (payload.node.state =2 or payload.node.state = 12)) or payload = true",
                                             "propertyType": "jsonata",
                                             "rules": [
                                                 {
                                                     "t": "true"
                                                 }
                                             ],
                                             "checkall": "true",
                                             "repair": false,
                                             "outputs": 1,
                                             "x": 570,
                                             "y": 440,
                                             "wires": [
                                                 [
                                                     "0f17893e37ac0581"
                                                 ]
                                             ]
                                         }
                                      ]
                                      

                                      Wie gesagt - das ist der Filter der in der function Node war - wenn es andere Möglichkeiten gibt, dann musst du halt schauen. Ich überlege noch was anderes - aber das ist erst mal das, was bislang Dein jetziger Status mit dem anderen Flow war.

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

                                        @oli sagte in Benötige Hilfe mit Node-Red in Verbindung mit homee:

                                        @mickym
                                        den Report bräuchte ich eigentlich nur, wenn sich am Gerätestatus was ändert,
                                        den oberen bräuchte ich ebenfalls nur wenn sich am Gerätestatus was ändert, oder ein neues gerät hinzukommt

                                        ist das möglich?

                                        OK - habe ich Dir nun auch gemacht. Also nicht den Filter von dem ursprünglichen Flowersteller nehmen, sondern ich hab jetzt folgendes gebastelt: 😉

                                        632bcd7a-a0bc-42dd-8e33-c16671f1633b-image.png

                                        • Es wird geprüft, ob es ein Gerät ist
                                        • Wenn ja wird es in die Nachrichteneigenschaft device geschoben
                                        • Dann wird wieder die komplette Geräteliste geholt
                                        • Dann wird das Gerät aus der Geräteliste selektiert und überprüft ob es vorhanden ist bzw. sich der status geändert hat und nur dann fortgesetzt.

                                        Statt der Inject Node ein Gerät - kannst dann wieder mit Deinem anderen Flow verlinken:

                                        [
                                           {
                                               "id": "94fbc6ce08554a92",
                                               "type": "inject",
                                               "z": "9c280ddf049b2b4d",
                                               "name": "Ein Gerät",
                                               "props": [
                                                   {
                                                       "p": "payload"
                                                   }
                                               ],
                                               "repeat": "",
                                               "crontab": "",
                                               "once": false,
                                               "onceDelay": 0.1,
                                               "topic": "",
                                               "payload": "{\"node\":{\"id\":29,\"name\":\"EG%20%2F%20Wohnzimmer%20%2F%20Netatmo\",\"profile\":3014,\"image\":\"default\",\"favorite\":0,\"order\":42,\"protocol\":9,\"routing\":0,\"state\":1,\"state_changed\":1678428037,\"added\":1607519624,\"history\":0,\"cube_type\":8,\"note\":\"\",\"services\":5,\"phonetic_name\":\"Klima%20Wohnzimmer\",\"owner\":1,\"security\":0,\"attributes\":[{\"id\":253,\"node_id\":29,\"instance\":0,\"minimum\":0,\"maximum\":50,\"current_value\":20.6,\"target_value\":20.6,\"last_value\":20.5,\"unit\":\"%C2%B0C\",\"step_value\":0.5,\"editable\":0,\"type\":5,\"state\":1,\"last_changed\":1678519389,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":4,\"data\":\"\",\"name\":\"\",\"options\":{\"history\":{\"day\":1,\"week\":26,\"month\":6}}},{\"id\":254,\"node_id\":29,\"instance\":0,\"minimum\":0,\"maximum\":100,\"current_value\":33,\"target_value\":33,\"last_value\":34,\"unit\":\"%25\",\"step_value\":1,\"editable\":0,\"type\":7,\"state\":1,\"last_changed\":1678515784,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":4,\"data\":\"\",\"name\":\"\",\"options\":{\"history\":{\"day\":1,\"week\":26,\"month\":6}}},{\"id\":255,\"node_id\":29,\"instance\":0,\"minimum\":0,\"maximum\":5000,\"current_value\":444,\"target_value\":444,\"last_value\":449,\"unit\":\"ppm\",\"step_value\":50,\"editable\":0,\"type\":20,\"state\":1,\"last_changed\":1678519389,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":4,\"data\":\"\",\"name\":\"\",\"options\":{\"history\":{\"day\":1,\"week\":26,\"month\":6}}},{\"id\":256,\"node_id\":29,\"instance\":0,\"minimum\":35,\"maximum\":120,\"current_value\":32,\"target_value\":32,\"last_value\":33,\"unit\":\"dB\",\"step_value\":1,\"editable\":0,\"type\":93,\"state\":1,\"last_changed\":1678515183,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":4,\"data\":\"\",\"name\":\"\",\"options\":{\"history\":{\"day\":1,\"week\":26,\"month\":6}}},{\"id\":257,\"node_id\":29,\"instance\":0,\"minimum\":260,\"maximum\":1160,\"current_value\":1003.7,\"target_value\":1003.7,\"last_value\":1003.6,\"unit\":\"mBar\",\"step_value\":5,\"editable\":0,\"type\":94,\"state\":1,\"last_changed\":1678519389,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":4,\"data\":\"\",\"name\":\"\",\"options\":{\"history\":{\"day\":1,\"week\":26,\"month\":6}}},{\"id\":258,\"node_id\":29,\"instance\":0,\"minimum\":0,\"maximum\":4,\"current_value\":4,\"target_value\":4,\"last_value\":2,\"unit\":\"n%2Fa\",\"step_value\":1,\"editable\":0,\"type\":33,\"state\":1,\"last_changed\":1677083197,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":4,\"data\":\"\",\"name\":\"\"},{\"id\":475,\"node_id\":29,\"instance\":0,\"minimum\":0,\"maximum\":1,\"current_value\":1,\"target_value\":1,\"last_value\":0,\"unit\":\"\",\"step_value\":1,\"editable\":1,\"type\":385,\"state\":1,\"last_changed\":0,\"changed_by\":0,\"changed_by_id\":0,\"based_on\":0,\"data\":\"\",\"name\":\"\"}]}}",
                                               "payloadType": "json",
                                               "x": 120,
                                               "y": 800,
                                               "wires": [
                                                   [
                                                       "e565ecbc06eb639f"
                                                   ]
                                               ]
                                           },
                                           {
                                               "id": "306e283de06793a5",
                                               "type": "change",
                                               "z": "9c280ddf049b2b4d",
                                               "name": "",
                                               "rules": [
                                                   {
                                                       "t": "move",
                                                       "p": "payload",
                                                       "pt": "msg",
                                                       "to": "device",
                                                       "tot": "msg"
                                                   }
                                               ],
                                               "action": "",
                                               "property": "",
                                               "from": "",
                                               "to": "",
                                               "reg": false,
                                               "x": 500,
                                               "y": 800,
                                               "wires": [
                                                   [
                                                       "3fcd14dd3eda98a3"
                                                   ]
                                               ]
                                           },
                                           {
                                               "id": "3fcd14dd3eda98a3",
                                               "type": "change",
                                               "z": "9c280ddf049b2b4d",
                                               "name": "hole alle Geräte",
                                               "rules": [
                                                   {
                                                       "t": "set",
                                                       "p": "payload",
                                                       "pt": "msg",
                                                       "to": "{}",
                                                       "tot": "json"
                                                   },
                                                   {
                                                       "t": "set",
                                                       "p": "payload.nodes",
                                                       "pt": "msg",
                                                       "to": "homee.nodes",
                                                       "tot": "global"
                                                   }
                                               ],
                                               "action": "",
                                               "property": "",
                                               "from": "",
                                               "to": "",
                                               "reg": false,
                                               "x": 720,
                                               "y": 800,
                                               "wires": [
                                                   [
                                                       "3981f0834f60fe3d"
                                                   ]
                                               ]
                                           },
                                           {
                                               "id": "3981f0834f60fe3d",
                                               "type": "switch",
                                               "z": "9c280ddf049b2b4d",
                                               "name": "Nur wenn Gerätestatus geändert",
                                               "property": "payload.nodes[id=$$.device.node.id].state = device.node.state",
                                               "propertyType": "jsonata",
                                               "rules": [
                                                   {
                                                       "t": "false"
                                                   }
                                               ],
                                               "checkall": "true",
                                               "repair": false,
                                               "outputs": 1,
                                               "x": 970,
                                               "y": 800,
                                               "wires": [
                                                   [
                                                       "6f4c16eed7166074"
                                                   ]
                                               ]
                                           },
                                           {
                                               "id": "e565ecbc06eb639f",
                                               "type": "switch",
                                               "z": "9c280ddf049b2b4d",
                                               "name": "verify device",
                                               "property": "payload.node",
                                               "propertyType": "msg",
                                               "rules": [
                                                   {
                                                       "t": "nnull"
                                                   }
                                               ],
                                               "checkall": "true",
                                               "repair": false,
                                               "outputs": 1,
                                               "x": 290,
                                               "y": 800,
                                               "wires": [
                                                   [
                                                       "306e283de06793a5"
                                                   ]
                                               ]
                                           }
                                        ]
                                        

                                        Nachdem Du die Zusammenfassung automatisch haben willst kannst Du das mit einer Complete Node erledigen, später würde ich das alles wegschmeissen und mit dem Hauptflow zusammenführen.

                                        6cd88e02-c174-4d66-b18c-a49d63a6e03e-image.png

                                        5e7b0ea8-438a-4fc6-9991-31fc20e04fb9-image.png

                                        [
                                           {
                                               "id": "615f1d935afd46f7",
                                               "type": "complete",
                                               "z": "9c280ddf049b2b4d",
                                               "name": "",
                                               "scope": [
                                                   "99528e0bbb0f2491",
                                                   "43f88f1028d1af0a",
                                                   "139fe3d8efb20402"
                                               ],
                                               "uncaught": false,
                                               "x": 230,
                                               "y": 1260,
                                               "wires": [
                                                   [
                                                       "bb70522cf511b632"
                                                   ]
                                               ]
                                           }
                                        ]
                                        

                                        Falls in der Complete Node nichts ausgewählt ist dann halt diese 3 Change Nodes auswählen
                                        c969460a-10a0-47f8-8592-3856edebfae9-image.png

                                        Wie gesagt final - wenn Du genug rumexperimentiert hast - würde ich das eh zusammenfassen.

                                        2a9880f7-8f4c-4a90-8fa0-a008e39b579a-image.png

                                        und hinten raus - den Report willst Du ja auch ganz anders gestalten.

                                        1. Konsolidierung:

                                        [
                                           {
                                               "id": "afaeceb73a81b97a",
                                               "type": "tab",
                                               "label": "Homee 1. Konsoldierung",
                                               "disabled": false,
                                               "info": "",
                                               "env": []
                                           },
                                           {
                                               "id": "1f31a8a611e8ae62",
                                               "type": "junction",
                                               "z": "afaeceb73a81b97a",
                                               "x": 1100,
                                               "y": 400,
                                               "wires": [
                                                   [
                                                       "d1362666d0d6498d",
                                                       "e5e4c67350b62fb9",
                                                       "9c0a0c2ec54309c4"
                                                   ]
                                               ]
                                           },
                                           {
                                               "id": "d6ba83fcbbf8632b",
                                               "type": "junction",
                                               "z": "afaeceb73a81b97a",
                                               "x": 1560,
                                               "y": 260,
                                               "wires": [
                                                   [
                                                       "4fc32434b1ad9e30"
                                                   ]
                                               ]
                                           },
                                           {
                                               "id": "ba0d73a9ecf905bb",
                                               "type": "junction",
                                               "z": "afaeceb73a81b97a",
                                               "x": 1500,
                                               "y": 400,
                                               "wires": [
                                                   [
                                                       "d6ba83fcbbf8632b"
                                                   ]
                                               ]
                                           },
                                           {
                                               "id": "ccc13bcc415bf46d",
                                               "type": "change",
                                               "z": "afaeceb73a81b97a",
                                               "name": "decodeUrlComponents",
                                               "rules": [
                                                   {
                                                       "t": "set",
                                                       "p": "payload",
                                                       "pt": "msg",
                                                       "to": "payload ~> |$.nodes|{\"name\":$decodeUrlComponent(name),\t\"note\":$decodeUrlComponent(note),\t\"phonetic_name\":$decodeUrlComponent(phonetic_name)},\"attributes\"|",
                                                       "tot": "jsonata"
                                                   }
                                               ],
                                               "action": "",
                                               "property": "",
                                               "from": "",
                                               "to": "",
                                               "reg": false,
                                               "x": 520,
                                               "y": 400,
                                               "wires": [
                                                   [
                                                       "c97f121d294f1458"
                                                   ]
                                               ]
                                           },
                                           {
                                               "id": "c97f121d294f1458",
                                               "type": "change",
                                               "z": "afaeceb73a81b97a",
                                               "name": "Alle Geräte",
                                               "rules": [
                                                   {
                                                       "t": "set",
                                                       "p": "payload",
                                                       "pt": "msg",
                                                       "to": "payload.nodes",
                                                       "tot": "msg"
                                                   }
                                               ],
                                               "action": "",
                                               "property": "",
                                               "from": "",
                                               "to": "",
                                               "reg": false,
                                               "x": 730,
                                               "y": 400,
                                               "wires": [
                                                   [
                                                       "913391f5d68d5666"
                                                   ]
                                               ]
                                           },
                                           {
                                               "id": "e5e4c67350b62fb9",
                                               "type": "change",
                                               "z": "afaeceb73a81b97a",
                                               "name": "Alle inaktiven Geräte",
                                               "rules": [
                                                   {
                                                       "t": "set",
                                                       "p": "payload",
                                                       "pt": "msg",
                                                       "to": "payload[state = 2]",
                                                       "tot": "jsonata"
                                                   },
                                                   {
                                                       "t": "set",
                                                       "p": "homee.inactive",
                                                       "pt": "flow",
                                                       "to": "payload",
                                                       "tot": "msg"
                                                   }
                                               ],
                                               "action": "",
                                               "property": "",
                                               "from": "",
                                               "to": "",
                                               "reg": false,
                                               "x": 1320,
                                               "y": 400,
                                               "wires": [
                                                   [
                                                       "ba0d73a9ecf905bb"
                                                   ]
                                               ]
                                           },
                                           {
                                               "id": "9c0a0c2ec54309c4",
                                               "type": "change",
                                               "z": "afaeceb73a81b97a",
                                               "name": "Alle aktiven Geräte",
                                               "rules": [
                                                   {
                                                       "t": "set",
                                                       "p": "payload",
                                                       "pt": "msg",
                                                       "to": "payload[state = 1]",
                                                       "tot": "jsonata"
                                                   },
                                                   {
                                                       "t": "set",
                                                       "p": "homee.active",
                                                       "pt": "flow",
                                                       "to": "payload",
                                                       "tot": "msg"
                                                   }
                                               ],
                                               "action": "",
                                               "property": "",
                                               "from": "",
                                               "to": "",
                                               "reg": false,
                                               "x": 1330,
                                               "y": 340,
                                               "wires": [
                                                   [
                                                       "ba0d73a9ecf905bb"
                                                   ]
                                               ]
                                           },
                                           {
                                               "id": "d1362666d0d6498d",
                                               "type": "change",
                                               "z": "afaeceb73a81b97a",
                                               "name": "Geräte, die aktualisiert werden",
                                               "rules": [
                                                   {
                                                       "t": "set",
                                                       "p": "payload",
                                                       "pt": "msg",
                                                       "to": "payload[state = 12] ",
                                                       "tot": "jsonata"
                                                   },
                                                   {
                                                       "t": "set",
                                                       "p": "homee.updating",
                                                       "pt": "flow",
                                                       "to": "payload",
                                                       "tot": "msg"
                                                   }
                                               ],
                                               "action": "",
                                               "property": "",
                                               "from": "",
                                               "to": "",
                                               "reg": false,
                                               "x": 1290,
                                               "y": 460,
                                               "wires": [
                                                   [
                                                       "ba0d73a9ecf905bb"
                                                   ]
                                               ]
                                           },
                                           {
                                               "id": "913391f5d68d5666",
                                               "type": "change",
                                               "z": "afaeceb73a81b97a",
                                               "name": "Geräte ausschliessen",
                                               "rules": [
                                                   {
                                                       "t": "set",
                                                       "p": "payload",
                                                       "pt": "msg",
                                                       "to": "payload ~> $filter(function($value){$value.id in [-1] != true})",
                                                       "tot": "jsonata"
                                                   }
                                               ],
                                               "action": "",
                                               "property": "",
                                               "from": "",
                                               "to": "",
                                               "reg": false,
                                               "x": 940,
                                               "y": 400,
                                               "wires": [
                                                   [
                                                       "1f31a8a611e8ae62"
                                                   ]
                                               ]
                                           },
                                           {
                                               "id": "bf00496a9f44421a",
                                               "type": "inject",
                                               "z": "afaeceb73a81b97a",
                                               "name": "Trigger Report",
                                               "props": [
                                                   {
                                                       "p": "payload"
                                                   }
                                               ],
                                               "repeat": "",
                                               "crontab": "",
                                               "once": false,
                                               "onceDelay": 0.1,
                                               "topic": "",
                                               "payload": "",
                                               "payloadType": "date",
                                               "x": 1330,
                                               "y": 200,
                                               "wires": [
                                                   [
                                                       "d6ba83fcbbf8632b"
                                                   ]
                                               ]
                                           },
                                           {
                                               "id": "ee98fce5a9a9aa0a",
                                               "type": "ioBroker in",
                                               "z": "afaeceb73a81b97a",
                                               "name": "start",
                                               "topic": "0_userdata.0.System.homee.StartGeräteinfo",
                                               "payloadType": "value",
                                               "onlyack": "",
                                               "func": "all",
                                               "gap": "",
                                               "fireOnStart": "false",
                                               "outFormat": "MQTT",
                                               "x": 1350,
                                               "y": 260,
                                               "wires": [
                                                   [
                                                       "d6ba83fcbbf8632b"
                                                   ]
                                               ]
                                           },
                                           {
                                               "id": "f750a4c387a2be4e",
                                               "type": "change",
                                               "z": "afaeceb73a81b97a",
                                               "name": "hole alle Geräte",
                                               "rules": [
                                                   {
                                                       "t": "set",
                                                       "p": "payload",
                                                       "pt": "msg",
                                                       "to": "{}",
                                                       "tot": "json"
                                                   },
                                                   {
                                                       "t": "set",
                                                       "p": "payload.nodes",
                                                       "pt": "msg",
                                                       "to": "homee.nodes",
                                                       "tot": "global"
                                                   }
                                               ],
                                               "action": "",
                                               "property": "",
                                               "from": "",
                                               "to": "",
                                               "reg": false,
                                               "x": 280,
                                               "y": 400,
                                               "wires": [
                                                   [
                                                       "ccc13bcc415bf46d"
                                                   ]
                                               ]
                                           },
                                           {
                                               "id": "bc3f5ae2440a7bd8",
                                               "type": "inject",
                                               "z": "afaeceb73a81b97a",
                                               "name": "trigger",
                                               "props": [
                                                   {
                                                       "p": "payload"
                                                   }
                                               ],
                                               "repeat": "",
                                               "crontab": "",
                                               "once": false,
                                               "onceDelay": 0.1,
                                               "topic": "",
                                               "payload": "true",
                                               "payloadType": "bool",
                                               "x": 110,
                                               "y": 400,
                                               "wires": [
                                                   [
                                                       "f750a4c387a2be4e"
                                                   ]
                                               ]
                                           },
                                           {
                                               "id": "cb19c80f141b5ec7",
                                               "type": "inject",
                                               "z": "afaeceb73a81b97a",
                                               "name": "Ein Gerät",
                                               "props": [
                                                   {
                                                       "p": "payload"
                                                   }
                                               ],
                                               "repeat": "",
                                               "crontab": "",
                                               "once": false,
                                               "onceDelay": 0.1,
                                               "topic": "",
                                               "payload": "{\"node\":{\"id\":29,\"name\":\"EG%20%2F%20Wohnzimmer%20%2F%20Netatmo\",\"profile\":3014,\"image\":\"default\",\"favorite\":0,\"order\":42,\"protocol\":9,\"routing\":0,\"state\":1,\"state_changed\":1678428037,\"added\":1607519624,\"history\":0,\"cube_type\":8,\"note\":\"\",\"services\":5,\"phonetic_name\":\"Klima%20Wohnzimmer\",\"owner\":1,\"security\":0,\"attributes\":[{\"id\":253,\"node_id\":29,\"instance\":0,\"minimum\":0,\"maximum\":50,\"current_value\":20.6,\"target_value\":20.6,\"last_value\":20.5,\"unit\":\"%C2%B0C\",\"step_value\":0.5,\"editable\":0,\"type\":5,\"state\":1,\"last_changed\":1678519389,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":4,\"data\":\"\",\"name\":\"\",\"options\":{\"history\":{\"day\":1,\"week\":26,\"month\":6}}},{\"id\":254,\"node_id\":29,\"instance\":0,\"minimum\":0,\"maximum\":100,\"current_value\":33,\"target_value\":33,\"last_value\":34,\"unit\":\"%25\",\"step_value\":1,\"editable\":0,\"type\":7,\"state\":1,\"last_changed\":1678515784,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":4,\"data\":\"\",\"name\":\"\",\"options\":{\"history\":{\"day\":1,\"week\":26,\"month\":6}}},{\"id\":255,\"node_id\":29,\"instance\":0,\"minimum\":0,\"maximum\":5000,\"current_value\":444,\"target_value\":444,\"last_value\":449,\"unit\":\"ppm\",\"step_value\":50,\"editable\":0,\"type\":20,\"state\":1,\"last_changed\":1678519389,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":4,\"data\":\"\",\"name\":\"\",\"options\":{\"history\":{\"day\":1,\"week\":26,\"month\":6}}},{\"id\":256,\"node_id\":29,\"instance\":0,\"minimum\":35,\"maximum\":120,\"current_value\":32,\"target_value\":32,\"last_value\":33,\"unit\":\"dB\",\"step_value\":1,\"editable\":0,\"type\":93,\"state\":1,\"last_changed\":1678515183,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":4,\"data\":\"\",\"name\":\"\",\"options\":{\"history\":{\"day\":1,\"week\":26,\"month\":6}}},{\"id\":257,\"node_id\":29,\"instance\":0,\"minimum\":260,\"maximum\":1160,\"current_value\":1003.7,\"target_value\":1003.7,\"last_value\":1003.6,\"unit\":\"mBar\",\"step_value\":5,\"editable\":0,\"type\":94,\"state\":1,\"last_changed\":1678519389,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":4,\"data\":\"\",\"name\":\"\",\"options\":{\"history\":{\"day\":1,\"week\":26,\"month\":6}}},{\"id\":258,\"node_id\":29,\"instance\":0,\"minimum\":0,\"maximum\":4,\"current_value\":4,\"target_value\":4,\"last_value\":2,\"unit\":\"n%2Fa\",\"step_value\":1,\"editable\":0,\"type\":33,\"state\":1,\"last_changed\":1677083197,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":4,\"data\":\"\",\"name\":\"\"},{\"id\":475,\"node_id\":29,\"instance\":0,\"minimum\":0,\"maximum\":1,\"current_value\":1,\"target_value\":1,\"last_value\":0,\"unit\":\"\",\"step_value\":1,\"editable\":1,\"type\":385,\"state\":1,\"last_changed\":0,\"changed_by\":0,\"changed_by_id\":0,\"based_on\":0,\"data\":\"\",\"name\":\"\"}]}}",
                                               "payloadType": "json",
                                               "x": 60,
                                               "y": 520,
                                               "wires": [
                                                   [
                                                       "477f8cdd68a623d6"
                                                   ]
                                               ]
                                           },
                                           {
                                               "id": "ea25ff19366dbd8b",
                                               "type": "change",
                                               "z": "afaeceb73a81b97a",
                                               "name": "",
                                               "rules": [
                                                   {
                                                       "t": "move",
                                                       "p": "payload",
                                                       "pt": "msg",
                                                       "to": "device",
                                                       "tot": "msg"
                                                   }
                                               ],
                                               "action": "",
                                               "property": "",
                                               "from": "",
                                               "to": "",
                                               "reg": false,
                                               "x": 440,
                                               "y": 520,
                                               "wires": [
                                                   [
                                                       "13fef03679554dae"
                                                   ]
                                               ]
                                           },
                                           {
                                               "id": "13fef03679554dae",
                                               "type": "change",
                                               "z": "afaeceb73a81b97a",
                                               "name": "hole alle Geräte",
                                               "rules": [
                                                   {
                                                       "t": "set",
                                                       "p": "payload",
                                                       "pt": "msg",
                                                       "to": "{}",
                                                       "tot": "json"
                                                   },
                                                   {
                                                       "t": "set",
                                                       "p": "payload.nodes",
                                                       "pt": "msg",
                                                       "to": "homee.nodes",
                                                       "tot": "global"
                                                   }
                                               ],
                                               "action": "",
                                               "property": "",
                                               "from": "",
                                               "to": "",
                                               "reg": false,
                                               "x": 660,
                                               "y": 520,
                                               "wires": [
                                                   [
                                                       "3e5a3f328d92cbec"
                                                   ]
                                               ]
                                           },
                                           {
                                               "id": "3e5a3f328d92cbec",
                                               "type": "switch",
                                               "z": "afaeceb73a81b97a",
                                               "name": "Nur wenn Gerätestatus geändert",
                                               "property": "payload.nodes[id=$$.device.node.id].state = device.node.state",
                                               "propertyType": "jsonata",
                                               "rules": [
                                                   {
                                                       "t": "false"
                                                   }
                                               ],
                                               "checkall": "true",
                                               "repair": false,
                                               "outputs": 1,
                                               "x": 910,
                                               "y": 520,
                                               "wires": [
                                                   [
                                                       "ccc13bcc415bf46d"
                                                   ]
                                               ]
                                           },
                                           {
                                               "id": "477f8cdd68a623d6",
                                               "type": "switch",
                                               "z": "afaeceb73a81b97a",
                                               "name": "verify device",
                                               "property": "payload.node",
                                               "propertyType": "msg",
                                               "rules": [
                                                   {
                                                       "t": "nnull"
                                                   }
                                               ],
                                               "checkall": "true",
                                               "repair": false,
                                               "outputs": 1,
                                               "x": 230,
                                               "y": 520,
                                               "wires": [
                                                   [
                                                       "ea25ff19366dbd8b"
                                                   ]
                                               ]
                                           },
                                           {
                                               "id": "4fc32434b1ad9e30",
                                               "type": "change",
                                               "z": "afaeceb73a81b97a",
                                               "name": "",
                                               "rules": [
                                                   {
                                                       "t": "set",
                                                       "p": "payload",
                                                       "pt": "msg",
                                                       "to": "homee",
                                                       "tot": "flow"
                                                   },
                                                   {
                                                       "t": "set",
                                                       "p": "payload",
                                                       "pt": "msg",
                                                       "to": "{\t   \"active\" : {\t       \"count\": payload.active ? $count(payload.active): 0,\t       \"names\" :  payload.active ?  $join(payload.active.phonetic_name,\"\\n\") : \"Keine aktiven Geräte vorhanden\"\t   },\t   \"inactive\" : {\t       \"count\": payload.inactive ? $count(payload.inactive): 0,\t        \"names\" :  payload.inactive ?  $join(payload.inactive.phonetic_name,\"\\n\") : \"Keine inaktiven Geräte vorhanden\"\t   },\t   \"updating\" : {\t       \"count\": payload.updating ? $count(payload.inactive): 0,\t        \"names\" :  payload.updating ?  $join(payload.updating.phonetic_name,\"\\n\") : \"Keine Geräte im Aktualisierungsstatus\"\t   },\t   \"summary\" : payload.updating or payload.inactive ? \"Nicht alle Geräte bereit!\" : \"Alle Geräte aktiv\"\t}",
                                                       "tot": "jsonata"
                                                   }
                                               ],
                                               "action": "",
                                               "property": "",
                                               "from": "",
                                               "to": "",
                                               "reg": false,
                                               "x": 1710,
                                               "y": 260,
                                               "wires": [
                                                   [
                                                       "93b337c8b0c958f0",
                                                       "6208fe0589c08c8c",
                                                       "91df4ca35b0811b5",
                                                       "a9b7cfa0138adb7c"
                                                   ]
                                               ]
                                           },
                                           {
                                               "id": "93b337c8b0c958f0",
                                               "type": "template",
                                               "z": "afaeceb73a81b97a",
                                               "name": "",
                                               "field": "payload",
                                               "fieldType": "msg",
                                               "format": "html",
                                               "syntax": "mustache",
                                               "template": "<!DOCTYPE html>\n<html>\n\n<body>\n<h1>Status der Geräte:</h1>\n\n<h3>aktive Geräte: {{payload.active.count}}\n<pre>{{payload.active.names}}</pre>\n\n<h3>inaktive Geräte: {{payload.inactive.count}}\n<pre>{{payload.inactive.names}}</pre>\n\n<h3>aktualisierende Geräte: {{payload.updating.count}}\n<pre>{{payload.updating.names}}</pre>\n\n<h3>{{payload.summary}}</h3>\n</body>\n</html>",
                                               "output": "str",
                                               "x": 1940,
                                               "y": 260,
                                               "wires": [
                                                   [
                                                       "bd020f5de81b6984"
                                                   ]
                                               ]
                                           },
                                           {
                                               "id": "1b3a14e37e06a753",
                                               "type": "file",
                                               "z": "afaeceb73a81b97a",
                                               "name": "",
                                               "filename": "filename",
                                               "filenameType": "msg",
                                               "appendNewline": false,
                                               "createDir": false,
                                               "overwriteFile": "true",
                                               "encoding": "none",
                                               "x": 2360,
                                               "y": 260,
                                               "wires": [
                                                   []
                                               ]
                                           },
                                           {
                                               "id": "bd020f5de81b6984",
                                               "type": "change",
                                               "z": "afaeceb73a81b97a",
                                               "name": "",
                                               "rules": [
                                                   {
                                                       "t": "set",
                                                       "p": "filename",
                                                       "pt": "msg",
                                                       "to": "/home/iobroker/homee-report.html",
                                                       "tot": "str"
                                                   }
                                               ],
                                               "action": "",
                                               "property": "",
                                               "from": "",
                                               "to": "",
                                               "reg": false,
                                               "x": 2150,
                                               "y": 260,
                                               "wires": [
                                                   [
                                                       "1b3a14e37e06a753"
                                                   ]
                                               ]
                                           },
                                           {
                                               "id": "6208fe0589c08c8c",
                                               "type": "switch",
                                               "z": "afaeceb73a81b97a",
                                               "name": "",
                                               "property": "payload.summary",
                                               "propertyType": "msg",
                                               "rules": [
                                                   {
                                                       "t": "neq",
                                                       "v": "Alle Geräte aktiv",
                                                       "vt": "str"
                                                   }
                                               ],
                                               "checkall": "true",
                                               "repair": false,
                                               "outputs": 1,
                                               "x": 1930,
                                               "y": 340,
                                               "wires": [
                                                   [
                                                       "e7ee2a2337e50af1"
                                                   ]
                                               ]
                                           },
                                           {
                                               "id": "f533e9122ec7d98d",
                                               "type": "debug",
                                               "z": "afaeceb73a81b97a",
                                               "name": "Warnung ausgeben - wenn nicht alle Geräte aktiv",
                                               "active": false,
                                               "tosidebar": true,
                                               "console": false,
                                               "tostatus": false,
                                               "complete": "payload",
                                               "targetType": "msg",
                                               "statusVal": "",
                                               "statusType": "auto",
                                               "x": 2430,
                                               "y": 340,
                                               "wires": []
                                           },
                                           {
                                               "id": "e7ee2a2337e50af1",
                                               "type": "change",
                                               "z": "afaeceb73a81b97a",
                                               "name": "",
                                               "rules": [
                                                   {
                                                       "t": "set",
                                                       "p": "payload",
                                                       "pt": "msg",
                                                       "to": "payload.summary",
                                                       "tot": "msg"
                                                   }
                                               ],
                                               "action": "",
                                               "property": "",
                                               "from": "",
                                               "to": "",
                                               "reg": false,
                                               "x": 2110,
                                               "y": 340,
                                               "wires": [
                                                   [
                                                       "f533e9122ec7d98d"
                                                   ]
                                               ]
                                           },
                                           {
                                               "id": "91df4ca35b0811b5",
                                               "type": "change",
                                               "z": "afaeceb73a81b97a",
                                               "name": "Anzahl nicht aktiver Geräte",
                                               "rules": [
                                                   {
                                                       "t": "set",
                                                       "p": "payload",
                                                       "pt": "msg",
                                                       "to": "payload.inactive.count + payload.updating.count",
                                                       "tot": "jsonata"
                                                   }
                                               ],
                                               "action": "",
                                               "property": "",
                                               "from": "",
                                               "to": "",
                                               "reg": false,
                                               "x": 2000,
                                               "y": 420,
                                               "wires": [
                                                   [
                                                       "49ce4151b0046769"
                                                   ]
                                               ]
                                           },
                                           {
                                               "id": "49ce4151b0046769",
                                               "type": "debug",
                                               "z": "afaeceb73a81b97a",
                                               "name": "Nicht aktive Geräte (updating oder inaktiv)",
                                               "active": false,
                                               "tosidebar": true,
                                               "console": false,
                                               "tostatus": false,
                                               "complete": "payload",
                                               "targetType": "msg",
                                               "statusVal": "",
                                               "statusType": "auto",
                                               "x": 2340,
                                               "y": 420,
                                               "wires": []
                                           },
                                           {
                                               "id": "a9b7cfa0138adb7c",
                                               "type": "debug",
                                               "z": "afaeceb73a81b97a",
                                               "name": "Zusammenfassung",
                                               "active": true,
                                               "tosidebar": true,
                                               "console": false,
                                               "tostatus": false,
                                               "complete": "payload",
                                               "targetType": "msg",
                                               "statusVal": "",
                                               "statusType": "auto",
                                               "x": 1970,
                                               "y": 200,
                                               "wires": []
                                           }
                                        ]
                                        

                                        O 1 Reply Last reply Reply Quote 0
                                        • O
                                          Oli @mickym last edited by

                                          @mickym

                                          oh, oh, dass ging mir jetzt alles zu schnell, also nochmal zum mitschreiben für dumme wie mich.

                                          1. den unteren Teil des ersten Flow kann ich löschen und dafür den neuen Flow Konsolidierung importieren?
                                          2. Muss ich am "Ein Gerät" noch etwas ändern oder nachtragen?
                                          3. habe ich nicht begriffe, was "Ein Gerät" bewirkt?
                                          mickym 2 Replies Last reply Reply Quote 0
                                          • mickym
                                            mickym Most Active @Oli last edited by

                                            @oli Ja ich dachte eigentlich Du willst erst mal lernen - deswegen lass das halt mit der Konsolidierung weg.

                                            Anstelle der Inject Node kommt der Link aus deinem anderen Flow. Ich muss ja immer simulieren. Ich habe also nur das Geräte mit der ID29 zum Testen genommen. Also anstelle der Inject Node - kannst Du deinen Flow anschliessen, der die Geräte liefert.

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            570
                                            Online

                                            31.7k
                                            Users

                                            79.7k
                                            Topics

                                            1.3m
                                            Posts

                                            node-red
                                            3
                                            121
                                            7189
                                            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