Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"cloud mode" hub appears in the device list but is absent from the hub list #1956

Closed
almirus opened this issue May 27, 2024 · 1 comment
Closed

Comments

@almirus
Copy link
Contributor

almirus commented May 27, 2024

Describe the bug
Good day! The cloud addition feature is cool, but I don't know if it's a Tuya API error or an integration bug, but the (lamp) hub is in the device list and absent from the hub list. Therefore, I cannot connect the lamps that are connected through this hub; I get the error "Device needs a gateway"

To Reproduce
add cloud authorization, try to add a sub-device - the lamp

Additional context
image
image

{
  "result": {
    "active_time": 1688218045,
    "bind_space_id": "36487050",
    "category": "wg2",
    "create_time": 1688218045,
    "custom_name": "Gateway lamp",
    "icon": "smart/icon/ay1543197764459ckY1a/c2a8259d6d96fe9ed210d73d6c1d7216.png",
    "id": "bf58d929ed58421c07gowp",
    "ip": "91.214.243.174",
    "is_online": true,
    "lat": "55.7259",
    "local_key": "HIDDEN",
    "lon": "37.7482",
    "model": "",
    "name": "Gateway",
    "product_id": "br85qgx86gsavad9",
    "product_name": "PRO X2P",
    "sub": false,
    "time_zone": "+03:00",
    "update_time": 1716793507,
    "uuid": "0680a593f80132a4"
  },
  "success": true,
  "t": 1716795119649,
  "tid": "340d40871bfb11ef80c7da85933c7aab"
}
{
  "result": {
    "model": "{\"modelId\":\"000001zjqq\",\"services\":[{\"actions\":[],\"code\":\"\",\"description\":\"\",\"events\":[],\"name\":\"默认服务\",\"properties\":[{\"abilityId\":106,\"accessMode\":\"wr\",\"code\":\"RESTORE_DEV\",\"description\":\"\",\"name\":\"RESTORE_DEV\",\"typeSpec\":{\"type\":\"string\",\"maxlen\":255}},{\"abilityId\":107,\"accessMode\":\"rw\",\"code\":\"LENET_ID\",\"description\":\"\",\"name\":\"LENET_ID\",\"typeSpec\":{\"type\":\"string\",\"maxlen\":255}},{\"abilityId\":108,\"accessMode\":\"rw\",\"code\":\"DevInfor\",\"description\":\"\",\"name\":\"设备信息\",\"typeSpec\":{\"type\":\"value\",\"max\":2147483647,\"min\":0,\"scale\":1,\"step\":1,\"unit\":\"\"}},{\"abilityId\":109,\"accessMode\":\"rw\",\"code\":\"SpecialFlag\",\"description\":\"groupeach 打开单控 \\nnone关闭单控\",\"name\":\"功能标志\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"none\",\"groupeach\"]}},{\"abilityId\":110,\"accessMode\":\"wr\",\"code\":\"SRemote\",\"description\":\"\",\"name\":\"直连控制\",\"typeSpec\":{\"type\":\"string\",\"maxlen\":255}},{\"abilityId\":111,\"accessMode\":\"rw\",\"code\":\"btype\",\"description\":\"\",\"name\":\"类型\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"LeShi\",\"DW\",\"GMM\",\"GSD\",\"RE1\",\"RE2\",\"RE3\",\"RE4\"]}}]}]}"
  },
  "success": true,
  "t": 1716795193119,
  "tid": "5fd4c92c1bfb11ef89139a1bd412573b"
}
@almirus almirus added the bug Something isn't working label May 27, 2024
make-all added a commit that referenced this issue May 29, 2024
I have one of these myself, and although I've never been able to get the
sub devices (emulated climate devices) working, it may still be useful
to recognise this as a hub in case others do work.

Discussion #1960, Issue #1956 (along with last change)
@make-all
Copy link
Owner

make-all commented May 29, 2024

As noted on #1960, the code was only using the absence of a local key to detect gateways. But some gateways have local functions as well, so they do have local keys. Now a list of known gateway categories has been added, to improve the recognition (in this case wg2, which seems to be the general category for Bluetooth gateways).

@make-all make-all added awaiting confirmation Wating for confirmation the issue is solved unreleased Will be in next release labels May 29, 2024
@make-all make-all removed bug Something isn't working awaiting confirmation Wating for confirmation the issue is solved unreleased Will be in next release labels Jun 9, 2024
@make-all make-all closed this as completed Jun 9, 2024
timlaing pushed a commit to timlaing/tuya-local that referenced this issue Aug 8, 2024
I have one of these myself, and although I've never been able to get the
sub devices (emulated climate devices) working, it may still be useful
to recognise this as a hub in case others do work.

Discussion make-all#1960, Issue make-all#1956 (along with last change)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants