MycroftAI / enclosure-picroft

Mycroft interface for Raspberry Pi environment
https://mycroft.ai/documentation/picroft
GNU Lesser General Public License v3.0
803 stars 191 forks source link

Fix #132 - remove hardcoded play commands #148

Closed krisgesling closed 3 years ago

krisgesling commented 3 years ago

Removes hardcoded play commands from Picroft. These were added as a work around for issues many moons ago. It is believed that these no longer exist in Debian Buster.

Fixes #132

How to test this PR

fermulator commented 3 years ago

Results:

fermulator commented 3 years ago

As per noted from sgee https://chat.mycroft.ai/community/pl/wrk6x1som3bu8kebcn9rphzx6r, there are a lot of further complexities here I don't know how to handle

Namely: https://github.com/MycroftAI/enclosure-picroft/blob/afd739ebbaa7ee13204b2bfcf2103c1e5e8aa984/home/pi/auto_run.sh#L291

Perhaps it is fine to remove from this file (hard coded crap), and let the auto_run.sh continue to do what it does? (but then the sed commands wouldn't work :( )

krisgesling commented 3 years ago

Maybe we wait and review sgee's large refactor of these scripts first. I think there's a lot of improvement possible here including moving away from sed to a more purposeful tool like jq.

SilvanCodes commented 2 years ago

It would be really super duper cool for this fix to land, I fell on my face twice setting up two Picrofts as the "bug" shows itself possibly very differently.

The first time I almost lost my sanity because Mycroft just wouldn't say anything as the hardcoded device did not match mine. I messed with way to many config files in the entire linux audio stack until figuring that out.

The second time around it seemed like Mycroft could not adjust it's volume. I saw it moving the pluseaudio master volume up and down, it just had no effect. In the end it turned out that Mycroft was bypassing pulseaudio by having the device hardcoded in that system config file.