fhempy: Tuya Cloud

Begonnen von dominik, 30 Juli 2021, 21:36:48

Vorheriges Thema - Nächstes Thema

stefanru

Hmm,

was ist das für ein Screenshot?

Ich habe folgende Services.

Wobei:
Core abgelaufen ist aber kein Problem darstellt.
Subscribe : Trial Edition, Expiration Time : 2021-11-18

Authorization ist in der Basic Edition und ok.
Dort steht 12 Monate und Price ist 0$

Smart Home Scene Linkage, Data Dashboard Service ist gelistet als Time-Limited Free.
Dort steht 12 Monate und Price ist 0$

Device Status Notification
Subscribe : Trial EditionExpiration Time : 2022-10-18

Gruß,
Stefan






satprofi

deine gewünschte seite, sieht bei mir eben anders aus.
gruss
-----------------------------------------------------------------------
beelink miniPC - Fhem 6.x CUL 868, FS20, NetIO230 CUL 433
HMLAN, HM-CC-RT-DN,Homematic Actoren,LD382A,Telegram

dominik

Wie sieht diese Seite bei dir aus? Poste bitte den gesamten Screen damit man sieht in welchem Menüpunkt du bist.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

MiKn

Hi,

erstmal danke für das Modul. Ich habe folgenden Wireless Schalter mit 2x Taster (Bild 1).

Ich würde gerne mit der Linken Taste "switch1_value" Lichter einschalten und mit der Rechten Taste "switch_mode2" Lichter ausschalten. Leider wird beim schalten von Taste 2 auch immer "switch1_value" mit getriggert (Bild 2), so dass ich das Licht nur einschalten aber nicht ausschalten kann. Kann man irgendwie zwei unterschiedliche Readings für Taste 1 und Taste 2 integrieren?

defmod Schalter_Flur_Oben DOIF ([Wireless_Switch__bfc6fc95442d988644evzt:switch1_value] eq "single_click")\
  (set MQTT2_zigbee_WohnzimmerOben1 on, set MQTT2_zigbee_WohnzimmerOben2 on, set MQTT2_zigbee_WohnzimmerOben3 on)\
DOELSEIF ([Wireless_Switch__bfc6fc95442d988644evzt:switch_mode2] eq "click")\
  (set MQTT2_zigbee_WohnzimmerOben1 off, set MQTT2_zigbee_WohnzimmerOben2 off, set MQTT2_zigbee_WohnzimmerOben3 off)
attr Schalter_Flur_Oben do always

setstate Schalter_Flur_Oben cmd_1
setstate Schalter_Flur_Oben 2022-03-01 19:10:33 Device Wireless_Switch__bfc6fc95442d988644evzt
setstate Schalter_Flur_Oben 2022-03-01 19:10:33 cmd 1
setstate Schalter_Flur_Oben 2022-03-01 19:10:33 cmd_event Wireless_Switch__bfc6fc95442d988644evzt
setstate Schalter_Flur_Oben 2022-03-01 19:10:33 cmd_nr 1
setstate Schalter_Flur_Oben 2022-03-01 19:10:33 e_Wireless_Switch__bfc6fc95442d988644evzt_switch1_value single_click
setstate Schalter_Flur_Oben 2022-03-01 19:10:33 e_Wireless_Switch__bfc6fc95442d988644evzt_switch_mode2 click
setstate Schalter_Flur_Oben 2022-03-01 19:10:28 mode enabled
setstate Schalter_Flur_Oben 2022-03-01 19:10:33 state cmd_1



dominik

Wie sieht das beim Debuggen des Devices im TuYa Web aus, schalten da auch immer beide?
Ich habe im Modul eigentlich keine Business Logik implementiert die irgendwas auf 1 Reading zusammen führt.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

MiKn

meinst du das Debug "Log"? Da wird immer zwischen Button 1 und 2 unterschieden.

dominik

Stell bitte Mal auf verbose 5 und poste das fhempy Log beim Schalten.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

MiKn

#532
so korrekt

