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
345 stars 178 forks source link

I couldn't add Tuya thermo&humid device. #283

Closed missflash closed 1 year ago

missflash commented 2 years ago

I bought Tuya thermo&humid sensor. There is no problem at my Smart Life app and Tuya IoT Platform wesite. However, no device added at HomeBridge and HomeKit.

Here are my TuyaOpenAPI request and response logs. How can I add my device at HomeBridge?

Thank you for your assistance.

===

TuyaOpenAPI request: method = post, endpoint = https://openapi.tuyaus.com, path = /v1.0/iot-01/associated-users/actions/authorized-login, params = null, body = {"country_code":1,"username":"XXXXXXXXXXXXX","password":"XXXXXXXXXXXXX","schema":"smartlife"}, headers = {"t":"1663480869212","client_id":"XXXXXXXXXXXXX","nonce":"4a48e4a0-3717-11ed-ad94-f9a6bee6e1a2","Signature-Headers":"client_id","sign":"715F36A7AF0B78A7242108A576EBEDB5530D6FF6BECDAF3E29D8A3CA91083744","sign_method":"HMAC-SHA256","access_token":"","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.5.0"}

TuyaOpenAPI response: {"result":{"access_token":"XXXXXXXXXXXXX","expire_time":7200,"platform_url":"https://openapi.tuyaus.com","refresh_token":"XXXXXXXXXXXXX","uid":"az1663131911564LXiry"},"success":true,"t":1663480870048,"tid":"4af35df7371711edb15d4a9758e475c4"} path = /v1.0/iot-01/associated-users/actions/authorized-login

TuyaOpenAPI response: {"result":[{"category":"wsdcg","devices":["eb686b205af5a808d5d0z0"],"functions":[{"code":"temp_unit_convert","desc":"temp unit convert","name":"temp unit convert","type":"Enum","values":"{\"range\":[\"c\",\"f\"]}"}],"product_id":"fpiil0ny2sk3j2f2"},{"category":"infrared_light","devices":["ebc15db437d00bee0ecjax","ebbf1ee152ba4c1df86rek"],"functions":[],"product_id":"0000008vh5"},{"category":"infrared_ac","devices":["eb9b9395e2624c727apqrh","eb3a5067c84f0ae10a0rnd","eb743f2948f5bb6032jo3v","ebb42b500f390bc734xobr"],"functions":[{"code":"switch","desc":"switch","name":"switch","type":"BOOLEAN","values":"{}"},{"code":"mode","desc":"mode","name":"mode","type":"ENUM","values":"{\"range\":[\"dehumidification\",\"cold\",\"auto\",\"wind_dry\",\"heat\"]}"},{"code":"temp","desc":"temp","name":"temp","type":"INTEGER","values":"{\"max\":30,\"min\":16,\"scale\":0,\"step\":1,\"type\":\"Integer\",\"unit\":\"℃\"}"},{"code":"fan","desc":"fan","name":"fan","type":"ENUM","values":"{\"range\":[\"low\",\"mid\",\"high\",\"auto\"]}"}],"product_id":"0000008vhd"}],"success":true,"t":1663480872253,"tid":"4c379cd4371711edb15d4a9758e475c4"} path = /v1.0/devices/functions

github-actions[bot] commented 2 years ago

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

lexrento commented 1 year ago

I`m need this category "wsdcg" in plugin too.

0x5e commented 1 year ago

Hi @missflash @lexrento , Implemented in @0x5e/homebridge-tuya-platform 1.6.0-beta.9. Tested on virtual device, please have a try.

github-actions[bot] commented 1 year 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.