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. JSON an tr-069 command übergeben

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    JSON an tr-069 command übergeben

    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      frankyboy73 @kla960 last edited by

      @kla960 Hi, dein Code lässt sich leider nicht impotieren.
      Import1.jpg

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

        @frankyboy73 Fehlt die eckige Klammer am Anfang.

        [
            {
                "id": "955c676a.93fea8",
                "type": "ioBroker out",
                "z": "3054ca10.a7b9e6",
                "name": "Request channel info",
                "topic": "tr-064.1.states.command",
                "ack": "true",
                "autoCreate": "false",
                "stateName": "",
                "role": "",
                "payloadType": "",
                "readonly": "",
                "stateUnit": "",
                "stateMin": "",
                "stateMax": "",
                "x": 740,
                "y": 320,
                "wires": []
            },
            {
                "id": "c04328ca.d76ae8",
                "type": "inject",
                "z": "3054ca10.a7b9e6",
                "name": "GetChannelInfo",
                "props": [
                    {
                        "p": "payload"
                    }
                ],
                "repeat": "",
                "crontab": "",
                "once": false,
                "onceDelay": 0.1,
                "topic": "",
                "payload": "{\"service\":\"urn:dslforum-org:service:WLANConfiguration:2\",\"action\":\"GetChannelInfo\",\"params\":{}}",
                "payloadType": "json",
                "x": 300,
                "y": 200,
                "wires": [
                    [
                        "bac9031c.48509"
                    ]
                ]
            },
            {
                "id": "bac9031c.48509",
                "type": "json",
                "z": "3054ca10.a7b9e6",
                "name": "",
                "property": "payload",
                "action": "str",
                "pretty": true,
                "x": 490,
                "y": 260,
                "wires": [
                    [
                        "955c676a.93fea8"
                    ]
                ]
            },
            {
                "id": "85163997.242b48",
                "type": "inject",
                "z": "3054ca10.a7b9e6",
                "name": "SetChannel",
                "props": [
                    {
                        "p": "payload"
                    }
                ],
                "repeat": "",
                "crontab": "",
                "once": false,
                "onceDelay": 0.1,
                "topic": "",
                "payload": "{\"service\":\"urn:dslforum-org:service:WLANConfiguration:2\",\"action\":\"SetChannel\",\"params\":{\"NewChannel\":\"48\"}}",
                "payloadType": "json",
                "x": 310,
                "y": 300,
                "wires": [
                    [
                        "bac9031c.48509"
                    ]
                ]
            }
        ]
        

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

          gelöscht.

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

            Im Prinzip müsste es eigentlich funktionieren, wenn Du statt value - ein command in Deiner iobroker out Node verwendest-

            fb194432-a761-4785-a61e-0224b025c1c9-image.png

            Inhaltlich habe ich mir das Kommando nicht angeschaut.

            K 1 Reply Last reply Reply Quote 0
            • K
              kla960 @mickym last edited by

              @mickym sagte in JSON an tr-069 command übergeben:

              Im Prinzip müsste es eigentlich funktionieren, wenn Du statt value - ein command in Deiner iobroker out Node verwendest-

              Habe es wohl hinbekommen. Und ja command wird jetzt verwendet. Der Switch ist noch nicht so schön. Ggf. habt Ihr ja eine bessere Idee😀

              Jetzt wird immer um 5:00 einmal der Kanal geprüft und wenn nicht 48 wieder auf 48 gesetzt.

              rednode_JSON.png

              Und noch der Code (Hoffentlich ohne Fehler kopiert):

              [
                  {
                      "id": "3054ca10.a7b9e6",
                      "type": "tab",
                      "label": "WLAN 5GHz",
                      "disabled": false,
                      "info": ""
                  },
                  {
                      "id": "955c676a.93fea8",
                      "type": "ioBroker out",
                      "z": "3054ca10.a7b9e6",
                      "name": "Request channel info",
                      "topic": "tr-064.1.states.command",
                      "ack": "false",
                      "autoCreate": "false",
                      "stateName": "",
                      "role": "",
                      "payloadType": "",
                      "readonly": "",
                      "stateUnit": "",
                      "stateMin": "",
                      "stateMax": "",
                      "x": 960,
                      "y": 360,
                      "wires": []
                  },
                  {
                      "id": "c04328ca.d76ae8",
                      "type": "inject",
                      "z": "3054ca10.a7b9e6",
                      "name": "GetChannelInfo",
                      "props": [
                          {
                              "p": "payload"
                          }
                      ],
                      "repeat": "",
                      "crontab": "00 05 * * *",
                      "once": false,
                      "onceDelay": 0.1,
                      "topic": "",
                      "payload": "{\"service\":\"urn:dslforum-org:service:WLANConfiguration:2\",\"action\":\"GetChannelInfo\",\"params\":{}}",
                      "payloadType": "json",
                      "x": 290,
                      "y": 340,
                      "wires": [
                          [
                              "bac9031c.48509"
                          ]
                      ]
                  },
                  {
                      "id": "bac9031c.48509",
                      "type": "json",
                      "z": "3054ca10.a7b9e6",
                      "name": "",
                      "property": "payload",
                      "action": "str",
                      "pretty": true,
                      "x": 490,
                      "y": 360,
                      "wires": [
                          [
                              "955c676a.93fea8"
                          ]
                      ]
                  },
                  {
                      "id": "85163997.242b48",
                      "type": "inject",
                      "z": "3054ca10.a7b9e6",
                      "name": "SetChannel",
                      "props": [
                          {
                              "p": "payload"
                          }
                      ],
                      "repeat": "",
                      "crontab": "",
                      "once": false,
                      "onceDelay": 0.1,
                      "topic": "",
                      "payload": "{\"service\":\"urn:dslforum-org:service:WLANConfiguration:2\",\"action\":\"SetChannel\",\"params\":{\"NewChannel\":\"48\"}}",
                      "payloadType": "json",
                      "x": 270,
                      "y": 440,
                      "wires": [
                          [
                              "bac9031c.48509"
                          ]
                      ]
                  },
                  {
                      "id": "7e96da1.62c4424",
                      "type": "ioBroker in",
                      "z": "3054ca10.a7b9e6",
                      "name": "commandResult",
                      "topic": "tr-064.1.states.commandResult",
                      "payloadType": "value",
                      "onlyack": "",
                      "func": "rbe",
                      "gap": "",
                      "fireOnStart": "false",
                      "x": 260,
                      "y": 140,
                      "wires": [
                          [
                              "14ef63f9.2cb11c"
                          ]
                      ]
                  },
                  {
                      "id": "14ef63f9.2cb11c",
                      "type": "switch",
                      "z": "3054ca10.a7b9e6",
                      "name": "",
                      "property": "payload",
                      "propertyType": "msg",
                      "rules": [
                          {
                              "t": "cont",
                              "v": "\"48\"",
                              "vt": "str"
                          },
                          {
                              "t": "eq",
                              "v": "{}",
                              "vt": "str"
                          },
                          {
                              "t": "else"
                          }
                      ],
                      "checkall": "true",
                      "repair": false,
                      "outputs": 3,
                      "x": 450,
                      "y": 140,
                      "wires": [
                          [],
                          [],
                          [
                              "c6c6dbfb.8e31c8"
                          ]
                      ]
                  },
                  {
                      "id": "c6c6dbfb.8e31c8",
                      "type": "function",
                      "z": "3054ca10.a7b9e6",
                      "name": "Create JSON",
                      "func": "var data={\"service\": \"urn:dslforum-org:service:WLANConfiguration:2\",\n\"action\": \"SetChannel\",\n\"params\": {\"NewChannel\": \"48\"}};\nnode.log(typeof data);\nmsg.payload=JSON.stringify(data);\nreturn msg;",
                      "outputs": 1,
                      "noerr": 0,
                      "initialize": "",
                      "finalize": "",
                      "libs": [],
                      "x": 670,
                      "y": 260,
                      "wires": [
                          [
                              "955c676a.93fea8"
                          ]
                      ]
                  }
              ]
              
              mickym 1 Reply Last reply Reply Quote 0
              • mickym
                mickym Most Active @kla960 last edited by mickym

                @kla960 Ehrlich gesagt verstehe ich nicht - wieso man eine function Node für sowas braucht und eine Switch Node - von den man 2 Ausgänge nicht braucht.

                Wenn der Kanal nicht 48 ist, dann soll doch der Flow nichts machen.

                e12f391d-a529-45f0-a602-3050fa0952b3-image.png

                [
                   {
                       "id": "955c676a.93fea8",
                       "type": "ioBroker out",
                       "z": "3054ca10.a7b9e6",
                       "name": "Request channel info",
                       "topic": "tr-064.1.states.command",
                       "ack": "false",
                       "autoCreate": "false",
                       "stateName": "",
                       "role": "",
                       "payloadType": "",
                       "readonly": "",
                       "stateUnit": "",
                       "stateMin": "",
                       "stateMax": "",
                       "x": 1160,
                       "y": 300,
                       "wires": []
                   },
                   {
                       "id": "c04328ca.d76ae8",
                       "type": "inject",
                       "z": "3054ca10.a7b9e6",
                       "name": "GetChannelInfo",
                       "props": [
                           {
                               "p": "payload"
                           }
                       ],
                       "repeat": "",
                       "crontab": "00 05 * * *",
                       "once": false,
                       "onceDelay": 0.1,
                       "topic": "",
                       "payload": "{\"service\":\"urn:dslforum-org:service:WLANConfiguration:2\",\"action\":\"GetChannelInfo\",\"params\":{}}",
                       "payloadType": "json",
                       "x": 770,
                       "y": 300,
                       "wires": [
                           [
                               "bac9031c.48509"
                           ]
                       ]
                   },
                   {
                       "id": "7e96da1.62c4424",
                       "type": "ioBroker in",
                       "z": "3054ca10.a7b9e6",
                       "name": "commandResult",
                       "topic": "tr-064.1.states.commandResult",
                       "payloadType": "value",
                       "onlyack": "",
                       "func": "rbe",
                       "gap": "",
                       "fireOnStart": "false",
                       "x": 200,
                       "y": 240,
                       "wires": [
                           [
                               "f72290f1ea35b588"
                           ]
                       ]
                   },
                   {
                       "id": "bac9031c.48509",
                       "type": "json",
                       "z": "3054ca10.a7b9e6",
                       "name": "",
                       "property": "payload",
                       "action": "",
                       "pretty": true,
                       "x": 970,
                       "y": 300,
                       "wires": [
                           [
                               "955c676a.93fea8"
                           ]
                       ]
                   },
                   {
                       "id": "f72290f1ea35b588",
                       "type": "json",
                       "z": "3054ca10.a7b9e6",
                       "name": "",
                       "property": "payload",
                       "action": "",
                       "pretty": false,
                       "x": 370,
                       "y": 240,
                       "wires": [
                           [
                               "2395f29ebcb32c33"
                           ]
                       ]
                   },
                   {
                       "id": "2395f29ebcb32c33",
                       "type": "switch",
                       "z": "3054ca10.a7b9e6",
                       "name": "Channel nicht 48 ?",
                       "property": "payload.NewChannel",
                       "propertyType": "msg",
                       "rules": [
                           {
                               "t": "neq",
                               "v": "48",
                               "vt": "str"
                           }
                       ],
                       "checkall": "true",
                       "repair": false,
                       "outputs": 1,
                       "x": 550,
                       "y": 240,
                       "wires": [
                           [
                               "e122029bd78ce137"
                           ]
                       ]
                   },
                   {
                       "id": "e122029bd78ce137",
                       "type": "change",
                       "z": "3054ca10.a7b9e6",
                       "name": "",
                       "rules": [
                           {
                               "t": "set",
                               "p": "payload",
                               "pt": "msg",
                               "to": "{\"service\":\"urn:dslforum-org:service:WLANConfiguration:2\",\"action\":\"SetChannel\",\"params\":{\"NewChannel\":\"48\"}}",
                               "tot": "json"
                           }
                       ],
                       "action": "",
                       "property": "",
                       "from": "",
                       "to": "",
                       "reg": false,
                       "x": 770,
                       "y": 240,
                       "wires": [
                           [
                               "bac9031c.48509"
                           ]
                       ]
                   }
                ]
                

                K 1 Reply Last reply Reply Quote 0
                • K
                  kla960 @mickym last edited by

                  @mickym sagte in JSON an tr-069 command übergeben:

                  @kla960 Ehrlich gesagt verstehe ich nicht - wieso man eine function Node für sowas braucht und eine Switch Node - von den man 2 Ausgänge nicht braucht.
                  Wenn der Kanal nicht 48 ist, dann soll doch der Flow nichts machen.

                  hast du mal den Code zu dem Bild?

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

                    @kla960 hängt doch unten dran - Du kannst noch filtern, dass nur die Ergebnisse verarbeitet werden, der NewChannel als Eigenschaft hat.

                    Falls doch nur prüfen willst, dass das commandResult genau das Objekt enthält, was Du sonst zurück bekommst: Also

                    b8003cf8-0966-4037-a9dd-834c632bc77c-image.png

                    dann kannst Du noch folgende switch Node als Filter vorne dran hängen:
                    78fa1d0e-f21b-4cf5-9bfc-e90589c84ea4-image.png

                    hier nochmal der komplette Flow:

                    0ae7d84d-773b-4c83-9455-0fd255c31887-image.png

                    [
                       {
                           "id": "955c676a.93fea8",
                           "type": "ioBroker out",
                           "z": "54b226bc.0793e8",
                           "name": "Request channel info",
                           "topic": "tr-064.1.states.command",
                           "ack": "false",
                           "autoCreate": "false",
                           "stateName": "",
                           "role": "",
                           "payloadType": "",
                           "readonly": "",
                           "stateUnit": "",
                           "stateMin": "",
                           "stateMax": "",
                           "x": 1280,
                           "y": 3000,
                           "wires": []
                       },
                       {
                           "id": "c04328ca.d76ae8",
                           "type": "inject",
                           "z": "54b226bc.0793e8",
                           "name": "GetChannelInfo",
                           "props": [
                               {
                                   "p": "payload"
                               }
                           ],
                           "repeat": "",
                           "crontab": "00 05 * * *",
                           "once": false,
                           "onceDelay": 0.1,
                           "topic": "",
                           "payload": "{\"service\":\"urn:dslforum-org:service:WLANConfiguration:2\",\"action\":\"GetChannelInfo\",\"params\":{}}",
                           "payloadType": "json",
                           "x": 910,
                           "y": 3000,
                           "wires": [
                               [
                                   "bac9031c.48509"
                               ]
                           ]
                       },
                       {
                           "id": "7e96da1.62c4424",
                           "type": "ioBroker in",
                           "z": "54b226bc.0793e8",
                           "name": "commandResult",
                           "topic": "tr-064.1.states.commandResult",
                           "payloadType": "value",
                           "onlyack": "",
                           "func": "rbe",
                           "gap": "",
                           "fireOnStart": "false",
                           "x": 100,
                           "y": 2940,
                           "wires": [
                               [
                                   "f72290f1ea35b588"
                               ]
                           ]
                       },
                       {
                           "id": "bac9031c.48509",
                           "type": "json",
                           "z": "54b226bc.0793e8",
                           "name": "",
                           "property": "payload",
                           "action": "",
                           "pretty": true,
                           "x": 1090,
                           "y": 3000,
                           "wires": [
                               [
                                   "955c676a.93fea8"
                               ]
                           ]
                       },
                       {
                           "id": "f72290f1ea35b588",
                           "type": "json",
                           "z": "54b226bc.0793e8",
                           "name": "",
                           "property": "payload",
                           "action": "",
                           "pretty": false,
                           "x": 270,
                           "y": 2940,
                           "wires": [
                               [
                                   "4bfc658be9e3e893"
                               ]
                           ]
                       },
                       {
                           "id": "2395f29ebcb32c33",
                           "type": "switch",
                           "z": "54b226bc.0793e8",
                           "name": "Channel nicht 48 ?",
                           "property": "payload.NewChannel",
                           "propertyType": "msg",
                           "rules": [
                               {
                                   "t": "neq",
                                   "v": "48",
                                   "vt": "str"
                               }
                           ],
                           "checkall": "true",
                           "repair": false,
                           "outputs": 1,
                           "x": 690,
                           "y": 2940,
                           "wires": [
                               [
                                   "e122029bd78ce137"
                               ]
                           ]
                       },
                       {
                           "id": "e122029bd78ce137",
                           "type": "change",
                           "z": "54b226bc.0793e8",
                           "name": "setze Channel 48",
                           "rules": [
                               {
                                   "t": "set",
                                   "p": "payload",
                                   "pt": "msg",
                                   "to": "{\"service\":\"urn:dslforum-org:service:WLANConfiguration:2\",\"action\":\"SetChannel\",\"params\":{\"NewChannel\":\"48\"}}",
                                   "tot": "json"
                               }
                           ],
                           "action": "",
                           "property": "",
                           "from": "",
                           "to": "",
                           "reg": false,
                           "x": 910,
                           "y": 2940,
                           "wires": [
                               [
                                   "bac9031c.48509"
                               ]
                           ]
                       },
                       {
                           "id": "4bfc658be9e3e893",
                           "type": "switch",
                           "z": "54b226bc.0793e8",
                           "name": "filter commandResult ",
                           "property": "$exists(payload.NewChannel) and $exists(payload.NewPossibleChannels)\t",
                           "propertyType": "jsonata",
                           "rules": [
                               {
                                   "t": "true"
                               }
                           ],
                           "checkall": "true",
                           "repair": false,
                           "outputs": 1,
                           "x": 460,
                           "y": 2940,
                           "wires": [
                               [
                                   "2395f29ebcb32c33"
                               ]
                           ]
                       }
                    ]
                    

                    1 Reply Last reply Reply Quote 0
                    • F
                      frankyboy73 @kla960 last edited by

                      @kla960 sagte in JSON an tr-069 command übergeben:

                      hast du mal den Code zu dem Bild?

                      Klick mal auf "Spoiler" in mickym Post

                      1 Reply Last reply Reply Quote 0
                      • K
                        kla960 last edited by kla960

                        @mickym sagte in JSON an tr-069 command übergeben:

                        dann kannst Du noch folgende switch Node als Filter vorne dran hängen:

                        Ja, super danke. NewPossibleChannels muss man aber nicht zusätzlich prüfen. Ansonsten habe ich das jetzt so laufen.

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

                          @kla960 trotzdem mal eine blöde Frage: Wenn Du kein Autokanal eingestellt hast, dann bleibt doch der Kanal fix eingestellt. Warum muss man das prüfen und manuell wieder umstellen?

                          K 1 Reply Last reply Reply Quote 0
                          • K
                            kla960 @mickym last edited by

                            @mickym Gibt keine blöden Fragen.
                            Ja, das ist bei mir Fix eingetragen. Kein Autokanal. Dennoch stellt sich immer mal wieder der Kannal um. Und sobald ein Kanal ab 52 aufwärts eingestellt ist, funktionieren einige Geräte nicht mehr wie sie sollen.

                            Amazon Echos können kein Multiroom-Audio mehr. FTV Sticks verbinden sich nicht usw.

                            AVM Support sagt: "Ja, es gibt trotz fest eingestelltem Kanal umstände die einen automatischen Wechsel herbeiführen."

                            Also: Gemotze der Familie ertragen, wenn wieder was nicht geht 😧 , oder mit dem iobroker was dagegen tun.

                            mickym 1 Reply Last reply Reply Quote 0
                            • K
                              kla960 last edited by

                              Den zweiten Switch kann man noch eliminieren, indem man den ersten wie folgt anpasst:

                              $exists(payload.NewChannel) and payload.NewChannel in ["52","56","60","64","100","104","108","112","116","120","124","128","132","136","140"]
                              

                              Wobei ich jetzt die Kanäle von 36 - 48 zulasse.

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

                                @kla960 sagte in JSON an tr-069 command übergeben:

                                @mickym Gibt keine blöden Fragen.
                                Ja, das ist bei mir Fix eingetragen. Kein Autokanal. Dennoch stellt sich immer mal wieder der Kannal um. Und sobald ein Kanal ab 52 aufwärts eingestellt ist, funktionieren einige Geräte nicht mehr wie sie sollen.

                                Amazon Echos können kein Multiroom-Audio mehr. FTV Sticks verbinden sich nicht usw.

                                AVM Support sagt: "Ja, es gibt trotz fest eingestelltem Kanal umstände die einen automatischen Wechsel herbeiführen."

                                Also: Gemotze der Familie ertragen, wenn wieder was nicht geht 😧 , oder mit dem iobroker was dagegen tun.

                                Ok - das ist ja mal eine gute Info. Das 5 GHz Band hat wahrscheinlich das Problem mit der Radarkollision wahrscheinlich das Problem. Aber wie ich sehe, bist Du ja nun am Feintunen - so dass Du Dir glaub jetzt gut selbst zu helfen weißt.

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

                                Support us

                                ioBroker
                                Community Adapters
                                Donate

                                1.1k
                                Online

                                31.7k
                                Users

                                79.7k
                                Topics

                                1.3m
                                Posts

                                3
                                15
                                378
                                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