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

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

[插件集成] 让你的HomePod可以TTS?没有那么多麻烦

  [复制链接]

0

主题

17

帖子

178

积分

注册会员

Rank: 2

积分
178
金钱
161
HASS币
0
发表于 2021-11-20 00:44:52 | 显示全部楼层
involute 发表于 2021-11-3 17:36
啥设备?如果是HomePod,啥系统版本?

HA啥版本?是否重装了miniaudio?

和楼上一样的报错,pyatv不小心升级到0.9.6了。。。会有影响吗?
Logger: aiohttp.server
Source: custom_components/apple_airplayer/device_manager.py:39
Integration: Apple AirPlayer (documentation, issues)
First occurred: 24:44:30 (1 occurrences)
Last logged: 24:44:30

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 98, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 24, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 138, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 135, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 157, in post
    return await super().post(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 62, in wrapper
    result = await method(view, request, *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 246, in async_configure
    result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 320, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/config/custom_components/apple_airplayer/config_flow.py", line 24, in async_step_user
    if device.identifier not in self.hass.data[DOMAIN][DEVICES]:
  File "/config/custom_components/apple_airplayer/device_manager.py", line 39, in identifier
    return self._atv_conf.identifier.replace(":", "").lower()
AttributeError: 'NoneType' object has no attribute 'replace'
回复

使用道具 举报

1

主题

47

帖子

712

积分

高级会员

Rank: 4

积分
712
金钱
665
HASS币
0
发表于 2021-11-25 17:07:15 | 显示全部楼层
播放没问题,可以更改音量大小吗,我这里怎么调节homepod音量还是没变
回复

使用道具 举报

18

主题

266

帖子

1546

积分

金牌会员

Rank: 6Rank: 6

积分
1546
金钱
1280
HASS币
0
发表于 2021-12-11 01:28:20 | 显示全部楼层
搞定!谢谢!
就是每次重启ha,apple airplay 集成的设备都得重载才能连接
接的3个homepod,每次重启,都要重载三次。。。
不知道有没有解决办法
回复

使用道具 举报

4

主题

98

帖子

641

积分

高级会员

Rank: 4

积分
641
金钱
543
HASS币
0
发表于 2021-12-12 17:46:07 | 显示全部楼层
不知道怎么用啊
回复

使用道具 举报

0

主题

4

帖子

60

积分

注册会员

Rank: 2

积分
60
金钱
56
HASS币
0
发表于 2021-12-13 21:27:52 | 显示全部楼层
谢谢看看
回复

使用道具 举报

15

主题

636

帖子

2201

积分

金牌会员

Rank: 6Rank: 6

积分
2201
金钱
1565
HASS币
0
发表于 2021-12-17 15:59:29 | 显示全部楼层
让我理解一下,homepod其实可以很方便的广播,锁屏也可以。
所以,这个插件能实现的就是自动化,然后把预先设置好的文字,变成语音播放出来,那么使用场景就是比如:
1. 回家的时候之类的。
2. 工作日早上闹钟响后,自动播放天气预报。

我觉得2还是挺不错的需求。。。只不过iphone可以用捷径直接在闹钟结束后自动播放天气。
门口迎宾,我还是准备放个小爱音箱,便宜啊。。。

还有什么更高级的玩法吗?

谢谢各位大神推荐。

感谢楼主写的这么棒的插件。
回复

使用道具 举报

0

主题

83

帖子

1543

积分

论坛积极会员

积分
1543
金钱
1460
HASS币
0
发表于 2021-12-20 06:56:49 | 显示全部楼层
按照楼主提示操作,添加失败。
报错如下:
Logger: aiohttp.server
Source: custom_components/apple_airplayer/device_manager.py:39
Integration: Apple AirPlayer (documentation, issues)
First occurred: 06:25:55 (1 occurrences)
Last logged: 06:25:55

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.9/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 60, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 98, 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 78, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 181, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 137, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 157, in post
    return await super().post(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 62, in wrapper
    result = await method(view, request, *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 252, in async_configure
    result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 325, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/config/custom_components/apple_airplayer/config_flow.py", line 24, in async_step_user
    if device.identifier not in self.hass.data[DOMAIN][DEVICES]:
  File "/config/custom_components/apple_airplayer/device_manager.py", line 39, in identifier
    return self._atv_conf.identifier.replace(":", "").lower()
AttributeError: 'NoneType' object has no attribute 'replace'

homeassistant版本是2021.12.3

辛苦楼主帮看一下哈
回复

使用道具 举报

0

主题

16

帖子

261

积分

中级会员

Rank: 3Rank: 3

积分
261
金钱
245
HASS币
0
发表于 2021-12-21 13:40:18 | 显示全部楼层
kkkkkkkkkkk
回复

使用道具 举报

1

主题

46

帖子

186

积分

注册会员

Rank: 2

积分
186
金钱
139
HASS币
0
发表于 2021-12-21 16:10:05 | 显示全部楼层
学习学习!!!!!!!!!!!!!
回复

使用道具 举报

20

主题

550

帖子

3603

积分

元老级技术达人

积分
3603
金钱
3013
HASS币
210

教程狂人突出贡献

 楼主| 发表于 2021-12-21 21:12:28 | 显示全部楼层
nksphinx 发表于 2021-12-20 06:56
按照楼主提示操作,添加失败。
报错如下:
Logger: aiohttp.server

你AirPlay设备是啥设备?难道是因为没有设备识别码?
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-24 06:38 , Processed in 0.080083 second(s), 31 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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