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

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

[技术探讨] 干货:ChatGPT接入Siri,让HomePod/CarPlay智能化

  [复制链接]

5

主题

357

帖子

2046

积分

金牌会员

Rank: 6Rank: 6

积分
2046
金钱
1674
HASS币
60
 楼主| 发表于 2023-7-14 23:37:54 | 显示全部楼层
shadowdoggie 发表于 2023-7-14 13:11
按照流程找到的p-b,ha出现下面的错误日志,有大佬遇到过吗
Logger: custom_components.poe_chat
Source: c ...

配置集成的时候出现的?看看有没有其他日志
回复

使用道具 举报

0

主题

39

帖子

324

积分

中级会员

Rank: 3Rank: 3

积分
324
金钱
285
HASS币
0
发表于 2023-7-18 10:24:13 | 显示全部楼层
这个是过期吗?
微信图片_20230718102337.png
回复

使用道具 举报

5

主题

357

帖子

2046

积分

金牌会员

Rank: 6Rank: 6

积分
2046
金钱
1674
HASS币
60
 楼主| 发表于 2023-7-18 14:49:30 | 显示全部楼层
gosrak 发表于 2023-7-18 10:24
这个是过期吗?

这个没关系,可以升级一下1.0.5版本,这个版本应该解决了过一段时间就无响应的bug了
回复

使用道具 举报

0

主题

39

帖子

324

积分

中级会员

Rank: 3Rank: 3

积分
324
金钱
285
HASS币
0
发表于 2023-7-20 09:58:20 | 显示全部楼层
这个对于最新版的ha 7月的新版支持是不是没有那么好
回复

使用道具 举报

76

主题

1364

帖子

1万

积分

元老级技术达人

积分
18853
金钱
17449
HASS币
290
发表于 2023-7-20 21:53:09 | 显示全部楼层
现在试了一下1.0.5版本,目前测试基本正常了。
回复

使用道具 举报

1

主题

83

帖子

551

积分

高级会员

Rank: 4

积分
551
金钱
468
HASS币
0
发表于 2023-7-20 23:28:57 | 显示全部楼层
本帖最后由 BSXIAOLinzi 于 2023-7-20 23:30 编辑
shadowdoggie 发表于 2023-7-14 13:11
按照流程找到的p-b,ha出现下面的错误日志,有大佬遇到过吗
Logger: custom_components.poe_chat
Source: c ...

一样的报错。之前能用,突然之间就开始报这个错
删掉集成重新添加提示的错误日志如下:
电脑用浏览器访问poe.com正常,感觉是被封了?
Server returned a status code of 403 while downloading https://poe.com. Retrying (6/10)...
Server returned a status code of 403 while downloading https://poe.com. Retrying (7/10)...
Server returned a status code of 403 while downloading https://poe.com. Retrying (8/10)...
Server returned a status code of 403 while downloading https://poe.com. Retrying (9/10)...
Server returned a status code of 403 while downloading https://poe.com. Retrying (10/10).
Error handling request
Traceback (most recent call last):
  File "/config/custom_components/poe_chat/__init__.py", line 220, in init
    self.setup_connection()
  File "/config/custom_components/poe_chat/poe.py", line 177, in setup_connection
    self.next_data = self.get_next_data(overwrite_vars=True)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/poe_chat/poe.py", line 219, in get_next_data
    r = request_with_retries(self.session.get, self.home_url)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/poe_chat/poe.py", line 80, in request_with_retries
    raise RuntimeError(f"Failed to download {url} too many times.")
RuntimeError: Failed to download https://poe.com too many times.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 148, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 181, in post
    return await super().post(request, flow_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
    result = await method(view, request, data, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 297, in async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 393, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/poe_chat/config_flow.py", line 36, in async_step_user
    if acc := await get_client_from_config(self.hass, user_input, renew=True):
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/poe_chat/__init__.py", line 105, in get_client_from_config
    await client.async_init()
  File "/config/custom_components/poe_chat/__init__.py", line 216, in async_init
    return await self.hass.async_add_executor_job(partial(self.init))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/poe_chat/__init__.py", line 227, in init
    exc, self.session.cookies, self.get_websocket_url(), self.channel, self.gql_headers, self.bot_names,
                               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/poe_chat/poe.py", line 336, in get_websocket_url
    query = f'?min_seq={channel["minSeq"]}&channel={channel["channel"]}&hash={channel["channelHash"]}'
                        ~~~~~~~^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable

回复

使用道具 举报

5

主题

357

帖子

2046

积分

金牌会员

Rank: 6Rank: 6

积分
2046
金钱
1674
HASS币
60
 楼主| 发表于 2023-7-21 23:05:10 | 显示全部楼层
BSXIAOLinzi 发表于 2023-7-20 23:28
一样的报错。之前能用,突然之间就开始报这个错
删掉集成重新添加提示的错误日志如下:
电脑用浏览器访问p ...

昨天有段时间Poe的接口有点问题,今天又好了,如果后面还这样,我再考虑修改一下poe-api的代码
回复

使用道具 举报

5

主题

357

帖子

2046

积分

金牌会员

Rank: 6Rank: 6

积分
2046
金钱
1674
HASS币
60
 楼主| 发表于 2023-7-21 23:08:37 | 显示全部楼层
dscao 发表于 2023-7-20 21:53
现在试了一下1.0.5版本,目前测试基本正常了。

v1.0.6新增了不发消息就可以重连websocket的功能。在新版的快捷指令(v1.2)里面,我将重连websocket放在了Siri欢迎语之前,这样在用户提出第一句问题后,就不需要等待websocket重连了,响应速度更快,体验更好。另外将轮询时间改成了0.1秒,句子与句子之间的等待时间更短
回复

使用道具 举报

1

主题

83

帖子

551

积分

高级会员

Rank: 4

积分
551
金钱
468
HASS币
0
发表于 2023-7-22 12:01:40 | 显示全部楼层
本帖最后由 BSXIAOLinzi 于 2023-7-22 12:18 编辑
muxiachuixue 发表于 2023-7-21 23:05
昨天有段时间Poe的接口有点问题,今天又好了,如果后面还这样,我再考虑修改一下poe-api的代码 ...

我这里试还是不行。和鸡场的IP地区有关吗?我的是美丽国的更新:
确实是代理问题。不能细讲的问题留个MARK,给其他人个排查思路
回复

使用道具 举报

76

主题

1364

帖子

1万

积分

元老级技术达人

积分
18853
金钱
17449
HASS币
290
发表于 2023-7-22 12:34:28 | 显示全部楼层
muxiachuixue 发表于 2023-7-21 23:08
v1.0.6新增了不发消息就可以重连websocket的功能。在新版的快捷指令(v1.2)里面,我将重连websocket放在 ...

刚刚测试了一下最新版,效果挺好的。
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-5-15 23:31 , Processed in 0.140871 second(s), 32 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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