rxwen / homeassistant-terncy-component

Terncy custom component for homeassistant
https://www.terncy.com
72 stars 11 forks source link

透天環境,三樓網關一陣子會無回應 #57

Closed uho886 closed 8 months ago

uho886 commented 10 months ago

請問是否有人遇到一段時間後,網關在ha沒有回應,需要重新載入,實體才能用(使用環境有五個家庭中心,其中2/3/4樓有做多網關融合。)目前只有遇到三樓這組有問題 IMG_0491 IMG_0492 IMG_0493 IMG_0494 IMG_0495 IMG_0496 IMG_0497

Necroneco commented 10 months ago

有遇到过类似问题,需要在HA重载集成才能好,不过出现频率不高(可能几周一次),暂时还没找到原因。

我会开日志关注一下,看看下次出现的时候能不能找到线索

uho886 commented 10 months ago

感謝,不過我三樓最多稱兩天,最晚一天就需要重新載人。我目前把ha定位關掉測試看看

xzshow commented 9 months ago

有遇到过类似问题,需要在HA重载集成才能好,不过出现频率不高(可能几周一次),暂时还没找到原因。

我会开日志关注一下,看看下次出现的时候能不能找到线索

大佬我又来找您 了,我这一个小时不到全部不可用,等一下又好,然后又不可用,HA是core 2024.1.6版本的

xzshow commented 9 months ago

微信截图_20240203003750

xzshow commented 9 months ago

![Uploading 微信截图_20240203003725.png…]()

xzshow commented 9 months ago

![Uploading 微信截图_20240203003725.png…]()

xzshow commented 9 months ago

![Uploading 微信截图_20240203003725.png…]()

Necroneco commented 9 months ago

有遇到过类似问题,需要在HA重载集成才能好,不过出现频率不高(可能几周一次),暂时还没找到原因。 我会开日志关注一下,看看下次出现的时候能不能找到线索

大佬我又来找您 了,我这一个小时不到全部不可用,等一下又好,然后又不可用,HA是core 2024.1.6版本的

我这还挺稳定的诶,我也是2024.1.6。 你是最近才这样的吗?网络方面或者其它有什么变化吗?

xzshow commented 9 months ago