"FHEMPYTYPE": "ring", "PYTHONTYPE": "ring", "argsh": {}, "function": "Set", "args": ["RingDoorBell", "?"], "finished": 1, "returnval": ""}
2022.03.01 21:00:24 5: BindingsIo (local_pybinding): QUEUE: finished handling - 0
2022.03.01 21:00:24 4: BindingsIo (local_pybinding): end fhempyFunction: RingDoorBell => Set (66702568) - result:
2022.03.01 21:00:41 4: BindingsIo (local_pybinding): start fhempyFunction: Wireless_Switch__bfc6fc95442d988644evzt => Set (26311981)
2022.03.01 21:00:41 4: BindingsIo (local_pybinding): <<< WS: {"defargsh":{},"NAME":"Wireless_Switch__bfc6fc95442d988644evzt","defargs":["Wireless_Switch__bfc6fc95442d988644evzt","PythonModule","tuya_cloud","tuya_cloud_connector","bfc6fc95442d988644evzt"],"msgtype":"function","id":"26311981","PYTHONTYPE":"tuya_cloud","argsh":{},"FHEMPYTYPE":"tuya_cloud","function":"Set","args":["Wireless_Switch__bfc6fc95442d988644evzt","?"]}
2022.03.01 21:00:41 5: DevIo_SimpleWrite local_pybinding: 7b226465666172677368223a7b7d2c224e414d45223a22576972656c6573735f5377697463685f5f62666336666339353434326439383836343465767a74222c2264656661726773223a5b22576972656c6573735f5377697463685f5f62666336666339353434326439383836343465767a74222c22507974686f6e4d6f64756c65222c22747579615f636c6f7564222c22747579615f636c6f75645f636f6e6e6563746f72222c2262666336666339353434326439383836343465767a74225d2c226d736774797065223a2266756e6374696f6e222c226964223a223236333131393831222c22505954484f4e54595045223a22747579615f636c6f7564222c226172677368223a7b7d2c224648454d505954595045223a22747579615f636c6f7564222c2266756e6374696f6e223a22536574222c2261726773223a5b22576972656c6573735f5377697463685f5f62666336666339353434326439383836343465767a74222c223f225d7d
2022.03.01 21:00:41 5: BindingsIo (local_pybinding): DevIo_SimpleRead
2022.03.01 21:00:41 5: BindingsIo (local_pybinding): DevIo_SimpleRead WithTimeout
2022.03.01 21:00:41 4: BindingsIo (local_pybinding): >>> WS: {"defargsh": {}, "NAME": "Wireless_Switch__bfc6fc95442d988644evzt", "defargs": ["Wireless_Switch__bfc6fc95442d988644evzt", "PythonModule", "tuya_cloud", "tuya_cloud_connector", "bfc6fc95442d988644evzt"], "msgtype": "function", "id": "26311981", "PYTHONTYPE": "tuya_cloud", "argsh": {}, "FHEMPYTYPE": "tuya_cloud", "function": "Set", "args": ["Wireless_Switch__bfc6fc95442d988644evzt", "?"], "finished": 1, "returnval": "Unknown argument ?, choose one of "}
2022.03.01 21:00:41 5: BindingsIo (local_pybinding): QUEUE: start handling - 1
2022.03.01 21:00:41 5: processMessage: {"defargsh": {}, "NAME": "Wireless_Switch__bfc6fc95442d988644evzt", "defargs": ["Wireless_Switch__bfc6fc95442d988644evzt", "PythonModule", "tuya_cloud", "tuya_cloud_connector", "bfc6fc95442d988644evzt"], "msgtype": "function", "id": "26311981", "PYTHONTYPE": "tuya_cloud", "argsh": {}, "FHEMPYTYPE": "tuya_cloud", "function": "Set", "args": ["Wireless_Switch__bfc6fc95442d988644evzt", "?"], "finished": 1, "returnval": "Unknown argument ?, choose one of "}
2022.03.01 21:00:41 5: BindingsIo (local_pybinding): QUEUE: finished handling - 0
2022.03.01 21:00:41 4: BindingsIo (local_pybinding): end fhempyFunction: Wireless_Switch__bfc6fc95442d988644evzt => Set (26311981) - result: Unknown argument ?, choose one of
2022.03.01 21:00:41 4: BindingsIo (local_pybinding): start fhempyFunction: Wireless_Switch__bfc6fc95442d988644evzt => FW_detailFn (35156442)
2022.03.01 21:00:41 4: BindingsIo (local_pybinding): <<< WS: {"id":"35156442","msgtype":"function","defargs":["Wireless_Switch__bfc6fc95442d988644evzt","PythonModule","tuya_cloud","tuya_cloud_connector","bfc6fc95442d988644evzt"],"NAME":"Wireless_Switch__bfc6fc95442d988644evzt","defargsh":{},"args":["WEB","Wireless_Switch__bfc6fc95442d988644evzt","fhempy",null],"function":"FW_detailFn","FHEMPYTYPE":"tuya_cloud","argsh":{},"PYTHONTYPE":"tuya_cloud"}
2022.03.01 21:00:41 5: DevIo_SimpleWrite local_pybinding: 7b226964223a223335313536343432222c226d736774797065223a2266756e6374696f6e222c2264656661726773223a5b22576972656c6573735f5377697463685f5f62666336666339353434326439383836343465767a74222c22507974686f6e4d6f64756c65222c22747579615f636c6f7564222c22747579615f636c6f75645f636f6e6e6563746f72222c2262666336666339353434326439383836343465767a74225d2c224e414d45223a22576972656c6573735f5377697463685f5f62666336666339353434326439383836343465767a74222c226465666172677368223a7b7d2c2261726773223a5b22574542222c22576972656c6573735f5377697463685f5f62666336666339353434326439383836343465767a74222c226668656d7079222c6e756c6c5d2c2266756e6374696f6e223a2246575f64657461696c466e222c224648454d505954595045223a22747579615f636c6f7564222c226172677368223a7b7d2c22505954484f4e54595045223a22747579615f636c6f7564227d
2022.03.01 21:00:41 5: BindingsIo (local_pybinding): DevIo_SimpleRead
2022.03.01 21:00:41 5: BindingsIo (local_pybinding): DevIo_SimpleRead WithTimeout
2022.03.01 21:00:41 5: BindingsIo (local_pybinding): QUEUE: start handling - 0
2022.03.01 21:00:41 5: BindingsIo (local_pybinding): QUEUE: finished handling - 0
2022.03.01 21:00:41 5: BindingsIo (local_pybinding): DevIo_SimpleRead
2022.03.01 21:00:41 5: BindingsIo (local_pybinding): DevIo_SimpleRead WithTimeout
2022.03.01 21:00:41 4: BindingsIo (local_pybinding): >>> WS: {"id": "35156442", "msgtype": "function", "defargs": ["Wireless_Switch__bfc6fc95442d988644evzt", "PythonModule", "tuya_cloud", "tuya_cloud_connector", "bfc6fc95442d988644evzt"], "NAME": "Wireless_Switch__bfc6fc95442d988644evzt", "defargsh": {}, "args": ["WEB", "Wireless_Switch__bfc6fc95442d988644evzt", "fhempy", null], "function": "FW_detailFn", "FHEMPYTYPE": "tuya_cloud", "argsh": {}, "PYTHONTYPE": "tuya_cloud", "finished": 1, "returnval": "<script type=\"text/javascript\">\n        function displayHelp() {\n          var x = document.getElementById(\"fhempyReadme\");\n          if (x.style.display === \"none\") {\n            x.style.display = \"block\";\n          } else {\n            x.style.display = \"none\";\n          }\n          var off = $(\"#fhempyReadme\").position().top-20;\n          $('body, html').animate({scrollTop:off}, 500);\n        }\n        \n        $(document).ready(function() {\n          $(\"#content\").append('<div class=\"makeTable help\" id=\"fhempyReadme\"></div>');\n          $(\"#fhempyReadme\").html(`<h1>Tuya Cloud</h1><br><br><p>This module uses the official tuya library to communicate with all sort of tuya devices supported by the Tuya Cloud API.</p><br><br><h2>Installation</h2><br><br><p>You need to setup a Tuya IoT project on the tuya development platform. It also requires you to create a Tuya Developer account which is used in the first step of the instructions. That's not the SmartLife or TuyaApp account!</p><br><br><p>Please follow the instructions here:</p><br><br><p>https://github.com/tuya/tuya-home-assistant/wiki/Tuya-IoT-Platform-Configuration-Guide-Using-Smart-Home-PaaS</p><br><br><h2>Usage</h2><br><br><p>Please read installation instructions before! You need the tuya developer account and a smart home project on the tuya platform to get client id and client secret.</p><br><br><p><code><br>define tuya_cloud_connector fhempy tuya_cloud setup <CLIENT_ID> <CLIENT_SECRET> <USERNAME> <PASSWORD> [<APPTYPE>] [<REGION>]<br></code></p><br><br><p>This command will create the tuya cloud connector device which automatically create all tuya devices in your FHEM installation.</p><br><br><ul><br><li>CLIENT_ID: From tuya developer portal</li><br><li>CLIENT_SECRET: From tuya developer portal</li><br><li>USERNAME: From SmartLife/Tuya app (not developer account)</li><br><li>PASSWORD: From SmartLife/Tuya app (not developer account)</li><br><li>APPTYPE: smartlife (default) or tuyaSmart, depending on the app you use</li><br><li>REGION: Europe (default), China, America, India, EasternAmerica, WesternEurope</li><br></ul><br>`);\n          document.getElementById(\"fhempyReadme\").style.display = \"none\";\n\n          var helpCmdStr = '{}';\n          var helpCmdJson = JSON.parse(helpCmdStr);\n          $(\"select.set\").change(helpSetAction);\n          function\n          helpSetAction(){\n            var cmd = $(\"select.set\").val()\n            if(helpCmdJson[cmd] && helpCmdJson[cmd].help) {\n              if (document.getElementById(\"idCmdHelp\")===null) {\n                $('<div id=\"idCmdHelp\" class=\"makeTable help\"></div>')\n                      .insertBefore(\"div.makeTable.internals\");\n              }\n              $(\"div#idCmdHelp\").html(helpCmdJson[cmd].help + \"<br>\");\n            } else {\n              $(\"div#idCmdHelp\").remove();\n            }\n          }\n          helpSetAction();\n\n          var helpAttrStr = '{}';\n          var helpAttrJson = JSON.parse(helpAttrStr);\n          $(\"select.attr\").change(helpAttrAction);\n          function\n          helpAttrAction(){\n            var cmd = $(\"select.attr\").val()\n            if(helpAttrJson[cmd] && helpAttrJson[cmd].help) {\n              if (document.getElementById(\"idAttrHelp\")===null) {\n                $('<div id=\"idAttrHelp\" class=\"makeTable help\"></div>')\n                      .insertBefore(\"div.makeTable.attributes\");\n              }\n              $(\"div#idAttrHelp\").html(helpAttrJson[cmd].help + \"<br>\");\n            } else {\n              $(\"div#idAttrHelp\").remove();\n            }\n          }\n          helpAttrAction();\n\n          var helpLink = document.getElementById(\"content\")\n            .getElementsByClassName(\"detLink devSpecHelp\");\n          helpLink[0].innerHTML = '<div class=\"detLink devSpecHelp\"><a href=\"#\" onclick=\"displayHelp();return false;\">Device specific help</a></div>';\n        });\n        </script>"}
2022.03.01 21:00:41 5: BindingsIo (local_pybinding): QUEUE: start handling - 1
2022.03.01 21:00:41 5: processMessage: {"id": "35156442", "msgtype": "function", "defargs": ["Wireless_Switch__bfc6fc95442d988644evzt", "PythonModule", "tuya_cloud", "tuya_cloud_connector", "bfc6fc95442d988644evzt"], "NAME": "Wireless_Switch__bfc6fc95442d988644evzt", "defargsh": {}, "args": ["WEB", "Wireless_Switch__bfc6fc95442d988644evzt", "fhempy", null], "function": "FW_detailFn", "FHEMPYTYPE": "tuya_cloud", "argsh": {}, "PYTHONTYPE": "tuya_cloud", "finished": 1, "returnval": "<script type=\"text/javascript\">\n        function displayHelp() {\n          var x = document.getElementById(\"fhempyReadme\");\n          if (x.style.display === \"none\") {\n            x.style.display = \"block\";\n          } else {\n            x.style.display = \"none\";\n          }\n          var off = $(\"#fhempyReadme\").position().top-20;\n          $('body, html').animate({scrollTop:off}, 500);\n        }\n        \n        $(document).ready(function() {\n          $(\"#content\").append('<div class=\"makeTable help\" id=\"fhempyReadme\"></div>');\n          $(\"#fhempyReadme\").html(`<h1>Tuya Cloud</h1><br><br><p>This module uses the official tuya library to communicate with all sort of tuya devices supported by the Tuya Cloud API.</p><br><br><h2>Installation</h2><br><br><p>You need to setup a Tuya IoT project on the tuya development platform. It also requires you to create a Tuya Developer account which is used in the first step of the instructions. That's not the SmartLife or TuyaApp account!</p><br><br><p>Please follow the instructions here:</p><br><br><p>https://github.com/tuya/tuya-home-assistant/wiki/Tuya-IoT-Platform-Configuration-Guide-Using-Smart-Home-PaaS</p><br><br><h2>Usage</h2><br><br><p>Please read installation instructions before! You need the tuya developer account and a smart home project on the tuya platform to get client id and client secret.</p><br><br><p><code><br>define tuya_cloud_connector fhempy tuya_cloud setup <CLIENT_ID> <CLIENT_SECRET> <USERNAME> <PASSWORD> [<APPTYPE>] [<REGION>]<br></code></p><br><br><p>This command will create the tuya cloud connector device which automatically create all tuya devices in your FHEM installation.</p><br><br><ul><br><li>CLIENT_ID: From tuya developer portal</li><br><li>CLIENT_SECRET: From tuya developer portal</li><br><li>USERNAME: From SmartLife/Tuya app (not developer account)</li><br><li>PASSWORD: From SmartLife/Tuya app (not developer account)</li><br><li>APPTYPE: smartlife (default) or tuyaSmart, depending on the app you use</li><br><li>REGION: Europe (default), China, America, India, EasternAmerica, WesternEurope</li><br></ul><br>`);\n          document.getElementById(\"fhempyReadme\").style.display = \"none\";\n\n          var helpCmdStr = '{}';\n          var helpCmdJson = JSON.parse(helpCmdStr);\n          $(\"select.set\").change(helpSetAction);\n          function\n          helpSetAction(){\n            var cmd = $(\"select.set\").val()\n            if(helpCmdJson[cmd] && helpCmdJson[cmd].help) {\n              if (document.getElementById(\"idCmdHelp\")===null) {\n                $('<div id=\"idCmdHelp\" class=\"makeTable help\"></div>')\n                      .insertBefore(\"div.makeTable.internals\");\n              }\n              $(\"div#idCmdHelp\").html(helpCmdJson[cmd].help + \"<br>\");\n            } else {\n              $(\"div#idCmdHelp\").remove();\n            }\n          }\n          helpSetAction();\n\n          var helpAttrStr = '{}';\n          var helpAttrJson = JSON.parse(helpAttrStr);\n          $(\"select.attr\").change(helpAttrAction);\n          function\n          helpAttrAction(){\n            var cmd = $(\"select.attr\").val()\n            if(helpAttrJson[cmd] && helpAttrJson[cmd].help) {\n              if (document.getElementById(\"idAttrHelp\")===null) {\n                $('<div id=\"idAttrHelp\" class=\"makeTable help\"></div>')\n                      .insertBefore(\"div.makeTable.attributes\");\n              }\n              $(\"div#idAttrHelp\").html(helpAttrJson[cmd].help + \"<br>\");\n            } else {\n              $(\"div#idAttrHelp\").remove();\n            }\n          }\n          helpAttrAction();\n\n          var helpLink = document.getElementById(\"content\")\n            .getElementsByClassName(\"detLink devSpecHelp\");\n          helpLink[0].innerHTML = '<div class=\"detLink devSpecHelp\"><a href=\"#\" onclick=\"displayHelp();return false;\">Device specific help</a></div>';\n        });\n        </script>"}
2022.03.01 21:00:41 5: BindingsIo (local_pybinding): QUEUE: finished handling - 0
2022.03.01 21:00:41 4: BindingsIo (local_pybinding): end fhempyFunction: Wireless_Switch__bfc6fc95442d988644evzt => FW_detailFn (35156442) - result: <script type="text/javascript">
        function displayHelp() {
          var x = document.getElementById("fhempyReadme");
          if (x.style.display === "none") {
            x.style.display = "block";
          } else {
            x.style.display = "none";
          }
          var off = $("#fhempyReadme").position().top-20;
          $('body, html').animate({scrollTop:off}, 500);
        }
       
        $(document).ready(function() {
          $("#content").append('<div class="makeTable help" id="fhempyReadme"></div>');
          $("#fhempyReadme").html(`<h1>Tuya Cloud</h1><br><br><p>This module uses the official tuya library to communicate with all sort of tuya devices supported by the Tuya Cloud API.</p><br><br><h2>Installation</h2><br><br><p>You need to setup a Tuya IoT project on the tuya development platform. It also requires you to create a Tuya Developer account which is used in the first step of the instructions. That's not the SmartLife or TuyaApp account!</p><br><br><p>Please follow the instructions here:</p><br><br><p>https://github.com/tuya/tuya-home-assistant/wiki/Tuya-IoT-Platform-Configuration-Guide-Using-Smart-Home-PaaS</p><br><br><h2>Usage</h2><br><br><p>Please read installation instructions before! You need the tuya developer account and a smart home project on the tuya platform to get client id and client secret.</p><br><br><p><code><br>define tuya_cloud_connector fhempy tuya_cloud setup <CLIENT_ID> <CLIENT_SECRET> <USERNAME> <PASSWORD> [<APPTYPE>] [<REGION>]<br></code></p><br><br><p>This command will create the tuya cloud connector device which automatically create all tuya devices in your FHEM installation.</p><br><br><ul><br><li>CLIENT_ID: From tuya developer portal</li><br><li>CLIENT_SECRET: From tuya developer portal</li><br><li>USERNAME: From SmartLife/Tuya app (not developer account)</li><br><li>PASSWORD: From SmartLife/Tuya app (not developer account)</li><br><li>APPTYPE: smartlife (default) or tuyaSmart, depending on the app you use</li><br><li>REGION: Europe (default), China, America, India, EasternAmerica, WesternEurope</li><br></ul><br>`);
          document.getElementById("fhempyReadme").style.display = "none";

          var helpCmdStr = '{}';
          var helpCmdJson = JSON.parse(helpCmdStr);
          $("select.set").change(helpSetAction);
          function
          helpSetAction(){
            var cmd = $("select.set").val()
            if(helpCmdJson[cmd] && helpCmdJson[cmd].help) {
              if (document.getElementById("idCmdHelp")===null) {
                $('<div id="idCmdHelp" class="makeTable help"></div>')
                      .insertBefore("div.makeTable.internals");
              }
              $("div#idCmdHelp").html(helpCmdJson[cmd].help + "<br>");
            } else {
              $("div#idCmdHelp").remove();
            }
          }
          helpSetAction();

          var helpAttrStr = '{}';
          var helpAttrJson = JSON.parse(helpAttrStr);
          $("select.attr").change(helpAttrAction);
          function
          helpAttrAction(){
            var cmd = $("select.attr").val()
            if(helpAttrJson[cmd] && helpAttrJson[cmd].help) {
              if (document.getElementById("idAttrHelp")===null) {
                $('<div id="idAttrHelp" class="makeTable help"></div>')
                      .insertBefore("div.makeTable.attributes");
              }
              $("div#idAttrHelp").html(helpAttrJson[cmd].help + "<br>");
            } else {
              $("div#idAttrHelp").remove();
            }
          }
          helpAttrAction();

          var helpLink = document.getElementById("content")
            .getElementsByClassName("detLink devSpecHelp");
          helpLink[0].innerHTML = '<div class="detLink devSpecHelp"><a href="#" onclick="displayHelp();return false;">Device specific help</a></div>';
        });
        </script>
