echo'SUBSYSTEM ==“vchiq”,GROUP =“video”,MODE =“0660”'> /etc/udev/rules.d/10-vchiq-permissions.rules usermod -a -G video [your_username]
或者作为一次性临时解决方案(直到重启):
chmod a + rw / dev / vchiq
只要一开TTS,状态就变成了failed,
root@raspberrypi:/var/log/mopidy# sudo systemctl status mopidy
● mopidy.service - Mopidy music server
Loaded: loaded (/lib/systemd/system/mopidy.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2018-11-18 14:42:49 CST; 4min 1s ago
Process: 18871 ExecStart=/usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf (code=exited, status=255)
Process: 18867 ExecStartPre=/bin/chown mopidy:audio /var/cache/mopidy (code=exited, status=0/SUCCESS)
Process: 18865 ExecStartPre=/bin/mkdir -p /var/cache/mopidy (code=exited, status=0/SUCCESS)
Main PID: 18871 (code=exited, status=255)
CPU: 3.526s
Nov 18 14:42:08 raspberrypi mopidy[18871]: INFO Starting Mopidy core
Nov 18 14:42:08 raspberrypi mopidy[18871]: INFO Starting Mopidy frontends: MpdFrontend, HttpFrontend
Nov 18 14:42:08 raspberrypi mopidy[18871]: INFO MPD server running at [::]:6600
Nov 18 14:42:08 raspberrypi mopidy[18871]: INFO HTTP server running at [::]:6680
Nov 18 14:42:08 raspberrypi mopidy[18871]: INFO Starting GLib mainloop
Nov 18 14:42:19 raspberrypi mopidy[18871]: INFO New MPD connection from [::ffff:127.0.0.1]:6600
Nov 18 14:42:49 raspberrypi mopidy[18871]: * failed to open vchiq instance
Nov 18 14:42:49 raspberrypi systemd[1]: mopidy.service: Main process exited, code=exited, status=255/n/a
Nov 18 14:42:49 raspberrypi systemd[1]: mopidy.service: Unit entered failed state.
Nov 18 14:42:49 raspberrypi systemd[1]: mopidy.service: Failed with result 'exit-code'.
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 226, 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 317, in play_media
self._client.play()
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 311, in _parse_nothing
for line in lines:
File "/usr/local/lib/python3.6/site-packages/mpd/base.py", line 538, in _read_lines
line = self._read_line()
File "/usr/local/lib/python3.6/site-packages/mpd/base.py", line 523, in _read_line
raise ConnectionError("Connection lost while reading line")
mpd.base.ConnectionError: Connection lost while reading line