我之前是老版本也没注意,昨晚才注意到的

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: Necroneco @.> 发送时间: 2024年2月3日 13:27 收件人: rxwen/homeassistant-terncy-component @.> 抄送: xzshow @.>, Comment @.> 主题: Re: [rxwen/homeassistant-terncy-component] 透天環境,三樓網關一陣子會無回應 (Issue #57)

有遇到过类似问题,需要在HA重载集成才能好,不过出现频率不高(可能几周一次),暂时还没找到原因。 我会开日志关注一下,看看下次出现的时候能不能找到线索

大佬我又来找您 了,我这一个小时不到全部不可用,等一下又好,然后又不可用,HA是core 2024.1.6版本的

我这还挺稳定的诶,我也是2024.1.6。 你是最近才这样的吗?网络方面或者其它有什么变化吗?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

uho886 commented 9 months ago

我後來發現問題所在了,如果有用多網關融合,主網關那組設備會容易沒有回應。只要解除融合就穩定多了,你可以試看看

xzshow commented 9 months ago

我没有融合网关,哈是单个的

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: uho886 @.> 发送时间: 2024年2月3日 19:18 收件人: rxwen/homeassistant-terncy-component @.> 抄送: xzshow @.>, Comment @.> 主题: Re: [rxwen/homeassistant-terncy-component] 透天環境,三樓網關一陣子會無回應 (Issue #57)

我後來發現問題所在了,如果有用多網關融合,主網關那組設備會容易沒有回應。只要解除融合就穩定多了,你可以試看看

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

rxwen commented 9 months ago

发生这个异常后,不要动HA,重启网关能恢复吗?

rxwen commented 9 months ago

如果还发现有问题,请试试这个版本: https://github.com/rxwen/homeassistant-terncy-component/releases/tag/v1.0.40

xzshow commented 9 months ago

温总,这有几个开关一起这状态,现在都 不知道是那个开关了,房间和名称都 不同步 1234

xzshow commented 9 months ago

![Uploading 1234.png…]()

Necroneco commented 9 months ago

温总,这有几个开关一起这状态,现在都 不知道是那个开关了,房间和名称都 不同步 1234

这个嘛,应该是某个不到3路的开关的第3个按键。(现在这样确实不太好认)

xzshow commented 9 months ago

已确认了,是这东西,比如,不到4路的,上面有四个按键的,APP上有编码,要自己在HA中改

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2024年2月5日(星期一) 下午4:12 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [rxwen/homeassistant-terncy-component] 透天環境,三樓網關一陣子會無回應 (Issue #57)

温总,这有几个开关一起这状态,现在都 不知道是那个开关了,房间和名称都 不同步

这个嘛,应该是某个不到3路的开关的第3个按键。(现在这样确实不太好认)

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

xzshow commented 8 months ago

我今天才发现门锁里面的电量是不变化的,一直是80,从来没变化 过

rxwen commented 8 months ago

如果还发现有问题,请试试这个版本: https://github.com/rxwen/homeassistant-terncy-component/releases/tag/v1.0.40

先 close 此问题。如有问题再 open

xzshow commented 8 months ago

电量从来都是80没变过

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: rxwen @.> 发送时间: 2024年2月24日 14:56 收件人: rxwen/homeassistant-terncy-component @.> 抄送: xzshow @.>, Comment @.> 主题: Re: [rxwen/homeassistant-terncy-component] 透天環境,三樓網關一陣子會無回應 (Issue #57)

如果还发现有问题,请试试这个版本: https://github.com/rxwen/homeassistant-terncy-component/releases/tag/v1.0.40

先 close 此问题。如有问题再 open

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

xzshow commented 8 months ago

锁的电量从来都是80没变动过

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: rxwen @.> 发送时间: 2024年2月24日 14:56 收件人: rxwen/homeassistant-terncy-component @.> 抄送: xzshow @.>, Comment @.> 主题: Re: [rxwen/homeassistant-terncy-component] 透天環境,三樓網關一陣子會無回應 (Issue #57)

如果还发现有问题,请试试这个版本: https://github.com/rxwen/homeassistant-terncy-component/releases/tag/v1.0.40

先 close 此问题。如有问题再 open

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

justzerock commented 7 months ago

我这边也是一样的问题,单个网关 实体在 HA 中时不时变成不可用

只能在集成中重载(我日常就靠定时重载任务解决,但总会遇上不可用状态) 不动HA,重启网关,无法解决这个问题

下面是日志:

Details

日志: homeassistant.components.websocket_api.http.connection 来源: components/websocket_api/commands.py:239 集成: Home Assistant WebSocket API (文档, 问题) 首次发生: 22:11:00 (6 全部发生) 上次记录: 22:21:08 [139937861737024] sent 1000 (OK); no close frame received [139937861736640] sent 1000 (OK); no close frame received Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 959, in transfer_data message = await self.read_message() ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1029, in read_message frame = await self.read_data_frame(max_size=self.max_size) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1104, in read_data_frame frame = await self.read_frame(max_size) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1161, in read_frame frame = await Frame.read( ^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/websockets/legacy/framing.py", line 68, in read data = await reader(2) ^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/asyncio/streams.py", line 750, in readexactly raise exceptions.IncompleteReadError(incomplete, n) asyncio.exceptions.IncompleteReadError: 0 bytes read on a total of 2 expected bytes The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 239, in handle_call_service response = await hass.services.async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2319, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2356, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 905, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 975, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 628, in async_handle_light_on_service await light.async_turn_on(**filter_turn_on_params(light, params)) File "/usr/src/homeassistant/homeassistant/components/switch_as_x/entity.py", line 155, in async_turn_on await self.hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 2319, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2356, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 905, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 975, in _handle_entity_call result = await task ^^^^^^^^^^ File "/config/custom_components/terncy/switch.py", line 78, in async_turn_on await self.api.set_attribute( File "/config/custom_components/terncy/core/gateway.py", line 224, in set_attribute ret = await self.api.set_attribute(eid, attr, value, method) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/terncy/terncy.py", line 321, in set_attribute await self._connection.send(json.dumps(data)) File "/usr/local/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 635, in send await self.ensure_open() File "/usr/local/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 935, in ensure_open raise self.connection_closed_exc() websockets.exceptions.ConnectionClosedError: sent 1000 (OK); no close frame received

Necroneco commented 7 months ago

很有帮助的日志, 看上去似乎是 HA 和网关之间的连接不太稳定. 会尽快试着修一下.

rxwen commented 6 months ago

我在本地无法复现这个问题。请测试下这个1.0.41版本。 https://github.com/rxwen/homeassistant-terncy-component/releases/tag/v1.0.41