tuya / tuya-homebridge

Homebridge custom plugin for controlling Powered by Tuya (PBT) devices in HomeKit. This plugin is officially maintained by the Tuya Developer Team.
MIT License
351 stars 180 forks source link

remote control switch status is lost #232

Closed RegisCorbet closed 2 years ago

RegisCorbet commented 2 years ago

Describe the bug The status of my remote control switch (on/off) is not updated in Homebridge

Expected behavior

The status of my remote switch (https://doowifi.fr/fr/module-rail-din/208-module-timer-rail-din-DWF-0315TM-3760332970354.html?gclid=CjwKCAiAprGRBhBgEiwANJEY7Cz1wGT2IwUT05gEzwT2eoP4GWczYBqNWctIVenqb9KVKAT6k8vFtBoCDJ0QAvD_BwE) is only correctly displayed in Homebridge when it is operated from Homebridge. For example, the status change does not appear when the command comes from a manual action on the switch or from the Tuya mobile application. Note that the Tuya application always displays the correct status, which means that my device is fully compatible with the Tuya communication standard.

Screenshots If applicable, add screenshots to help explain your problem.

Device info (please complete the following information, which can be found in log): request path = /v1.0/iot-01/associated-users/devices

TuyaOpenAPI response: {"result":{"access_token":"245cca27497838cf8a5291fe838a316d","expire_time":7200,"platform_url":"https://openapi.tuyaeu.com","refresh_token":"e89eb58322f5ed27cf754bdfdae83a84","uid":"eu1645299993654PuZrg"},"success":true,"t":1647105547615,"tid":"8634a1fca22811ecbf586a9d84b8c9c2"} path = /v1.0/iot-01/associated-users/actions/authorized-login TuyaOpenAPI request: method = get, endpoint = https://openapi.tuyaeu.com, path = /v1.0/iot-01/associated-users/devices, params = {"size":100}, body = null, headers = {"t":"1647105547655","client_id":"g9yr5rvybelcvh8tdz44","nonce":"85880c00-a228-11ec-81ef-3dc05c09fe64","Signature-Headers":"client_id","sign":"1E819907F5A5567B0714A436E654823109F857B458E5BB840DF0088923438104","sign_method":"HMAC-SHA256","access_token":"245cca27497838cf8a5291fe838a316d","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.5.0"} TuyaOpenAPI response: {"result":{"devices":[{"active_time":1646745567,"biz_type":0,"category":"cz","create_time":1646745567,"icon":"smart/icon/ay1522655691209YPydg/0493de8dc52eaf58814c9d5aee923767.jpg","id":"bfad67c063a0d46fc9k0jj","ip":"86.244.72.57","lat":"47.3530","local_key":"710ae24d9f0120ac","lon":"0.6656","model":"ATMS1602B","name":"Principal","online":true,"owner_id":"51503689","product_id":"5ubvcxkzaj2yxqaj","product_name":"WiFi Smart Timer & Meter","status":[{"code":"switch_1","value":false},{"code":"countdown_1","value":0},{"code":"add_ele","value":0},{"code":"cur_current","value":0},{"code":"cur_power","value":0},{"code":"cur_voltage","value":2346},{"code":"relay_status","value":"last"},{"code":"cycle_time","value":""},{"code":"random_time","value":""}],"sub":false,"time_zone":"+01:00","uid":"eu1645299993654PuZrg","update_time":1647104495,"uuid":"6b244db495e0f45d"}],"has_more":false,"last_row_key":"B1A910121A4C8A75421B84920B84B85A","total":1},"success":true,"t":1647105547824,"tid":"865184e6a22811ecafefb6da7a08cf3a"} path = /v1.0/iot-01/associated-users/devices TuyaOpenAPI request: method = get, endpoint = https://openapi.tuyaeu.com, path = /v1.0/devices/functions, params = {"device_ids":"bfad67c063a0d46fc9k0jj"}, body = null, headers = {"t":"1647105547838","client_id":"g9yr5rvybelcvh8tdz44","nonce":"85880c00-a228-11ec-81ef-3dc05c09fe64","Signature-Headers":"client_id","sign":"BB405D80675EC428BF6CB42F9B4E282E188F2BBDCB38D92A169F599E28126D0A","sign_method":"HMAC-SHA256","access_token":"245cca27497838cf8a5291fe838a316d","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.5.0"} TuyaOpenAPI response: {"result":[{"category":"cz","devices":["bfad67c063a0d46fc9k0jj"],"functions":[{"code":"switch_1","desc":"switch 1","name":"switch 1","type":"Boolean","values":"{}"},{"code":"countdown_1","desc":"countdown 1","name":"countdown 1","type":"Integer","values":"{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}"},{"code":"relay_status","desc":"relay status","name":"relay status","type":"Enum","values":"{\"range\":[\"power_off\",\"power_on\",\"last\"]}"},{"code":"cycle_time","desc":"cycle time","name":"cycle time","type":"String","values":"{}"},{"code":"random_time","desc":"random time","name":"random time","type":"String","values":"{}"}],"product_id":"5ubvcxkzaj2yxqaj"}],"success":true,"t":1647105547975,"tid":"866bba1aa22811ec8f09c2098e70b1d9"} path = /v1.0/devices/functions Adding: Principal (cz / bfad67c063a0d46fc9k0jj) Existing Accessory found Principal bfad67c063a0d46fc9k0jj 6f9a838b-6159-4a4a-a47a-b060bae3188e TuyaOpenAPI request: method = post, endpoint = https://openapi.tuyaeu.com, path = /v1.0/iot-03/open-hub/access-config, params = null, body = {"uid":"eu1645299993654PuZrg","link_id":"85b49a40-a228-11ec-81ef-3dc05c09fe64","link_type":"mqtt","topics":"device","msg_encrypted_version":"1.0"}, headers = {"t":"1647105547995","client_id":"g9yr5rvybelcvh8tdz44","nonce":"85880c00-a228-11ec-81ef-3dc05c09fe64","Signature-Headers":"client_id","sign":"AF7C6F1E0BEF7B3EF06024ED40D479049ED3D5C50FD00C917481BA67384A703D","sign_method":"HMAC-SHA256","access_token":"245cca27497838cf8a5291fe838a316d","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.5.0"} TuyaOpenAPI response: {"code":28841101,"msg":"No permissions. This API is not subscribed.","success":false,"t":1647105548102,"tid":"86813a3aa22811ecafefb6da7a08cf3a"} path = /v1.0/iot-03/open-hub/access-config

github-actions[bot] commented 2 years ago

Thank you for your feedback, we will solve this issue soon

github-actions[bot] commented 2 years ago

Stale issue. we will close the issue soon. If this issue has not been resolved, please update the issue and contact us in time.

RegisCorbet commented 2 years ago

no questions?

github-actions[bot] commented 2 years ago

Stale issue. we will close the issue soon. If this issue has not been resolved, please update the issue and contact us in time.