2022.03.01 21:00:41 4: BindingsIo (local_pybinding): start fhempyFunction: Wireless_Switch__bfc6fc95442d988644evzt => Set (97917442)
2022.03.01 21:00:41 4: BindingsIo (local_pybinding): <<< WS: {"args":["Wireless_Switch__bfc6fc95442d988644evzt","?"],"function":"Set","FHEMPYTYPE":"tuya_cloud","argsh":{},"PYTHONTYPE":"tuya_cloud","id":"97917442","defargs":["Wireless_Switch__bfc6fc95442d988644evzt","PythonModule","tuya_cloud","tuya_cloud_connector","bfc6fc95442d988644evzt"],"msgtype":"function","NAME":"Wireless_Switch__bfc6fc95442d988644evzt","defargsh":{}}
2022.03.01 21:00:41 5: DevIo_SimpleWrite local_pybinding: 7b2261726773223a5b22576972656c6573735f5377697463685f5f62666336666339353434326439383836343465767a74222c223f225d2c2266756e6374696f6e223a22536574222c224648454d505954595045223a22747579615f636c6f7564222c226172677368223a7b7d2c22505954484f4e54595045223a22747579615f636c6f7564222c226964223a223937393137343432222c2264656661726773223a5b22576972656c6573735f5377697463685f5f62666336666339353434326439383836343465767a74222c22507974686f6e4d6f64756c65222c22747579615f636c6f7564222c22747579615f636c6f75645f636f6e6e6563746f72222c2262666336666339353434326439383836343465767a74225d2c226d736774797065223a2266756e6374696f6e222c224e414d45223a22576972656c6573735f5377697463685f5f62666336666339353434326439383836343465767a74222c226465666172677368223a7b7d7d
2022.03.01 21:00:41 5: BindingsIo (local_pybinding): DevIo_SimpleRead
2022.03.01 21:00:41 5: BindingsIo (local_pybinding): DevIo_SimpleRead WithTimeout
2022.03.01 21:00:41 4: BindingsIo (local_pybinding): >>> WS: {"args": ["Wireless_Switch__bfc6fc95442d988644evzt", "?"], "function": "Set", "FHEMPYTYPE": "tuya_cloud", "argsh": {}, "PYTHONTYPE": "tuya_cloud", "id": "97917442", "defargs": ["Wireless_Switch__bfc6fc95442d988644evzt", "PythonModule", "tuya_cloud", "tuya_cloud_connector", "bfc6fc95442d988644evzt"], "msgtype": "function", "NAME": "Wireless_Switch__bfc6fc95442d988644evzt", "defargsh": {}, "finished": 1, "returnval": "Unknown argument ?, choose one of "}
2022.03.01 21:00:41 5: BindingsIo (local_pybinding): QUEUE: start handling - 1
2022.03.01 21:00:41 5: processMessage: {"args": ["Wireless_Switch__bfc6fc95442d988644evzt", "?"], "function": "Set", "FHEMPYTYPE": "tuya_cloud", "argsh": {}, "PYTHONTYPE": "tuya_cloud", "id": "97917442", "defargs": ["Wireless_Switch__bfc6fc95442d988644evzt", "PythonModule", "tuya_cloud", "tuya_cloud_connector", "bfc6fc95442d988644evzt"], "msgtype": "function", "NAME": "Wireless_Switch__bfc6fc95442d988644evzt", "defargsh": {}, "finished": 1, "returnval": "Unknown argument ?, choose one of "}
2022.03.01 21:00:41 5: BindingsIo (local_pybinding): QUEUE: finished handling - 0
2022.03.01 21:00:41 4: BindingsIo (local_pybinding): end fhempyFunction: Wireless_Switch__bfc6fc95442d988644evzt => Set (97917442) - result: Unknown argument ?, choose one of
2022.03.01 21:00:41 4: BindingsIo (local_pybinding): start fhempyFunction: Wireless_Switch__bfc6fc95442d988644evzt => Get (80887871)
2022.03.01 21:00:41 4: BindingsIo (local_pybinding): <<< WS: {"id":"80887871","msgtype":"function","defargs":["Wireless_Switch__bfc6fc95442d988644evzt","PythonModule","tuya_cloud","tuya_cloud_connector","bfc6fc95442d988644evzt"],"NAME":"Wireless_Switch__bfc6fc95442d988644evzt","defargsh":{},"function":"Get","args":["Wireless_Switch__bfc6fc95442d988644evzt","?"],"FHEMPYTYPE":"tuya_cloud","PYTHONTYPE":"tuya_cloud","argsh":{}}
2022.03.01 21:00:41 5: DevIo_SimpleWrite local_pybinding: 7b226964223a223830383837383731222c226d736774797065223a2266756e6374696f6e222c2264656661726773223a5b22576972656c6573735f5377697463685f5f62666336666339353434326439383836343465767a74222c22507974686f6e4d6f64756c65222c22747579615f636c6f7564222c22747579615f636c6f75645f636f6e6e6563746f72222c2262666336666339353434326439383836343465767a74225d2c224e414d45223a22576972656c6573735f5377697463685f5f62666336666339353434326439383836343465767a74222c226465666172677368223a7b7d2c2266756e6374696f6e223a22476574222c2261726773223a5b22576972656c6573735f5377697463685f5f62666336666339353434326439383836343465767a74222c223f225d2c224648454d505954595045223a22747579615f636c6f7564222c22505954484f4e54595045223a22747579615f636c6f7564222c226172677368223a7b7d7d
2022.03.01 21:00:41 5: BindingsIo (local_pybinding): DevIo_SimpleRead
2022.03.01 21:00:41 5: BindingsIo (local_pybinding): DevIo_SimpleRead WithTimeout
2022.03.01 21:00:41 4: BindingsIo (local_pybinding): >>> WS: {"id": "80887871", "msgtype": "function", "defargs": ["Wireless_Switch__bfc6fc95442d988644evzt", "PythonModule", "tuya_cloud", "tuya_cloud_connector", "bfc6fc95442d988644evzt"], "NAME": "Wireless_Switch__bfc6fc95442d988644evzt", "defargsh": {}, "function": "Get", "args": ["Wireless_Switch__bfc6fc95442d988644evzt", "?"], "FHEMPYTYPE": "tuya_cloud", "PYTHONTYPE": "tuya_cloud", "argsh": {}, "finished": 1, "returnval": ""}
2022.03.01 21:00:41 5: BindingsIo (local_pybinding): QUEUE: start handling - 1
2022.03.01 21:00:41 5: processMessage: {"id": "80887871", "msgtype": "function", "defargs": ["Wireless_Switch__bfc6fc95442d988644evzt", "PythonModule", "tuya_cloud", "tuya_cloud_connector", "bfc6fc95442d988644evzt"], "NAME": "Wireless_Switch__bfc6fc95442d988644evzt", "defargsh": {}, "function": "Get", "args": ["Wireless_Switch__bfc6fc95442d988644evzt", "?"], "FHEMPYTYPE": "tuya_cloud", "PYTHONTYPE": "tuya_cloud", "argsh": {}, "finished": 1, "returnval": ""}
2022.03.01 21:00:41 5: BindingsIo (local_pybinding): QUEUE: finished handling - 0
2022.03.01 21:00:41 4: BindingsIo (local_pybinding): end fhempyFunction: Wireless_Switch__bfc6fc95442d988644evzt => Get (80887871) - result:
2022.03.01 21:00:42 4: BindingsIo (local_pybinding): start fhempyFunction: Wireless_Switch__bfc6fc95442d988644evzt => Set (9754220)
2022.03.01 21:00:42 4: BindingsIo (local_pybinding): <<< WS: {"NAME":"Wireless_Switch__bfc6fc95442d988644evzt","defargsh":{},"id":"9754220","msgtype":"function","defargs":["Wireless_Switch__bfc6fc95442d988644evzt","PythonModule","tuya_cloud","tuya_cloud_connector","bfc6fc95442d988644evzt"],"FHEMPYTYPE":"tuya_cloud","argsh":{},"PYTHONTYPE":"tuya_cloud","args":["Wireless_Switch__bfc6fc95442d988644evzt","?"],"function":"Set"}
2022.03.0
[code]

