『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
楼主: manymuch

[进阶教程] 通过localtuya接入涂鸦网关下的 蓝牙/zigbee 子设备

  [复制链接]

5

主题

35

帖子

138

积分

注册会员

Rank: 2

积分
138
金钱
103
HASS币
0
发表于 2023-8-15 00:59:01 | 显示全部楼层
beqikaer 发表于 2023-4-16 12:49
Logger: custom_components.localtuya.config_flow
Source: custom_components/localtuya/pytuya/__init_ ...

同样的错误

2023-08-15 00:55:41.124 ERROR (MainThread) [custom_components.localtuya.pytuya] [ebf...m0e] Failed to get status for cid xxxx: 
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/asyncio/tasks.py", line 490, in wait_for
    return fut.result()
           ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/locks.py", line 387, in acquire
    await fut
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 684, in detect_available_dps
    status = await self.status(cid)
             ^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 598, in status
    status = await self.exchange(ACTION_STATUS, cid=cid)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 563, in exchange
    msg = await self.dispatcher.wait_for(seqno)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 325, in wait_for
    await asyncio.wait_for(self.listeners[seqno].acquire(), timeout=timeout)
  File "/usr/local/lib/python3.11/asyncio/tasks.py", line 492, in wait_for
    raise exceptions.TimeoutError() from exc
TimeoutError
2023-08-15 00:55:41.153 DEBUG (MainThread) [custom_components.localtuya.pytuya] [ebf...m0e] Closing connection
2023-08-15 00:55:41.154 ERROR (MainThread) [custom_components.localtuya.config_flow] Unexpected exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/asyncio/tasks.py", line 490, in wait_for
    return fut.result()
           ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/locks.py", line 387, in acquire
    await fut
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/config/custom_components/localtuya/config_flow.py", line 450, in async_step_basic_sub_device_info
    self.dps_strings = await validate_input(self.hass, user_input)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/localtuya/config_flow.py", line 282, in validate_input
    detected_dps = await interface.detect_available_dps(data[CONF_DEVICE_ID])
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 684, in detect_available_dps
    status = await self.status(cid)
             ^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 598, in status
    status = await self.exchange(ACTION_STATUS, cid=cid)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 563, in exchange
    msg = await self.dispatcher.wait_for(seqno)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 325, in wait_for
    await asyncio.wait_for(self.listeners[seqno].acquire(), timeout=timeout)
  File "/usr/local/lib/python3.11/asyncio/tasks.py", line 492, in wait_for
    raise exceptions.TimeoutError() from exc
TimeoutError

                               
登录/注册后可看大图
回复

使用道具 举报

5

主题

35

帖子

138

积分

注册会员

Rank: 2

积分
138
金钱
103
HASS币
0
发表于 2023-8-23 11:12:36 | 显示全部楼层
前面测试的是一个zigbee 蓝牙多模网关,拿回来升级了固件,版本为联网模块1.48  zigbee模块2.41
应该是协议升级了,可能3.4了。但是不知道怎么测协议版本,脚本只支持到3.3的协议,然后就添加失败

然后换了一个单zigbee涂鸦网关,联网模块V1.13.2  zigbee模块 V1.0.8
网页端添加自动识别为3.3的协议,可以添加成功,也能识别下面的子设备

                               
登录/注册后可看大图
回复

使用道具 举报

5

主题

35

帖子

138

积分

注册会员

Rank: 2

积分
138
金钱
103
HASS币
0
发表于 2023-8-23 15:22:45 | 显示全部楼层
Geekman 发表于 2023-8-23 11:12
前面测试的是一个zigbee 蓝牙多模网关,拿回来升级了固件,版本为联网模块1.48  zigbee模块2.41
应该是协 ...

支持zigbee和ble网关的localtuya集成  支持涂鸦3.4协议
https://bbs.hassbian.com/thread-22505-1-1.html
(出处: 『瀚思彼岸』» 智能家居技术论坛)

                               
登录/注册后可看大图
回复

使用道具 举报

1

主题

11

帖子

132

积分

注册会员

Rank: 2

积分
132
金钱
121
HASS币
0
发表于 2024-3-28 14:45:11 | 显示全部楼层
一直提示 An unknown error occurred. See log for details.  插件装来装去,也更换了ha的旧版本和简易版本,设备也更换了三个,都是各种各样的问题。device id(cid)试过子设备的uuid、tid等所有的id,也试过网关的id,都是这个提示、


localtuya:
  - host: 192.168.xx.xxx
    device_id: 6c4******hx
    local_key: hP******3Li
    friendly_name: 网关
    protocol_version: "3.3"
    is_gateway: true

求各位大神的教导指正。


                               
登录/注册后可看大图

                               
登录/注册后可看大图





回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-5-14 13:29 , Processed in 0.085317 second(s), 24 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表