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

 找回密码
 立即注册
查看: 3687|回复: 2

[求助] ha在调用mdp.py时报错,求解决

[复制链接]

5

主题

93

帖子

535

积分

高级会员

Rank: 4

积分
535
金钱
442
HASS币
0
发表于 2019-5-13 01:45:50 | 显示全部楼层 |阅读模式
ha在调用mdp.py时报错,tts发声要触发好几次才能成功。
这个问题困扰我好多天了,一直解决不了。下面是报错日志


第一条
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 232, in async_update_ha_state
    state = self.state
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/media_player/mpd.py", line 143, in state
    if self._status['state'] == 'play':
KeyError: 'state'


第二条
Error doing job: Task exception was never retrieved

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/service.py", line 279, in _handle_service_platform_call
    await func(entity, data)
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/media_player/mpd.py", line 315, in play_media
    self._client.clear()
  File "/usr/local/lib/python3.6/site-packages/mpd/base.py", line 381, in mpd_command
    return wrapper(self, name, args, callback)
  File "/usr/local/lib/python3.6/site-packages/mpd/base.py", line 473, in _execute
    return retval()
  File "/usr/local/lib/python3.6/site-packages/mpd/base.py", line 368, in command_callback
    res = function(self, self._read_lines())
  File "/usr/local/lib/python3.6/site-packages/mpd/base.py", line 313, in _parse_nothing
    "Got unexpected return value: '{}'".format(', '.join(lines)))
mpd.base.ProtocolError: Got unexpected return value: 'repeat: 0, random: 0, single: 0, consume: 0, playlist: 9, playlistlength: 1, xfade: 0, state: stop, nextsong: 0, nextsongid: 4'

回复

使用道具 举报

4

主题

67

帖子

515

积分

高级会员

Rank: 4

积分
515
金钱
448
HASS币
0
发表于 2019-11-2 18:26:17 | 显示全部楼层
同样的问题,楼主解决了吗
回复

使用道具 举报

5

主题

93

帖子

535

积分

高级会员

Rank: 4

积分
535
金钱
442
HASS币
0
 楼主| 发表于 2020-1-13 10:21:58 | 显示全部楼层
AlanGreen 发表于 2019-11-2 18:26
同样的问题,楼主解决了吗

tts语句里不能有空格和回车换回,不过我也放弃了蓝牙tts了,树莓派搞这个太不稳定
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-12-31 04:37 , Processed in 0.083002 second(s), 24 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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