dominik

Bitte fhempy Log, nicht FHEM Log
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

MiKn

ich hoffe so ist es besser, hatte oben auch noch geändert. Danke

dominik

Hat das Device auch ein state Reading? Ändert sich dieses?

Ich muss wohl das Logging erweitern damit ich was sehe. Ich mach morgen ein neues Release mit mehr Log Output dann kann man das weiter analysieren.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

MiKn

ist immer -> STATE ready

defmod Wireless_Switch__bfc6fc95442d988644evzt PythonModule tuya_cloud tuya_cloud_connector bfc6fc95442d988644evzt
attr Wireless_Switch__bfc6fc95442d988644evzt alias Wireless Switch
attr Wireless_Switch__bfc6fc95442d988644evzt group tuya_cloud
attr Wireless_Switch__bfc6fc95442d988644evzt room fhempy

setstate Wireless_Switch__bfc6fc95442d988644evzt ready
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 21:58:28 active_time 1646140172
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 15:52:42 alarm_active
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 21:58:28 biz_type 0
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 15:52:42 bright_value_1 500
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 15:52:42 bright_value_2 10
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 15:52:42 brightness_max_1 10
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 15:52:42 brightness_max_2 10
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 15:52:42 brightness_min_1 10
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 15:52:42 brightness_min_2 10
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 21:58:28 category wxkg
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 15:52:42 countdown_1 0
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 15:52:42 countdown_2 0
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 21:58:28 create_time 1646140172
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 15:52:42 factory_reset off
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 21:58:28 icon https://images.tuyaeu.com/smart/icon/ay1555059089863sMgqv/4c20ba802ef497cb51ab4fa933518ed6.png
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 21:58:28 id bfc6fc95442d988644evzt
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 21:58:28 ip
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 21:58:28 lat 56.7916
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 21:58:28 local_key 35daa79d7719990e
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 21:58:28 lon 12.6863
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 15:52:42 master_state normal
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 21:58:28 model
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 21:58:28 name Wireless Switch
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 15:52:42 night_light_bright 0
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 15:52:42 night_light_delay 0
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 21:58:28 node_id 0018
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 21:58:28 online on
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 21:58:28 owner_id 50210322
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 21:58:28 product_id eg9bol3v
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 21:58:28 product_name Wireless Switch
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 15:52:42 relay_status off
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 21:58:24 state ready
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 21:58:28 sub on
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 22:09:21 switch1_value single_click
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 22:09:21 switch1a_value 01.03.2022 22:09:21
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 22:09:21 switch2_value 01.03.2022 22:09:21
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 15:52:42 switch_alarm_sound off
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 15:52:42 switch_backlight off
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 15:52:42 switch_led_1 off
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 15:52:42 switch_led_2 off
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 22:09:21 switch_mode2 click
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 15:52:42 system_volume 0
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 21:58:28 time_zone +01:00
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 21:58:28 uid eu16438442825683DyaA
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 21:58:28 update_time 1646140172
setstate Wireless_Switch__bfc6fc95442d988644evzt 2022-03-01 21:58:28 uuid 96f6f37d2d2ade2f


