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. Node Red DP erstellen

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    Node Red DP erstellen

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

      @dos1973 sagte in Node Red DP erstellen:

      @mickym

      Bin gleich online zum probieren

      Bin schon fertig.

      0d56949e-fc2d-48d7-84c2-40c5da784220-image.png

      70c4f17b-be11-4472-8ed1-78987de110d4-image.png

      hier für den Import:

      [
         {
             "id": "97b845b5a6599224",
             "type": "split",
             "z": "517cd16e4d7e6ae4",
             "name": "teile Objekt in Einzelnachrichten",
             "splt": "\\n",
             "spltType": "str",
             "arraySplt": 1,
             "arraySpltType": "len",
             "stream": false,
             "addname": "topic",
             "x": 830,
             "y": 660,
             "wires": [
                 [
                     "4ec1e6e4e84579e7"
                 ]
             ]
         },
         {
             "id": "042bf417501565f3",
             "type": "change",
             "z": "517cd16e4d7e6ae4",
             "name": "Ändere srcBle",
             "rules": [
                 {
                     "t": "change",
                     "p": "srcBle",
                     "pt": "msg",
                     "from": ":",
                     "fromt": "str",
                     "to": "-",
                     "tot": "str"
                 },
                 {
                     "t": "set",
                     "p": "srcBle",
                     "pt": "msg",
                     "to": "\"0_userdata.0.Wohnung.Status.Shelly.9-Shelly-BLE-Geraete.\" & srcBle",
                     "tot": "jsonata"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 280,
             "y": 660,
             "wires": [
                 [
                     "adb8c34172c9605f"
                 ]
             ]
         },
         {
             "id": "adb8c34172c9605f",
             "type": "change",
             "z": "517cd16e4d7e6ae4",
             "name": "Entferne payload-Eigenschaften",
             "rules": [
                 {
                     "t": "delete",
                     "p": "payload.address",
                     "pt": "msg"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 530,
             "y": 660,
             "wires": [
                 [
                     "97b845b5a6599224"
                 ]
             ]
         },
         {
             "id": "4ec1e6e4e84579e7",
             "type": "change",
             "z": "517cd16e4d7e6ae4",
             "name": "erstelle topic",
             "rules": [
                 {
                     "t": "set",
                     "p": "topic",
                     "pt": "msg",
                     "to": "srcBle & \".\" & topic",
                     "tot": "jsonata"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 1070,
             "y": 660,
             "wires": [
                 [
                     "bd42f02cc76dacad"
                 ]
             ]
         },
         {
             "id": "bd42f02cc76dacad",
             "type": "ioBroker out",
             "z": "517cd16e4d7e6ae4",
             "name": "schreibe Werte",
             "topic": "",
             "ack": "true",
             "autoCreate": "true",
             "stateName": "",
             "role": "",
             "payloadType": "",
             "readonly": "false",
             "stateUnit": "",
             "stateMin": "",
             "stateMax": "",
             "x": 1260,
             "y": 660,
             "wires": []
         }
      ]
      

      D 1 Reply Last reply Reply Quote 0
      • D
        dos1973 @mickym last edited by

        @mickym
        hmm, irgendwie klappt das noch nicht
        es fehlt der übergeordnete DP der Macadresse

        Bildschirmfoto 2023-12-17 um 13.59.50.png

        das kommt raus

        Bildschirmfoto 2023-12-17 um 13.58.54.png

        ich brauche dieses onbject in inzelne DP
        Bildschirmfoto 2023-12-17 um 14.05.45.png

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

          @dos1973 Dann kopiere mir bitte das ganze Objekt aus dem Debug Fenster hier in Code-Tags.

          6a47015c-aee5-4f20-94d4-f40918063df7-image.png

          ich habe auch die komische 9 da mal entfernt.

          Und ich hoffe Du hast die mqtt In Node - mit automatischem parsen des Eingangs eingestellt.

          1c6b8697-a973-4d16-9139-138f04f71b3d-image.png

          Und dann ist es hilfreich, wenn es bei Dir nicht klappt bevor Du was in die iobroker-out Node schreibst das im Debug zu betrachten

          D 1 Reply Last reply Reply Quote 0
          • D
            dos1973 @mickym last edited by

            @mickym
            du meinst das?

            17.12.2023, 14:10:12node: debug 7
            0_userdata.0.Wohnung.Status.Shellys.9-Shelly-BLE-Geraete.payload : msg.payload : Object
            object
            encryption: false
            BTHome_version: 2
            pid: 111
            battery: 100
            illuminance: 138
            motion: 0
            rssi: -81
            address: "3c:2e:f5:be:34:ec"
            
            mickym 1 Reply Last reply Reply Quote 0
            • mickym
              mickym Most Active @dos1973 last edited by mickym

              @dos1973 Aber nicht mit der Maus kopieren sondern über Wert kopieren im Debugfenster:

              copy path.gif

              und wie gesagt zeigen - wie eine Nachricht ankommt, bevor du sie in die iobroker-Out NOde schreibst.

              Hast Du da selbst was rumgebastelt:

              aef3a5ae-da97-4e33-899e-12ad2d5eaab2-image.png

              D 1 Reply Last reply Reply Quote 0
              • D
                dos1973 @mickym last edited by dos1973

                @mickym

                so kommt es an...

                Bildschirmfoto 2023-12-17 um 14.17.10.png

                Bildschirmfoto 2023-12-17 um 14.16.40.png

                pfade - aber bvei unterschiedlichen Geräten, können die anders lauten.
                das ist zB. eine Bewgungsmelder

                payload.payload
                payload.payload.encryption
                payload.payload.BTHome_version
                payload.payload.pid
                payload.payload.battery
                payload.payload.illuminance
                payload.payload.motion
                payload.payload.rssi
                payload.payload.address
                
                mickym D 2 Replies Last reply Reply Quote 0
                • mickym
                  mickym Most Active @dos1973 last edited by

                  @dos1973 Geh bitte mit der Maus an die markierte Stelle und

                  cc31e5ee-ca0b-437e-9985-db7cd2ce7377-image.png

                  drücke auf Wert kopieren und dann die Zwischenablage hier in CodeTags rein.

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

                    Und nochmal hast Du an dem topic was geändert - an der Node????

                    1 Reply Last reply Reply Quote 0
                    • D
                      dos1973 @dos1973 last edited by

                      ok, der sender hat diese werte

                      payload.payload.button
                      

                      anstelle des Bewgungsmelders

                      payload.payload.illuminance
                      payload.payload.motion
                      
                      mickym 1 Reply Last reply Reply Quote 0
                      • D
                        dos1973 @mickym last edited by

                        @mickym

                        {"scriptVersion":"0.1","src":"shellies/Pro3_EM","srcBle":{"mac":"b4:35:22:fe:56:ad"},"payload":{"encryption":false,"BTHome_version":2,"pid":253,"battery":100,"button":2,"rssi":-79,"address":"b4:35:22:fe:56:ad"}}
                        
                        mickym 1 Reply Last reply Reply Quote 0
                        • mickym
                          mickym Most Active @dos1973 last edited by

                          @dos1973 So nützt das nichts - die Werte sind egal die werden automatisch aufgelöst.

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

                            @dos1973

                            @dos1973 sagte in Node Red DP erstellen:

                            @mickym

                            {"scriptVersion":"0.1","src":"shellies/Pro3_EM","srcBle":{"mac":"b4:35:22:fe:56:ad"},"payload":{"encryption":false,"BTHome_version":2,"pid":253,"battery":100,"button":2,"rssi":-79,"address":"b4:35:22:fe:56:ad"}}
                            

                            Sehr gut. Ist nur eine Kleinigkeit - ich sag Dir gleich was. Das liegt einfach daran - dass ich bei den Screenshots nicht immer so genau schaue. 😉

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

                              Du musst in der 1. Change Node (Ändere srcBle) nur auf die Objekteigenschaft verweisen:

                              8ea3addb-fab5-4230-b588-db16c3c1513c-image.png

                              Das rot unterstrichene bitte dort anfügen.

                              Und hinten NICHTS ändern - das topic in der Change Node bleibt so wie ich es erstellt habe.

                              be1b54d4-1785-466e-861a-586bc3cdca66-image.png

                              Nichts mit payload etc.

                              0be78600-53d8-42e3-88d9-efc270827637-image.png

                              Hier nochmal ein frischer Import:

                              [
                                 {
                                     "id": "97b845b5a6599224",
                                     "type": "split",
                                     "z": "517cd16e4d7e6ae4",
                                     "name": "teile Objekt in Einzelnachrichten",
                                     "splt": "\\n",
                                     "spltType": "str",
                                     "arraySplt": 1,
                                     "arraySpltType": "len",
                                     "stream": false,
                                     "addname": "topic",
                                     "x": 830,
                                     "y": 660,
                                     "wires": [
                                         [
                                             "4ec1e6e4e84579e7"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "042bf417501565f3",
                                     "type": "change",
                                     "z": "517cd16e4d7e6ae4",
                                     "name": "Ändere srcBle",
                                     "rules": [
                                         {
                                             "t": "change",
                                             "p": "srcBle.mac",
                                             "pt": "msg",
                                             "from": ":",
                                             "fromt": "str",
                                             "to": "-",
                                             "tot": "str"
                                         },
                                         {
                                             "t": "set",
                                             "p": "srcBle",
                                             "pt": "msg",
                                             "to": "\"0_userdata.0.Wohnung.Status.Shelly.Shelly-BLE-Geraete.\" & srcBle.mac",
                                             "tot": "jsonata"
                                         }
                                     ],
                                     "action": "",
                                     "property": "",
                                     "from": "",
                                     "to": "",
                                     "reg": false,
                                     "x": 280,
                                     "y": 660,
                                     "wires": [
                                         [
                                             "adb8c34172c9605f"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "adb8c34172c9605f",
                                     "type": "change",
                                     "z": "517cd16e4d7e6ae4",
                                     "name": "Entferne payload-Eigenschaften",
                                     "rules": [
                                         {
                                             "t": "delete",
                                             "p": "payload.address",
                                             "pt": "msg"
                                         }
                                     ],
                                     "action": "",
                                     "property": "",
                                     "from": "",
                                     "to": "",
                                     "reg": false,
                                     "x": 530,
                                     "y": 660,
                                     "wires": [
                                         [
                                             "97b845b5a6599224"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "4ec1e6e4e84579e7",
                                     "type": "change",
                                     "z": "517cd16e4d7e6ae4",
                                     "name": "erstelle topic",
                                     "rules": [
                                         {
                                             "t": "set",
                                             "p": "topic",
                                             "pt": "msg",
                                             "to": "srcBle & \".\" & topic",
                                             "tot": "jsonata"
                                         }
                                     ],
                                     "action": "",
                                     "property": "",
                                     "from": "",
                                     "to": "",
                                     "reg": false,
                                     "x": 1070,
                                     "y": 660,
                                     "wires": [
                                         [
                                             "bd42f02cc76dacad"
                                         ]
                                     ]
                                 },
                                 {
                                     "id": "bd42f02cc76dacad",
                                     "type": "ioBroker out",
                                     "z": "517cd16e4d7e6ae4",
                                     "name": "schreibe Werte",
                                     "topic": "",
                                     "ack": "true",
                                     "autoCreate": "true",
                                     "stateName": "",
                                     "role": "",
                                     "payloadType": "",
                                     "readonly": "false",
                                     "stateUnit": "",
                                     "stateMin": "",
                                     "stateMax": "",
                                     "x": 1260,
                                     "y": 660,
                                     "wires": []
                                 }
                              ]
                              

                              D 1 Reply Last reply Reply Quote 0
                              • D
                                dos1973 @mickym last edited by

                                @mickym

                                nee klappt nicht.

                                Bildschirmfoto 2023-12-17 um 14.35.54.png

                                habe es ergänzt
                                Bildschirmfoto 2023-12-17 um 14.36.54.png

                                sieht alles genauso aus
                                Bildschirmfoto 2023-12-17 um 14.37.22.png

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

                                  @dos1973 Entweder nochmal frischer Import - oder Du hast hinten an der topic Node was geändert. Ansonsten klemm die iobroker-out Node ab, mach einen debug dahinter und poste das. Aber erst neu importieren.

                                  Die Nachrichten, die in die iobroker-Out NOde gehen müssen so aussehen:

                                  cb6f75c5-e87b-49fc-8b3e-c3109c549aea-image.png

                                  D 1 Reply Last reply Reply Quote 0
                                  • D
                                    dos1973 @mickym last edited by

                                    @mickym
                                    ich habe es komplett neu importiert

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

                                      @dos1973 sagte in Node Red DP erstellen:

                                      @mickym
                                      ich habe es komplett neu importiert

                                      Und Debug Node hinten dran gemacht und bitte Screenshot der einzelnen Nachrichten bevor diese in die iobroker-Out Node gehen. - Ich hab dir gerade geschickt wie das aussehen muss.

                                      D 1 Reply Last reply Reply Quote 0
                                      • D
                                        dos1973 @mickym last edited by

                                        @mickym
                                        ich hoffe ich habs verstanden
                                        Bildschirmfoto 2023-12-17 um 14.43.05.png

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

                                          @dos1973 OK ich weiß nicht wo die 2 Punkte her kommen.

                                          Ich werde nochmal mit diesem Objekt Deinen Input nachbauen und Du sagst, ob der mit Deinem identisch ist.

                                          {"scriptVersion":"0.1","src":"shellies/Pro3_EM","srcBle":{"mac":"b4:35:22:fe:56:ad"},"payload":{"encryption":false,"BTHome_version":2,"pid":253,"battery":100,"button":2,"rssi":-79,"address":"b4:35:22:fe:56:ad"}}
                                          
                                          D 1 Reply Last reply Reply Quote 0
                                          • D
                                            dos1973 @mickym last edited by

                                            @mickym
                                            ist irgendwie eine schwere geburt...

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            438
                                            Online

                                            31.9k
                                            Users

                                            80.2k
                                            Topics

                                            1.3m
                                            Posts

                                            2
                                            42
                                            1291
                                            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