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. W2839 Messwerte (Tuya) über Node Red in CCU3 einlesen

    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

    W2839 Messwerte (Tuya) über Node Red in CCU3 einlesen

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

      @mickym sieht bei mir so aus: Bildschirmfoto 2024-05-29 um 18.15.51.png

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

        @frieder Ja dann klick halt mal auf den Pfeil bei Data und schau welchen Wert Du brauchst - du musst die Objekte halt aufmachen.

        f8222587-0570-43e8-8350-2156b6394d36-image.png

        Der Pfeil muss nach unten zeigen, um ein Objekt zu expandieren. Auch das objekt unter data öffnen usw.

        copy path.gif

        Und wenn Du den Wert hast, kopierst Du den Pfad in die Zwischenablage und den dann in die Change Node.

        Und das ist KÄSE:

        68f6bbde-1953-4f88-8170-54de482831a6-image.png

        Du setzt nur msg.payload auf den Wert des Nachrichtenobjektes das Dich interessiert. Also auf jeden Fall nur die msg.payload und nichts anderes.

        Also msg.payload setzt Du auf msg.payload.data.WASweissICH. Mach das Objekt auf und schau welche Werte Dich interessieren!

        F 1 Reply Last reply Reply Quote 0
        • F
          Frieder @mickym last edited by

          @mickym Habe es probiert hat nicht weitergeholfen. Mir ist aufgefallen, das die Daten schon am Anfang nach dem Auslesen für mich nicht lesbar aussehen. Ist das richtig so?Bildschirmfoto 2024-05-30 um 17.42.16.png

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

            @frieder Ja so ist das richtig. Aber Du siehst ja selbst dass die Daten nicht lesbar sind. Was sind denn das für Nodes und was kommt denn am unteren Ausgang raus?

            Was sind denn das für nodes?

            F 1 Reply Last reply Reply Quote 0
            • F
              Frieder @mickym last edited by Homoran

              @mickym !So sieht es jetzt aktuell aus.
              Bildschirmfoto 2024-05-30 um 18.06.10.png

              MOD-EDIT: Bild als Bild konfiguriert

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

                @frieder Ja solange aus debug1 nichts Gscheites rauskommt, kann bei den anderen erst recht nichts rauskommen.
                Nochmal,

                1. Was für Nodes sind das?
                2. Was kommt am 2. Ausgang raus (weitere debug Node dran machen und anders benennen)

                Wenn das diese Nodes sind: https://flows.nodered.org/node/node-red-contrib-tuya-smart-device

                f0799595-e73a-4ff0-8fc9-84c70c443c60-image.png

                Du siehst ja was als data rauskommen muss.

                Hast du den Input entsprechend gesetzt? Du haust ja nur einen timestamp in die tuya Node - das ist sicher nicht richtig. Lies halt mal die Hilfe.

                Hast Du mal den Beispielflow importiert?

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

                  @frieder Diese Nodes sind ausserdem schon uralt, meinst Du nicht, dass diese besser sind:

                  https://flows.nodered.org/node/node-red-contrib-tuya-devices

                  na so alt sind sie doch nicht. ich schau mir die mal an - aber ich hab im Moment kein tuya device.

                  Die anderen Nodes triggern vielleicht selbst. Also schau erst mal, dass Du vernünftige Daten aus deinen Geräten bekommst, bevor Du sie in Homematic schickst. Das ist erst der 2. Schritt.

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

                    So kein Wunder dass bei Dir nur Schmarn rauskommt. Hier importiere mal den mitgelieferten Beispielflow:

                    [
                       {
                           "id": "b2e04683.825318",
                           "type": "tab",
                           "label": "Example Flow",
                           "disabled": false,
                           "info": ""
                       },
                       {
                           "id": "e63245d0.e6cdc8",
                           "type": "tuya-smart-device",
                           "z": "b2e04683.825318",
                           "deviceName": "Tv Light",
                           "disableAutoStart": true,
                           "deviceId": "",
                           "deviceKey": "",
                           "storeAsCreds": false,
                           "deviceIp": "",
                           "retryTimeout": "1001",
                           "findTimeout": "2000",
                           "tuyaVersion": "3.1",
                           "eventMode": "event-both",
                           "x": 680,
                           "y": 360,
                           "wires": [
                               [
                                   "ff4bd686.53ae18"
                               ],
                               [
                                   "15d22ba6.824b84"
                               ]
                           ]
                       },
                       {
                           "id": "c016131.e98faf",
                           "type": "function",
                           "z": "b2e04683.825318",
                           "name": "",
                           "func": "msg.payload ={\n   //dps : 1,\n   dps: 20,\n    set : msg.payload\n}\n\n/*\n\n    */\nreturn msg;",
                           "outputs": 1,
                           "timeout": "",
                           "noerr": 0,
                           "initialize": "",
                           "finalize": "",
                           "libs": [],
                           "x": 510,
                           "y": 360,
                           "wires": [
                               [
                                   "e63245d0.e6cdc8"
                               ]
                           ]
                       },
                       {
                           "id": "993c8470.01a278",
                           "type": "inject",
                           "z": "b2e04683.825318",
                           "name": "Turn On",
                           "props": [
                               {
                                   "p": "payload"
                               },
                               {
                                   "p": "topic",
                                   "vt": "str"
                               }
                           ],
                           "repeat": "",
                           "crontab": "",
                           "once": false,
                           "onceDelay": 0.1,
                           "topic": "",
                           "payload": "true",
                           "payloadType": "bool",
                           "x": 310,
                           "y": 320,
                           "wires": [
                               [
                                   "c016131.e98faf"
                               ]
                           ]
                       },
                       {
                           "id": "6403cde.251ab34",
                           "type": "inject",
                           "z": "b2e04683.825318",
                           "name": "Turn Off",
                           "props": [
                               {
                                   "p": "payload"
                               },
                               {
                                   "p": "topic",
                                   "vt": "str"
                               }
                           ],
                           "repeat": "",
                           "crontab": "",
                           "once": false,
                           "onceDelay": 0.1,
                           "topic": "",
                           "payload": "false",
                           "payloadType": "bool",
                           "x": 310,
                           "y": 400,
                           "wires": [
                               [
                                   "c016131.e98faf"
                               ]
                           ]
                       },
                       {
                           "id": "e4cfcdc.9520a3",
                           "type": "tuya-smart-device-generic",
                           "z": "b2e04683.825318",
                           "name": "",
                           "eventMode": "event-both",
                           "x": 660,
                           "y": 740,
                           "wires": [
                               [
                                   "1e77cd28.a8c303"
                               ]
                           ]
                       },
                       {
                           "id": "81a451cc.919f9",
                           "type": "function",
                           "z": "b2e04683.825318",
                           "name": "",
                           "func": "msg.payload ={\n            \"deviceVirtualId\": \"\",\n            //deviceIp: \"192.168.1.71\",\n            \"deviceKey\": \"\",\n            \"deviceName\": \"PM\",\n            \"operation\": \"SET\", // optional default : SET\n            \"payload\": {\n                \"dps\": 20,\n                \"set\": msg.payload\n            },\n        //    \"version\":\"3.2\"\n            \n        }\nreturn msg;",
                           "outputs": 1,
                           "noerr": 0,
                           "initialize": "",
                           "finalize": "",
                           "x": 450,
                           "y": 740,
                           "wires": [
                               [
                                   "e4cfcdc.9520a3"
                               ]
                           ]
                       },
                       {
                           "id": "dc28dca8.674c1",
                           "type": "inject",
                           "z": "b2e04683.825318",
                           "name": "ON",
                           "props": [
                               {
                                   "p": "payload"
                               },
                               {
                                   "p": "topic",
                                   "vt": "str"
                               }
                           ],
                           "repeat": "",
                           "crontab": "",
                           "once": false,
                           "onceDelay": 0.1,
                           "topic": "",
                           "payload": "true",
                           "payloadType": "bool",
                           "x": 240,
                           "y": 780,
                           "wires": [
                               [
                                   "81a451cc.919f9"
                               ]
                           ]
                       },
                       {
                           "id": "1e77cd28.a8c303",
                           "type": "debug",
                           "z": "b2e04683.825318",
                           "name": "",
                           "active": true,
                           "tosidebar": true,
                           "console": false,
                           "tostatus": false,
                           "complete": "false",
                           "statusVal": "",
                           "statusType": "auto",
                           "x": 940,
                           "y": 740,
                           "wires": []
                       },
                       {
                           "id": "4295327a.09bf3c",
                           "type": "inject",
                           "z": "b2e04683.825318",
                           "name": "OFF",
                           "props": [
                               {
                                   "p": "payload"
                               },
                               {
                                   "p": "topic",
                                   "vt": "str"
                               }
                           ],
                           "repeat": "",
                           "crontab": "",
                           "once": false,
                           "onceDelay": 0.1,
                           "topic": "",
                           "payload": "false",
                           "payloadType": "bool",
                           "x": 240,
                           "y": 700,
                           "wires": [
                               [
                                   "81a451cc.919f9"
                               ]
                           ]
                       },
                       {
                           "id": "8f69fe68.9e4ce",
                           "type": "catch",
                           "z": "b2e04683.825318",
                           "name": "",
                           "scope": null,
                           "uncaught": false,
                           "x": 640,
                           "y": 140,
                           "wires": [
                               [
                                   "3764c769.6e1298"
                               ]
                           ]
                       },
                       {
                           "id": "3764c769.6e1298",
                           "type": "debug",
                           "z": "b2e04683.825318",
                           "name": "On Error",
                           "active": true,
                           "tosidebar": true,
                           "console": false,
                           "tostatus": false,
                           "complete": "true",
                           "targetType": "full",
                           "statusVal": "",
                           "statusType": "auto",
                           "x": 870,
                           "y": 140,
                           "wires": []
                       },
                       {
                           "id": "ff4bd686.53ae18",
                           "type": "debug",
                           "z": "b2e04683.825318",
                           "name": "Device Data",
                           "active": true,
                           "tosidebar": true,
                           "console": false,
                           "tostatus": false,
                           "complete": "true",
                           "targetType": "full",
                           "statusVal": "",
                           "statusType": "auto",
                           "x": 880,
                           "y": 300,
                           "wires": []
                       },
                       {
                           "id": "15d22ba6.824b84",
                           "type": "debug",
                           "z": "b2e04683.825318",
                           "name": "Node State",
                           "active": true,
                           "tosidebar": true,
                           "console": false,
                           "tostatus": false,
                           "complete": "payload",
                           "targetType": "msg",
                           "statusVal": "",
                           "statusType": "auto",
                           "x": 880,
                           "y": 400,
                           "wires": []
                       },
                       {
                           "id": "47ea1d2a.7d85f4",
                           "type": "inject",
                           "z": "b2e04683.825318",
                           "name": "RECONNECT ACTION",
                           "props": [
                               {
                                   "p": "payload"
                               },
                               {
                                   "p": "topic",
                                   "vt": "str"
                               }
                           ],
                           "repeat": "",
                           "crontab": "",
                           "once": false,
                           "onceDelay": 0.1,
                           "topic": "",
                           "payload": "{\"operation\":\"CONTROL\",\"action\":\"RECONNECT\"}",
                           "payloadType": "json",
                           "x": 340,
                           "y": 260,
                           "wires": [
                               [
                                   "e63245d0.e6cdc8"
                               ]
                           ]
                       },
                       {
                           "id": "1991e72.c15c719",
                           "type": "inject",
                           "z": "b2e04683.825318",
                           "name": "DISCONNECT ACTION",
                           "props": [
                               {
                                   "p": "payload"
                               },
                               {
                                   "p": "topic",
                                   "vt": "str"
                               }
                           ],
                           "repeat": "",
                           "crontab": "",
                           "once": false,
                           "onceDelay": 0.1,
                           "topic": "",
                           "payload": "{\"operation\":\"CONTROL\",\"action\":\"DISCONNECT\"}",
                           "payloadType": "json",
                           "x": 340,
                           "y": 200,
                           "wires": [
                               [
                                   "e63245d0.e6cdc8"
                               ]
                           ]
                       },
                       {
                           "id": "c820897454429637",
                           "type": "inject",
                           "z": "b2e04683.825318",
                           "name": "Get Schema",
                           "props": [
                               {
                                   "p": "payload"
                               },
                               {
                                   "p": "topic",
                                   "vt": "str"
                               }
                           ],
                           "repeat": "",
                           "crontab": "",
                           "once": false,
                           "onceDelay": 0.1,
                           "topic": "",
                           "payload": "{\"operation\":\"GET\",\"schema\":true}",
                           "payloadType": "json",
                           "x": 310,
                           "y": 100,
                           "wires": [
                               [
                                   "e63245d0.e6cdc8"
                               ]
                           ]
                       },
                       {
                           "id": "7b416b83a6edfd2b",
                           "type": "inject",
                           "z": "b2e04683.825318",
                           "name": "Get Status of dps 1",
                           "props": [
                               {
                                   "p": "payload"
                               },
                               {
                                   "p": "topic",
                                   "vt": "str"
                               }
                           ],
                           "repeat": "",
                           "crontab": "",
                           "once": false,
                           "onceDelay": 0.1,
                           "topic": "",
                           "payload": "{\"operation\":\"GET\" , \"dps\": 1}",
                           "payloadType": "json",
                           "x": 330,
                           "y": 40,
                           "wires": [
                               [
                                   "e63245d0.e6cdc8"
                               ]
                           ]
                       },
                       {
                           "id": "8616fca1bda4ddbf",
                           "type": "inject",
                           "z": "b2e04683.825318",
                           "name": "SET EVENT MODE - DATA",
                           "props": [
                               {
                                   "p": "payload"
                               },
                               {
                                   "p": "topic",
                                   "vt": "str"
                               }
                           ],
                           "repeat": "",
                           "crontab": "",
                           "once": false,
                           "onceDelay": 0.1,
                           "topic": "",
                           "payload": "{\"operation\":\"CONTROL\",\"action\":\"SET_EVENT_MODE\",\"value\":\"event-data\"}",
                           "payloadType": "json",
                           "x": 260,
                           "y": 460,
                           "wires": [
                               [
                                   "e63245d0.e6cdc8"
                               ]
                           ]
                       },
                       {
                           "id": "cbe30d8393fbb66a",
                           "type": "inject",
                           "z": "b2e04683.825318",
                           "name": "SET EVENT MODE - DP REFRESH",
                           "props": [
                               {
                                   "p": "payload"
                               },
                               {
                                   "p": "topic",
                                   "vt": "str"
                               }
                           ],
                           "repeat": "",
                           "crontab": "",
                           "once": false,
                           "onceDelay": 0.1,
                           "topic": "",
                           "payload": "{\"operation\":\"CONTROL\",\"action\":\"SET_EVENT_MODE\",\"value\":\"event-dp-refresh\"}",
                           "payloadType": "json",
                           "x": 280,
                           "y": 500,
                           "wires": [
                               [
                                   "e63245d0.e6cdc8"
                               ]
                           ]
                       },
                       {
                           "id": "4df579385b195b55",
                           "type": "inject",
                           "z": "b2e04683.825318",
                           "name": "Update Find Timeout",
                           "props": [
                               {
                                   "p": "payload"
                               },
                               {
                                   "p": "topic",
                                   "vt": "str"
                               }
                           ],
                           "repeat": "",
                           "crontab": "",
                           "once": false,
                           "onceDelay": 0.1,
                           "topic": "",
                           "payload": "{\"operation\":\"CONTROL\",\"action\":\"SET_FIND_TIMEOUT\",\"value\":1234}",
                           "payloadType": "json",
                           "x": 230,
                           "y": 540,
                           "wires": [
                               [
                                   "e63245d0.e6cdc8"
                               ]
                           ]
                       },
                       {
                           "id": "65ab15b279337d86",
                           "type": "inject",
                           "z": "b2e04683.825318",
                           "name": "Update  Retry Timeout",
                           "props": [
                               {
                                   "p": "payload"
                               },
                               {
                                   "p": "topic",
                                   "vt": "str"
                               }
                           ],
                           "repeat": "",
                           "crontab": "",
                           "once": false,
                           "onceDelay": 0.1,
                           "topic": "",
                           "payload": "{\"operation\":\"CONTROL\",\"action\":\"SET_RETRY_TIMEOUT\",\"value\":1234}",
                           "payloadType": "json",
                           "x": 240,
                           "y": 580,
                           "wires": [
                               [
                                   "e63245d0.e6cdc8"
                               ]
                           ]
                       },
                       {
                           "id": "51d98c1b9e3ce54b",
                           "type": "inject",
                           "z": "b2e04683.825318",
                           "name": "CONNECT ACTION",
                           "props": [
                               {
                                   "p": "payload"
                               },
                               {
                                   "p": "topic",
                                   "vt": "str"
                               }
                           ],
                           "repeat": "",
                           "crontab": "",
                           "once": false,
                           "onceDelay": 0.1,
                           "topic": "",
                           "payload": "{\"operation\":\"CONTROL\",\"action\":\"CONNECT\"}",
                           "payloadType": "json",
                           "x": 330,
                           "y": 160,
                           "wires": [
                               [
                                   "e63245d0.e6cdc8"
                               ]
                           ]
                       }
                    ]
                    

                    Da siehst Du doch, welche Kommandos Du in die Node schicken musst um was zu erreichen:

                    cbcca203-5892-4817-8994-ff71fa301daf-image.png

                    Jedenfalls wenn man da nur einen timestamp reinschickt, dann kommt auch nichts Richtiges raus.

                    Schau mal, um den Status des dps auszulesen, musst Du folgende payload in die tuya Node speisen:

                    96648813-d522-4359-8887-2dabb0d701a7-image.png

                    Welches dps oder keine Ahnung Du auslesen willst, weiß ich nicht.

                    [
                       {
                           "id": "7b416b83a6edfd2b",
                           "type": "inject",
                           "z": "b2e04683.825318",
                           "name": "Get Status of dps 1",
                           "props": [
                               {
                                   "p": "payload"
                               },
                               {
                                   "p": "topic",
                                   "vt": "str"
                               }
                           ],
                           "repeat": "",
                           "crontab": "",
                           "once": false,
                           "onceDelay": 0.1,
                           "topic": "",
                           "payload": "{\"operation\":\"GET\" , \"dps\": 1}",
                           "payloadType": "json",
                           "x": 330,
                           "y": 40,
                           "wires": [
                               [
                                   "e63245d0.e6cdc8"
                               ]
                           ]
                       }
                    ]
                    

                    Also die payload muss ein Objekt mit folgendem Inhalt sein:

                    {"operation":"GET" , "dps": 1}
                    
                    F 1 Reply Last reply Reply Quote 0
                    • F
                      Frieder @mickym last edited by

                      @mickym Ich wollte nur rückmelden, dass ich es geschafft habe. Alles funktioniert wie gewünscht. Ursache war wirklich dieses veraltete Nodes.
                      Vielen Dank für die Hilfe. Bildschirmfoto 2024-06-01 um 10.22.45.png

                      H 1 Reply Last reply Reply Quote 0
                      • H
                        hevilp @Frieder last edited by hevilp

                        @frieder würdest du den Flow zur Verfügung stellen? Bei mir ist das Ding auch gerade angekommen.

                        Ich nutze ioBroker und hab ihn bereits im Netzwerk

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

                        Support us

                        ioBroker
                        Community Adapters
                        Donate

                        590
                        Online

                        31.9k
                        Users

                        80.1k
                        Topics

                        1.3m
                        Posts

                        3
                        16
                        910
                        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