Super, dann warte ich auf das neue Release und dann mal sehen was das Log Output hergibt.

dominik

Update released.

Bitte tuya_connector dann auf verbose 5 stellen und fhempy neu starten.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

MiKn

so korrekt? 2x Linke Taste und 2x Rechte Taste hintereinander gedrückt.


2022-03-02 22:53:59,773 - INFO     - fhempy.lib.pkg_installer: Successfully installed fhempy update!
2022-03-02 22:54:00,273 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy...
2022-03-02 22:54:00,280 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2022-03-02 22:54:00,311 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2022-03-02 22:54:10,014 - INFO     - websockets.server: connection open
2022-03-02 22:54:10,015 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2022-03-02 22:55:06,590 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy...
2022-03-02 22:55:06,607 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2022-03-02 22:55:06,664 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2022-03-02 22:55:10,815 - INFO     - websockets.server: connection open
2022-03-02 22:55:10,816 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2022-03-02 22:57:51,911 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy...
2022-03-02 22:57:51,919 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2022-03-02 22:57:51,943 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2022-03-02 22:58:02,013 - INFO     - websockets.server: connection open
2022-03-02 22:58:02,014 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya_cloud/tuya_cloud.py:30: RuntimeWarning: coroutine 'AttrVal' was never awaited
Coroutine created at (most recent call last)
  File "FHEM/bindings/python/bin/fhempy", line 113, in <module>
    fpb.run()
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 507, in run
    asyncio.get_event_loop().run_forever()
  File "/usr/lib/python3.8/asyncio/base_events.py", line 570, in run_forever
    self._run_once()
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1851, in _run_once
    handle._run()
  File "/usr/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya_cloud/tuya_cloud.py", line 30, in Define
    if fhem.AttrVal(self.hash["NAME"], "verbose", "3") == "5":
  if fhem.AttrVal(self.hash["NAME"], "verbose", "3") == "5":
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
2022-03-02 22:58:04,156 - INFO     - fhempy.lib.pkg_installer: Attempting install of fhempy
2022-03-02 22:58:04,795 - INFO     - tuya_cloud_connector: Tuya Open Pulsar connected
2022-03-02 22:58:05,315 - INFO     - tuya_cloud_connector: create: USB智能遥控器(通用)_bf9a2d0837b2c754c8f1qf PythonModule tuya_cloud tuya_cloud_connector bf9a2d0837b2c754c8f1qf
2022-03-02 22:58:06,087 - INFO     - fhempy.lib.pkg_installer: Successfully installed fhempy update!
2022-03-02 22:58:06,686 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy...
2022-03-02 22:58:06,695 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2022-03-02 22:58:06,723 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2022-03-02 22:58:16,544 - INFO     - websockets.server: connection open
2022-03-02 22:58:16,544 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya_cloud/tuya_cloud.py:30: RuntimeWarning: coroutine 'AttrVal' was never awaited
Coroutine created at (most recent call last)
  File "FHEM/bindings/python/bin/fhempy", line 113, in <module>
    fpb.run()
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 507, in run
    asyncio.get_event_loop().run_forever()
  File "/usr/lib/python3.8/asyncio/base_events.py", line 570, in run_forever
    self._run_once()
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1851, in _run_once
    handle._run()
  File "/usr/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya_cloud/tuya_cloud.py", line 30, in Define
    if fhem.AttrVal(self.hash["NAME"], "verbose", "3") == "5":
  if fhem.AttrVal(self.hash["NAME"], "verbose", "3") == "5":
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
2022-03-02 22:58:19,293 - INFO     - tuya_cloud_connector: Tuya Open Pulsar connected
2022-03-02 22:58:19,778 - INFO     - tuya_cloud_connector: create: USB智能遥控器(通用)_bf9a2d0837b2c754c8f1qf PythonModule tuya_cloud tuya_cloud_connector bf9a2d0837b2c754c8f1qf
2022-03-02 22:59:18,239 - DEBUG    - tuya_cloud_connector: update_device received for bfc6fc95442d988644evzt
2022-03-02 22:59:18,313 - DEBUG    - tuya_cloud_connector: update_device received: {'dataId': 'AAXZQ2SmNPknRN7sYOoABB', 'devId': 'bfc6fc95442d988644evzt', 'productKey': 'eg9bol3v', 'status': [{'1': 'single_click', 'code': 'switch1_value', 't': 1646258358203, 'value': 'single_click'}]}
2022-03-02 22:59:20,813 - DEBUG    - tuya_cloud_connector: update_device received: {'dataId': 'AAXZQ2TNScMnRN7sYOoABC', 'devId': 'bfc6fc95442d988644evzt', 'productKey': 'eg9bol3v', 'status': [{'1': 'single_click', 'code': 'switch1_value', 't': 1646258360764, 'value': 'single_click'}]}
2022-03-02 22:59:20,913 - DEBUG    - tuya_cloud_connector: update_device received for bfc6fc95442d988644evzt
2022-03-02 22:59:23,460 - DEBUG    - tuya_cloud_connector: update_device received for bfc6fc95442d988644evzt
2022-03-02 22:59:23,462 - DEBUG    - tuya_cloud_connector: update_device received: {'dataId': 'AAXZQ2T13xInRN7sYOoABD', 'devId': 'bfc6fc95442d988644evzt', 'productKey': 'eg9bol3v', 'status': [{'2': 'single_click', 'code': 'switch_mode2', 't': 1646258363424, 'value': 'click'}]}
2022-03-02 22:59:25,849 - DEBUG    - tuya_cloud_connector: update_device received: {'dataId': 'AAXZQ2UZ36AnRN7sYOoACA', 'devId': 'bfc6fc95442d988644evzt', 'productKey': 'eg9bol3v', 'status': [{'2': 'single_click', 'code': 'switch_mode2', 't': 1646258365783, 'value': 'click'}]}

dominik

Hast du um 22:59:18-20 Button 1 und um 22:59:23-25 Button 2 gedrückt? Wenn ja, wurde das Reading switch1_value um 22:59:25 auf single_click gesetzt?
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik