make-all / tuya-local

Local support for Tuya devices in Home Assistant
MIT License
1.41k stars 542 forks source link

Unable to add IR RF hub #2515

Closed vladmokryi closed 5 days ago

vladmokryi commented 6 days ago

Description

I saw that this device is already supported (s11_rfir_remote.yaml), but when I tried to add this I noticed an error message:

Unable to connect to your device with those details. It could be an intermittent issue, or they may be incorrect.

I also noticed that I see different product_id in dev portal and in local logs

Steps to reproduce

  1. Add new device
  2. Login by qr code
  3. Select device - rf hub
  4. Check id, IP and etc and click send

Expected behaviour

Device successfully added

Additional context

Query Device Details

{
...
"product_id": "nwpvjlq7qacvnqf3",
"product_name": "S11+( IR+RF遥控器Pro)",
...
}

Query Things Data Model:

{
  "result": {
    "model": "{\"modelId\":\"000004t1bk\",\"services\":[{\"actions\":[],\"code\":\"\",\"description\":\"\",\"events\":[],\"name\":\"默认服务\",\"properties\":[{\"abilityId\":201,\"accessMode\":\"rw\",\"code\":\"ir_send\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-icon-test11\",\"attribute\":\"2048\"},\"name\":\"红外控制下发\",\"typeSpec\":{\"type\":\"string\",\"maxlen\":3072}},{\"abilityId\":202,\"accessMode\":\"ro\",\"code\":\"ir_study_code\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-shangsheng\",\"attribute\":\"2048\"},\"name\":\"红外学习值上报\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}}]}]}"
  },
  "success": true,
  "t": 1731774086687,
  "tid": "d4259884a43611efbd65e6107338fc03"
}

Logs:

DEBUG (MainThread) [custom_components.tuya_local.config_flow] Scanning network to get IP address for ##.
DEBUG (MainThread) [custom_components.tuya_local.config_flow] Found: {'ip': '##', 'version': '3.3', 'id': '##', 'product_id': 'keym4vvjhx4sd9kk', 'data': {'ip': '##', 'gwId': '##', 'active': 2, 'encrypt': True, 'productKey': 'keym4vvjhx4sd9kk', 'version': '3.3', 'name': '', 'key': '', 'mac': '', 'id': '##', 'ability': 0, 'token': '', 'wf_cfg': '', 'dev_type': 'default', 'origin': 'broadcast'}}
...
DEBUG (SyncWorker_55) [custom_components.tuya_local.device] Test refreshed device state: {"Error": "Network Error: Unable to Connect", "Err": "901", "Payload": null}
WARNING (SyncWorker_55) [custom_components.tuya_local.device] Test protocol error 901: Network Error: Unable to Connect

Confirmation

make-all commented 5 days ago

Your device is not exposing any data in normal operation, since it is just an IR/RF controller (send only, no status). Such devices cannot be supported at this time.

The S11+ which is supported has scenes as well as the IR/RF control, and can be added when scene 1 is selected, since the device is reporting which scene is active.

make-all commented 5 days ago

Closing as duplicate of #847