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
332 stars 168 forks source link

add RGBW SMART BULB #337

Closed johntous closed 1 year ago

johntous commented 1 year ago

TuyaOpenAPI response: {"result":{"access_token":" ","expire_time":7200,"platform_url":"https://openapi.tuyaus.com","refresh_token":" ","uid":""},"success":true,"t":1674253966271,"tid":"5cb4de65991211ed8808b63de06c2cf8"} path = /v1.0/iot-01/associated-users/actions/authorized-login TuyaOpenAPI request: method = get, endpoint = https://openapi.tuyaus.com, path = /v1.0/iot-01/associated-users/devices, params = {"size":100}, body = null, headers = {"t":"1674253966321","client_id":" ","nonce":"5c379140-9912-11ed-89cb-214ba72b3b35","Signature-Headers":"client_id","sign":"","sign_method":"HMAC-SHA256","access_token":" ","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.5.0"} TuyaOpenAPI response: {"result":{"devices":[{"active_time":1674185197,"biz_type":18,"category":"dsd","create_time":1674185197,"icon":"smart/icon/bay1585191439783zhuG/ef2ac0cba9bc74854b2c9073fae8d595.png","id":"eb7b8b9342e6d64ddaocky","ip":"","lat":"30.5447","local_key":"8753eb9987974756","lon":"-84.2386","model":"","name":"RGBW SMART BULB","online":false,"owner_id":"96164320","product_id":"hvjumj3mjsqapl4t","product_name":"RGBW SMART BULB","status":[{"code":"switch_led","value":true},{"code":"work_mode","value":"white"},{"code":"bright_value","value":1000},{"code":"colour_data","value":"{\"h\":0,\"s\":1000,\"v\":1000}"},{"code":"scene_data","value":"{\"scene_num\":1,\"scene_units\":[{\"bright\":200,\"h\":0,\"s\":0,\"temperature\":1000,\"unit_change_mode\":\"static\",\"unit_gradient_duration\":13,\"unit_switch_duration\":14,\"v\":0}]}"},{"code":"countdown","value":0}],"sub":false,"time_zone":"-05:00","uid":"","update_time":1674185202,"uuid":"2943175e7ebd0e37"}],"has_more":false,"last_row_key":"BBCF003DEBB31CA9D4C03A0A875C6CB3","total":1},"success":true,"t":1674253966769,"tid":"5cf592e8991211edb5e53abd0ca7b96f"} path = /v1.0/iot-01/associated-users/devices TuyaOpenAPI request: method = get, endpoint = https://openapi.tuyaus.com, path = /v1.0/devices/functions, params = {"device_ids":"eb7b8b9342e6d64ddaocky"}, body = null, headers = {"t":"1674253966832","client_id":" ","nonce":"5c379140-9912-11ed-89cb-214ba72b3b35","Signature-Headers":"client_id","sign":" ","sign_method":"HMAC-SHA256","access_token":" ","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.5.0"} TuyaOpenAPI response: {"result":[{"category":"dsd","devices":["eb7b8b9342e6d64ddaocky"],"functions":[{"code":"switch_led","desc":"switch led","name":"switch led","type":"Boolean","values":"{}"},{"code":"work_mode","desc":"work mode","name":"work mode","type":"Enum","values":"{\"range\":[\"white\",\"colour\",\"scene\",\"music\"]}"},{"code":"bright_value","desc":"bright value","name":"bright value","type":"Integer","values":"{\"min\":10,\"max\":1000,\"scale\":0,\"step\":1}"},{"code":"colour_data","desc":"colour data","name":"colour data","type":"Json","values":"{}"},{"code":"scene_data","desc":"scene data","name":"scene data","type":"Json","values":"{}"},{"code":"countdown","desc":"countdown","name":"countdown","type":"Integer","values":"{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}"},{"code":"music_data","desc":"music data","name":"music data","type":"Json","values":"{}"},{"code":"control_data","desc":"control data","name":"control data","type":"String","values":"{\"maxlen\":255}"}],"product_id":"hvjumj3mjsqapl4t"}],"success":true,"t":1674253967241,"tid":"5d43f590991211ed8808b63de06c2cf8"} path = /v1.0/devices/functions Adding: RGBW SMART BULB (dsd / eb7b8b9342e6d64ddaocky)

[ { "active_time": 1674166544, "biz_type": 0, "category": "dsd", "create_time": 1674166544, "icon": "smart/icon/bay1585191439783zhuG/ef2ac0cba9bc74854b2c9073fae8d595.png", "id": "eb90ac179771e2e472qfla", "ip": " ", "lat": "", "local_key": "", "lon": "", "model": "", "name": "RGBW SMART BULB", "online": true, "owner_id": " ", "product_id": "hvjumj3mjsqapl4t", "product_name": "RGBW SMART BULB", "status": [ { "code": "bright_value", "value": 1000 }, { "code": "colour_data", "value": "{\"h\":0,\"s\":1000,\"v\":1000}" }, { "code": "countdown", "value": 0 }, { "code": "scene_data", "value": "{\"scene_num\":1,\"scene_units\":[{\"bright\":200,\"h\":0,\"s\":0,\"temperature\":1000,\"unit_change_mode\":\"static\",\"unit_gradient_duration\":13,\"unit_switch_duration\":14,\"v\":0} ]}" }, { "code": "switch_led", "value": true }, { "code": "work_mode", "value": "white" } ], "sub": false, "time_zone": "-05:00", "uid": "", "update_time": 1674166544, "uuid": "2943175e7ebd0e37", "schema": [ { "code": "bright_value", "mode": "rw", "type": "Integer", "property": { "min": 10, "max": 1000, "scale": 0, "step": 1 } }, { "code": "colour_data", "mode": "rw", "type": "Json", "property": {} }, { "code": "control_data", "mode": "wo", "type": "String", "property": { "maxlen": 255 } }, { "code": "countdown", "mode": "rw", "type": "Integer", "property": { "unit": "s", "min": 0, "max": 86400, "scale": 0, "step": 1 } }, { "code": "music_data", "mode": "wo", "type": "Json", "property": {} }, { "code": "scene_data", "mode": "rw", "type": "Json", "property": {} }, { "code": "switch_led", "mode": "rw", "type": "Boolean", "property": {} }, { "code": "work_mode", "mode": "rw", "type": "Enum", "property": { "range": [ "white", "colour", "scene", "music" ] } } ] } ]

github-actions[bot] commented 1 year ago

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

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.