tuya / tuya-home-assistant

Home Assistant integration for controlling Powered by Tuya (PBT) devices using Tuya Open API, maintained by the Home Assistant Community and Tuya Developer Team.
MIT License
869 stars 206 forks source link

Dimmer light switches listed as Light Modulator in iot.tuya.com are not displayed in HA #129

Open cocacoli4ko opened 3 years ago

cocacoli4ko commented 3 years ago

Hi, not sure what more to provide since the device is not shown in HA. I have several devices from this type, none is available in HA. Devices are visible in iot Tyua (see scr shot)

Device normal info

Screenshot 2021-07-11 at 0 17 18
tsutsuku commented 3 years ago

@cocacoli4ko Can you provide your device specifications?

cocacoli4ko commented 3 years ago

@tsutsuku I'm not sure how to get the specifications... Can I get this from the Tuya app or in the cloud? What exactly is needed - hardware inside or software version? I can try to ask the manufacturer too

andrey-yantsen commented 3 years ago

@cocacoli4ko take a look at the issue template – https://github.com/tuya/tuya-home-assistant/blob/master/.github/ISSUE_TEMPLATE/bug_report.md, it has all the details on how to get the required info.

cocacoli4ko commented 2 years ago

@andrey-yantsen Here's the data from the log:

device info { "active_time": 1613380640, "biz_type": 0, "category": "tgq", "create_time": 1601034376, "icon": "smart/icon/ay15327721968035jwx9/158754167737006edd612.jpg", "id": "67146444c44f33b77b02", "ip": "94.236.138.139", "lat": "42.6824084", "local_key": "ce0794d98ff9930f", "lon": "23.2681686", "model": "1路调光模块 1051路调光", "name": "Лява", "online": true, "owner_id": "10662434", "product_id": "uwajjpe6u24lmjqf", "product_name": "Dimmer", "status": [ { "code": "switch_led_1", "value": false }, { "code": "bright_value_1", "value": 510 }, { "code": "brightness_min_1", "value": 10 }, { "code": "led_type_1", "value": "LED" } ], "sub": false, "time_zone": "+02:00", "uid": "eu1582446281837qkSql", "update_time": 1631161770, "uuid": "67146444c44f33b77b02" }

Device specifications 2021-09-09 10:13:44 DEBUG (SyncWorker_2) [tuya iot] Request: method = GET, url = https://openapi.tuyaeu.com/v1.0/devices/67146444c44f33b77b02/specifications, params = None, body = None, headers = {'client_id': 'a3d8nrc4aqqf3kmfvqr3', 'sign': 'C5C1E880AEE9BB5E443060A11ADEDC3EDA262ED33782374F258FC61F378EF39F', 'sign_method': 'HMAC-SHA256', 'access_token': '9a092c960288d3e97f84466252a32dc2', 't': '1631171624105', 'lang': 'en'} 2021-09-09 10:13:44 DEBUG (SyncWorker_2) [tuya iot] Response: { "result": { "category": "tgq", "functions": [ { "code": "switch_led_1", "type": "Boolean", "values": "{}" }, { "code": "bright_value_1", "type": "Integer", "values": "{\"min\":10,\"max\":1000,\"scale\":0,\"step\":1}" }, { "code": "brightness_min_1", "type": "Integer", "values": "{\"min\":10,\"max\":1000,\"scale\":0,\"step\":1}" }, { "code": "led_type_1", "type": "Enum", "values": "{\"range\":[\"incandescent\",\"halogen\"]}" } ], "status": [ { "code": "switch_led_1", "type": "Boolean", "values": "{}" }, { "code": "bright_value_1", "type": "Integer", "values": "{\"min\":10,\"max\":1000,\"scale\":0,\"step\":1}" }, { "code": "brightness_min_1", "type": "Integer", "values": "{\"min\":10,\"max\":1000,\"scale\":0,\"step\":1}" }, { "code": "led_type_1", "type": "Enum", "values": "{\"range\":[\"incandescent\",\"halogen\"]}" } ] }, "success": true, "t": 1631171624201 }

cocacoli4ko commented 2 years ago

@andrey-yantsen Actually I'm confident about the device info, but I'm not confident if the Device specifications is matching it, could you tell me what should match between both?

The specification above has the same functions as listed in iot.tuya under device debugging

andrey-yantsen commented 2 years ago

@cocacoli4ko, to be honest, I have no idea :) I'm just passing by. But it seems you've matched them correctly: both device info and the specification have the string 67146444c44f33b77b02 in them.

cocacoli4ko commented 2 years ago

@andrey-yantsen yeah I'm pretty confident it's the correct specification. I guess it will take a while for this request to be completed, is there a way for me to help? Can I contribute and add the device myself? I have 1 or 2 more devices waiting to be added so can be helpful...