alexa-pi / AlexaPi

Alexa client for all your devices! # No active development. PRs welcome # consider https://github.com/respeaker/avs instead
MIT License
1.33k stars 396 forks source link

Success Install but errors? #49

Closed fboulegue closed 8 years ago

fboulegue commented 8 years ago

Hi i could install all the stuff via SSH, then it did ask me to authorize, that's what i did. So i did close the script after with "ctrl + c" script ended but nothing happened. So i did try to run the

python main.py

Traceback (most recent call last):
  File "main.py", line 84, in <module>
    decoder = Decoder(config)
  File "/usr/local/lib/python2.7/dist-packages/pocketsphinx/pocketsphinx.py", line 228, in __init__
    this = _pocketsphinx.new_Decoder(*args)
RuntimeError: new_Decoder returned -1

So i also did try to run

\ sudo ./monitorAlexa.sh** but the log show

Starting Alexa in silent mode...
python: can't open file '/root/AlexaPi/main.py': [Errno 2] No such file or directory

let me add i use @maso27 fork

renekliment commented 8 years ago

Are you actually using the code from this repo or are you just reposting your issue here?

fboulegue commented 8 years ago

i just did a fresh install from that repo :)

renekliment commented 8 years ago

And?

fboulegue commented 8 years ago

after reinstall again...

-- Logs begin at Do 2016-10-20 17:12:15 UTC, end at Do 2016-10-20 17:15:28 UTC. --
Okt 20 17:12:20 AmayonEchoPI systemd[1]: Starting Alexa client for all your devices...
Okt 20 17:12:20 AmayonEchoPI systemd[1]: Started Alexa client for all your devices.
Okt 20 17:12:36 AmayonEchoPI python[534]: Home directory not accessible: Permission denied
Okt 20 17:12:36 AmayonEchoPI python[534]: W: [pulseaudio] core-util.c: Failed to open configuration file '/home/alexapi/.config/pulse//daemon.conf': Keine Berechti
Okt 20 17:12:36 AmayonEchoPI python[534]: [97B blob data]
Okt 20 17:12:36 AmayonEchoPI python[534]: Home directory not accessible: Permission denied
Okt 20 17:12:36 AmayonEchoPI python[534]: W: [pulseaudio] core-util.c: Failed to open configuration file '/home/alexapi/.config/pulse//daemon.conf': Keine Berechti
Okt 20 17:12:36 AmayonEchoPI python[534]: [97B blob data]
Okt 20 17:12:36 AmayonEchoPI python[534]: Home directory not accessible: Permission denied
Okt 20 17:12:36 AmayonEchoPI python[534]: W: [pulseaudio] core-util.c: Failed to open configuration file '/home/alexapi/.config/pulse//daemon.conf': Keine Berechti
Okt 20 17:12:36 AmayonEchoPI python[534]: [97B blob data]```

systemctl stop AlexaPi.service /opt/AlexaPi/src/main.py -d

Checking Internet Connection...
Connection OK
Play_Audio Request for: /opt/AlexaPi/src/resources/hello.mp3
Player State: State.Opening
Player State: State.Playing
Player State: State.Ended
Traceback (most recent call last):
  File "/opt/AlexaPi/src/main.py", line 603, in <module>
    loop()
  File "/opt/AlexaPi/src/main.py", line 512, in loop
    inp = alsaaudio.PCM(alsaaudio.PCM_CAPTURE, alsaaudio.PCM_NORMAL, config['sound']['device'])
alsaaudio.ALSAAudioError: Device or resource busy [plughw:1]

btw thanks @renekliment

renekliment commented 8 years ago

Damn you PulseAudio guys :smiley: I have to fix that - a lot of people want to use PA. It's a known bug #38. Can you try the suggested fix? sudo usermod --home-dir /run/AlexaPi alexapi and restart ... provide the logs then please.

fboulegue commented 8 years ago

mmh sudo usermod --home-dir /run/AlexaPi alexapi give me no output let me see ...

renekliment commented 8 years ago

That's okay. Standard programs don't output anything if everything went fine. Just restart and see if AlexaPi works.

fboulegue commented 8 years ago

still stuck on same messages as before :/ btw at boot it say hello

renekliment commented 8 years ago

Alright, I'll find some time to fix it.

fboulegue commented 8 years ago

but if i see right sudo usermod --home-dir /run/AlexaPi alexapi did not have any effect, it not changed the home dir

renekliment commented 8 years ago

Just to know your environment:

Send the output of sudo grep alexapi /etc/passwd.

fboulegue commented 8 years ago

GUI is up via VNC but all commands been sended via SSH from other device ... alexapi:x:998:995::/home/alexapi:/bin/bash

renekliment commented 8 years ago

Alright,

systemctl stop AlexaPi.service
usermod --home /run/AlexaPi alexapi
systemctl stop AlexaPi.service

How about this?

fboulegue commented 8 years ago

After reboot

Okt 20 17:43:04 AmayonEchoPI systemd[1]: Starting Alexa client for all your devices...
Okt 20 17:43:04 AmayonEchoPI systemd[1]: Started Alexa client for all your devices.
Okt 20 17:43:32 AmayonEchoPI pulseaudio[1372]: [pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch
Okt 20 17:43:32 AmayonEchoPI pulseaudio[1372]: [pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-d
Okt 20 17:43:32 AmayonEchoPI pulseaudio[1372]: [pulseaudio] bluez4-util.c: org.bluez.Manager.GetProperties() failed: org.freedesktop.DBus.Error.UnknownMethod: Meth
Okt 20 17:43:34 AmayonEchoPI python[547]: [0295ac48] alsa audio output error: cannot estimate delay: Input/output error

BTW @renekliment anyway to donte :)?

renekliment commented 8 years ago

Let's mark this as a duplicate of #38 so we can better track it.

If you don't use other sound applications on the pi I suggest you remove PulseAudio until it's fixed. There is no easy & ideal solution right now. Thanks for understanding.