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

Curtain issue #233

Closed eawystr closed 2 years ago

eawystr commented 2 years ago

Hi you all!

I have recently upgraded one of my blinds, and sadly I can't manage to make it work with homebridge... It works in the tuya app and here is my log: (the cachedAccessories.0E3AC84572BE is a light)

It is shown here, but doesent appears on the Home app

[13/03/2022, 17:45:17] Homebridge v1.4.0 (HAP v0.10.0) (Homebridge 5E9E) is running on port 51381. [13/03/2022, 17:45:19] [TuyaPlatform] Launched child bridge with PID 5944 [13/03/2022, 17:45:19] Registering platform 'homebridge-tuya-platform.TuyaPlatform' [13/03/2022, 17:45:19] [TuyaPlatform] Loaded homebridge-tuya-platform v1.5.0 child bridge successfully [13/03/2022, 17:45:19] Loaded 1 cached accessories from cachedAccessories.0E3AC84572BE. Initializing TuyaPlatform... TuyaOpenAPI request: method = post, endpoint = https://openapi.tuyaeu.com, path = /v1.0/iot-01/associated-users/actions/authorized-login, params = null, body {"country_code":34,"username":"","password":"","schema":"tuyaSmart"}, headers = {"t":"1647189919953","client_id":"","nonce":"","Signature-Headers":"client_id","sign":"","sign_method":"HMAC-SHA256","access_token":"","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.5.0"} [13/03/2022, 17:45:20] Homebridge v1.4.0 (HAP v0.10.0) (TuyaPlatform) is running on port 40580. TuyaOpenAPI response: {"result":{"access_token":"","expire_time":7200,"platform_url":"https://openapi.tuyaeu.com","refresh_token":"***","uid":"eu1642941792023Vf0Qp"},"success":true,"t":1647189920250,"tid":"f834c5a6a2ec11ecafefb6da7a08cf3a"} 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":"1647189920282","client_id":"4ku9vsueb3wf9plsfpq8","nonce":"f7be53f0-a2ec-11ec-81d6-2954b67d882b","Signature-Headers":"client_id","sign":"765C6C7976EFCA9A26C74916152577DACE9CEF409072B92AF2EB2F1AEFBBE16D","sign_method":"HMAC-SHA256","access_token":"513ab3daf1b60dd6eb5df99787b9c4a9","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.5.0"} TuyaOpenAPI response: {"result":{"devices":[{"active_time":1647100825,"biz_type":0,"category":"clkg","create_time":1647098083,"icon":"smart/icon/ay1509430484182dhmed/34fa25361a95cb65e5fea2e7868f9016.png","id":"bf186a86b391440848ghff","ip":"81.0.40.1","lat":"40.4105","local_key":"c777fac14941307e","lon":"-3.6994","model":"QCSC400W-V5T","name":"Persiana dormitorio","online":true,"owner_id":"49324808","product_id":"ffhiakhlxfbwb8tt","product_name":"Smart Curtain","status":[{"code":"control","value":"stop"},{"code":"percent_control","value":100},{"code":"cur_calibration","value":"start"},{"code":"control_back_mode","value":"forward"},{"code":"tr_timecon","value":28}],"sub":false,"time_zone":"+01:00","uid":"eu1642941792023Vf0Qp","update_time":1647189276,"uuid":"35ed32e89da91783"},{"active_time":1642945516,"biz_type":0,"category":"sd","create_time":1626179227,"icon":"smart/icon/ay1542254159262ZB6ee/b138f5db5a4b8c9b1a03f36103fc195d.png","id":"bf685702d1f197ae31aci4","ip":"81.0.40.1","lat":"40.4105","local_key":"c6fc07c729606bc2","lon":"-3.6994","name":"Aspiradora","online":true,"owner_id":"49324808","product_id":"i8djoiag4btlhov4","product_name":"M201","status":[{"code":"power","value":true},{"code":"power_go","value":false},{"code":"mode","value":"standby"},{"code":"direction_control","value":"stop"},{"code":"electricity_left","value":100},{"code":"seek","value":false},{"code":"clean_record","value":""},{"code":"fault","value":0}],"sub":false,"time_zone":"+01:00","uid":"eu1642941792023Vf0Qp","update_time":1647189271,"uuid":"6a54c215c316f842"},{"active_time":1642942056,"biz_type":0,"category":"tgq","create_time":1637182244,"icon":"smart/icon/ay1552276718127bcUlE/2dc08fb28147a460f3cc87479e44dbf8.png","id":"bfab88710e918f2472xse2","ip":"81.0.40.1","lat":"40.4105","local_key":"0e97db7a02dfafb2","lon":"-3.6994","model":"","name":"Dimmer","online":true,"owner_id":"49324808","product_id":"r2txmzqv3trxoveu","product_name":"WIFI LED Dimmer","status":[{"code":"switch_led_1","value":false},{"code":"bright_value_1","value":1000},{"code":"brightness_min_1","value":10}],"sub":false,"time_zone":"+01:00","uid":"eu1642941792023Vf0Qp","update_time":1647189271,"uuid":"4d7b38740c7751ae"}],"has_more":false,"last_row_key":"78C34CE45DBBBEB1A2BF66170AEDEB22","total":3},"success":true,"t":1647189920469,"tid":"f855ef96a2ec11ecbb5ea27854ae7791"} 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":"bf186a86b391440848ghff,bf685702d1f197ae31aci4,bfab88710e918f2472xse2"}, body = null, headers = {"t":"1647189920490","client_id":"4ku9vsueb3wf9plsfpq8","nonce":"f7be53f0-a2ec-11ec-81d6-2954b67d882b","Signature-Headers":"client_id","sign":"92D34B3A58238B0A132916870387A9794D73C62299C9ED76508504A51EABD939","sign_method":"HMAC-SHA256","access_token":"513ab3daf1b60dd6eb5df99787b9c4a9","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.5.0"} TuyaOpenAPI response: {"result":[{"category":"clkg","devices":["bf186a86b391440848ghff"],"functions":[{"code":"control","desc":"control","name":"control","type":"Enum","values":"{\"range\":[\"open\",\"stop\",\"close\"]}"},{"code":"percent_control","desc":"percent control","name":"percent control","type":"Integer","values":"{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}"},{"code":"cur_calibration","desc":"cur calibration","name":"cur calibration","type":"Enum","values":"{\"range\":[\"start\",\"end\"]}"},{"code":"control_back_mode","desc":"control back mode","name":"control back mode","type":"Enum","values":"{\"range\":[\"forward\",\"back\"]}"},{"code":"tr_timecon","desc":"tr timecon","name":"tr timecon","type":"Integer","values":"{\"unit\":\"s\",\"min\":2,\"max\":120,\"scale\":0,\"step\":1}"}],"product_id":"ffhiakhlxfbwb8tt"},{"category":"tgq","devices":["bfab88710e918f2472xse2"],"functions":[{"code":"switch_led_1","desc":"switch led 1","name":"switch led 1","type":"Boolean","values":"{}"},{"code":"bright_value_1","desc":"bright value 1","name":"bright value 1","type":"Integer","values":"{\"unit\":\"\",\"min\":10,\"max\":1000,\"scale\":0,\"step\":1}"},{"code":"brightness_min_1","desc":"brightness min 1","name":"brightness min 1","type":"Integer","values":"{\"unit\":\"\",\"min\":10,\"max\":1000,\"scale\":0,\"step\":1}"}],"product_id":"r2txmzqv3trxoveu"},{"category":"sd","devices":["bf685702d1f197ae31aci4"],"functions":[{"code":"power","desc":"power","name":"power","type":"Boolean","values":"{}"},{"code":"power_go","desc":"power go","name":"power go","type":"Boolean","values":"{}"},{"code":"mode","desc":"mode","name":"mode","type":"Enum","values":"{\"range\":[\"standby\",\"smart\",\"wall_follow\",\"spiral\",\"chargego\"]}"},{"code":"direction_control","desc":"direction control","name":"direction control","type":"Enum","values":"{\"range\":[\"backward\",\"turn_left\",\"turn_right\",\"stop\"]}"},{"code":"seek","desc":"seek","name":"seek","type":"Boolean","values":"{}"}],"product_id":"i8djoiag4btlhov4"}],"success":true,"t":1647189920632,"tid":"f87254b5a2ec11ecbb5ea27854ae7791"} path = /v1.0/devices/functions Adding: Persiana dormitorio (clkg / bf186a86b391440848ghff) Adding: Aspiradora (sd / bf685702d1f197ae31aci4) Adding: Dimmer (tgq / bfab88710e918f2472xse2) Existing Accessory found Dimmer bfab88710e918f2472xse2 3f97d47c-b547-4154-a296-daed8980c621 TuyaOpenAPI request: method = post, endpoint = https://openapi.tuyaeu.com, path = /v1.0/iot-03/open-hub/access-config, params = null, body = {"uid":"eu1642941792023Vf0Qp","link_id":"f7e84a20-a2ec-11ec-81d6-2954b67d882b","link_type":"mqtt","topics":"device","msg_encrypted_version":"1.0"}, headers = {"t":"1647189920662","client_id":"4ku9vsueb3wf9plsfpq8","nonce":"f7be53f0-a2ec-11ec-81d6-2954b67d882b","Signature-Headers":"client_id","sign":"5F06CB3EE290CCE6754BB07C56A7D8D2DD9C63CED180004C4BAF8203E0000C35","sign_method":"HMAC-SHA256","access_token":"513ab3daf1b60dd6eb5df99787b9c4a9","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.5.0"} TuyaOpenAPI response: {"result":{"client_id":"cloud_1c50f3dc13ba88572674d3b4f228f4d6","expire_time":7200,"password":"7ef3a294c4316ea6a0d8216d77b435d0","sink_topic":{"device":"cloud/token/out/{device_id}"},"source_topic":{"device":"cloud/token/in/2d45c19b3ec66fc7e8589d21472dd51f"},"url":"ssl://m1.tuyaeu.com:8883","username":"cloud_2d45c19b3ec66fc7e8589d21472dd51f"},"success":true,"t":1647189920810,"tid":"f88f4997a2ec11ec8f09c2098e70b1d9"} path = /v1.0/iot-03/open-hub/access-config TuyaOpenMQ connecting: ssl://m1.tuyaeu.com:8883 TuyaOpenMQ connected

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.