Alexa and Max2Play on one RPI3

Max2Play Home Forums Max2Play on Raspberry PI Alexa and Max2Play on one RPI3

Viewing 7 posts - 1 through 7 (of 7 total)
  • 27. Mai 2017 at 14:16 #29083

    I managed to get Alex working simultaneously with Max2Play on one RPI3 with no soundcard through the headphone jack. I did this by installing Max2Play as a player on my existing multiroom set up and then following a number of instructions on adding Alexa to a standard Jessie install. It seemed to work ok – I could play via multiroom system and also ask Alexa. Due to limitations of Alexa on RPI3 that Amazon set/available skills, it does not interact with Squeeze and cannot play music so was limited to only questions but made my RPI3 a dual use device through one speaker. The key thing to make it work was using Pulseaudio system wide.

    I thought I would try to get it working with a Hifiberry DAC+ card so I could get better sound, but this does not give any sound. I went through the same process, but selecting card in Max2Play which gave sound output ok when just Max2Play in place. As soon as I had been through the Alexa install process, I had no sound. I tried the Pulseaudio solution again but still no sound and tried a few other changes but no success.

    Has anyone any ideas on what might cause this or if it can be made to work or is it asking for the impossible? I’m not sure what info to post – I added Audioplayer debug info at the bottom and the websites that show the process I followed – worked without card, but not with card.

    I aslo ran a debugging script: cd ~ && wget https://raw.githubusercontent.com/alexa-pi/AlexaPi-misc/master/alsa-info.sh && bash alsa-info.sh
    which gave the following output: –
    cat: /sys/module/snd_soc_hifiberry_dacplus/parameters/*: No such file or directory

    http://lifehacker.com/the-simplest-way-to-build-a-raspberry-pi-powered-amazon-1794218212
    https://github.com/alexa-pi/AlexaPi/wiki/Audio-setup-&-debugging#pulseaudio

    #### SQUEEZELITE VERSION ####
    Squeezelite Max2Play v1.0.1 based on v1.8.4-726, Copyright 2012-2015 Adrian Smith, 2015-2016 Ralph Irving.
     
    
    #### SQUEEZELITE BUILDOPTIONS ####
    Build options: LINUX ALSA EVENTFD RESAMPLE FFMPEG VISEXPORT IR GPIO DSD CONTROLSBS ALSASYNC BLUETOOTHSYNC
     
    
    #### AUDIOPLAYER CONFIG ####
    ### Configuration of Audioplayers
    SQUEEZELITE_PARAMETER=-o sysdefault:CARD=sndrpihifiberry -a 80:4::
    SQUEEZESLAVE_PARAMETER=-n plugequal
    SHAIRPORT_PARAMETER=-d plug:default
    USE_USB_DAC=0
    USE_EQUALIZER=0
    SYSTEM_USER=pi
    YMPD_PARAMETER=--webport 8081
     
    
    #### SQUEEZELITE -l ####
    Output devices:
      default                        - Playback/recording through the PulseAudio sound server
      null                           - Discard all samples (playback) or generate zero samples (capture)
      pulse                          - PulseAudio Sound Server
      equal                         
      plugequal                      - Equalizer for plughw:0,0
      sysdefault:CARD=sndrpihifiberry - snd_rpi_hifiberry_dacplus,  - Default Audio Device
      dmix:CARD=sndrpihifiberry,DEV=0 - snd_rpi_hifiberry_dacplus,  - Direct sample mixing device
      dsnoop:CARD=sndrpihifiberry,DEV=0 - snd_rpi_hifiberry_dacplus,  - Direct sample snooping device
      hw:CARD=sndrpihifiberry,DEV=0  - snd_rpi_hifiberry_dacplus,  - Direct hardware device without any conversions
      plughw:CARD=sndrpihifiberry,DEV=0 - snd_rpi_hifiberry_dacplus,  - Hardware device with all software conversions
      sysdefault:CARD=Device         - USB PnP Sound Device, USB Audio - Default Audio Device
      front:CARD=Device,DEV=0        - USB PnP Sound Device, USB Audio - Front speakers
      surround21:CARD=Device,DEV=0   - USB PnP Sound Device, USB Audio - 2.1 Surround output to Front and Subwoofer speakers
      surround40:CARD=Device,DEV=0   - USB PnP Sound Device, USB Audio - 4.0 Surround output to Front and Rear speakers
      surround41:CARD=Device,DEV=0   - USB PnP Sound Device, USB Audio - 4.1 Surround output to Front, Rear and Subwoofer speakers
      surround50:CARD=Device,DEV=0   - USB PnP Sound Device, USB Audio - 5.0 Surround output to Front, Center and Rear speakers
      surround51:CARD=Device,DEV=0   - USB PnP Sound Device, USB Audio - 5.1 Surround output to Front, Center, Rear and Subwoofer speakers
      surround71:CARD=Device,DEV=0   - USB PnP Sound Device, USB Audio - 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
      iec958:CARD=Device,DEV=0       - USB PnP Sound Device, USB Audio - IEC958 (S/PDIF) Digital Audio Output
      dmix:CARD=Device,DEV=0         - USB PnP Sound Device, USB Audio - Direct sample mixing device
      dsnoop:CARD=Device,DEV=0       - USB PnP Sound Device, USB Audio - Direct sample snooping device
      hw:CARD=Device,DEV=0           - USB PnP Sound Device, USB Audio - Direct hardware device without any conversions
      plughw:CARD=Device,DEV=0       - USB PnP Sound Device, USB Audio - Hardware device with all software conversions
    
     
    
    #### SHAIRPORT VERSION ####
    2.8.0-openssl-Avahi-ALSA-soxr
     
    
    #### OUTPUT SOUND DETAILS CARD 0 ####
    access: RW_INTERLEAVED
    format: S32_LE
    subformat: STD
    channels: 2
    rate: 44100 (44100/1)
    period_size: 882
    buffer_size: 3528
     
    
    #### OUTPUT SOUND DETAILS CARD 1 ####
    9. Juni 2017 at 14:23 #29461

    Hi Tony,

    Firstly, please deactivate the built-in audio in the Raspberry Settings.

    Also, check out the documentation on github for utilizing ALSA as should be more conveniently set up.

    Please add a little delay to Squeezelite to make sure it does not hog the ALSA: -C 10 should do it

    We will look into this ourselves and give you a more detailed response soon.

    • This reply was modified 6 years, 10 months ago by Heiner.
    9. Juni 2017 at 15:28 #29478

    Hi Tony,

    I just setup AlexaPi for testing with an IQAudio-Digiamp and here is what you might try:
    – use Alsa instead Pulseaudio
    – try to deactivate all other audioplayers while testing (you might try to use the DMIX audiointerface later to let multiple players connect to the soundcard)
    – edit the file „nano /etc/opt/AlexaPi/config.yaml“ and use

    output_device: "sysdefault:CARD=sndrpihifiberry"
    output: "alsa"
    

    – start in Debug mode with „/opt/AlexaPi/src/main.py -d“ to see errors on startup

    If you want to use Squeezelite parallel afterwards, you need to setup both Squeezelite and AlexaPi to use the soundcard with DMIX (not tested yet).

    Hope this helps.

    Stefan

    23. Dezember 2018 at 15:29 #42934

    HI, i’m trying to do excatly like you and put alexa simultaneously to max2play and squeezebox (which is great by the way)
    I have installed successfully alexa on a standard version of stretch but i encounter a problem installing on max2play.
    TonyW how did you mange to succeed. While installing I have this error : (see the script below)

    Setting up libgstreamer1.0-dev (1.10.4-1) …
    Setting up gir1.2-gtksource-3.0:armhf (3.22.2-1) …
    Setting up libcurl4-openssl-dev:armhf (7.52.1-5+deb9u8) …
    Setting up libsoup2.4-dev:armhf (2.56.0-2+deb9u2) …
    Setting up zenity (3.28.1-1.1~bpo9+rpt1) …
    Setting up python3-keyring (10.1-1) …
    Setting up curl (7.52.1-5+deb9u8) …
    Setting up gir1.2-peas-1.0:armhf (1.20.0-1) …
    Setting up gnome-user-guide (3.22.0-1) …
    Setting up gir1.2-gst-plugins-bad-1.0 (1.10.4-1) …
    Setting up libgstreamer-plugins-base1.0-dev (1.10.4-1) …
    Setting up gedit (3.22.0-2) …
    update-alternatives: using /usr/bin/gedit to provide /usr/bin/gnome-text-editor (gnome-text-editor) in auto mode
    Setting up libgstreamer-plugins-bad1.0-dev (1.10.4-1) …
    Setting up dh-autoreconf (14) …
    Setting up debhelper (10.2.5) …
    Setting up dh-strip-nondeterminism (0.034-1) …
    Processing triggers for libc-bin (2.24-11+deb9u3) …
    Processing triggers for dictionaries-common (1.27.2) …
    aspell-autobuildhash: processing: en [en-common].
    aspell-autobuildhash: processing: en [en-variant_0].
    aspell-autobuildhash: processing: en [en-variant_1].
    aspell-autobuildhash: processing: en [en-variant_2].
    aspell-autobuildhash: processing: en [en-w_accents-only].
    aspell-autobuildhash: processing: en [en-wo_accents-only].
    aspell-autobuildhash: processing: en [en_AU-variant_0].
    aspell-autobuildhash: processing: en [en_AU-variant_1].
    aspell-autobuildhash: processing: en [en_AU-w_accents-only].
    aspell-autobuildhash: processing: en [en_AU-wo_accents-only].
    aspell-autobuildhash: processing: en [en_CA-variant_0].
    aspell-autobuildhash: processing: en [en_CA-variant_1].
    aspell-autobuildhash: processing: en [en_CA-w_accents-only].
    aspell-autobuildhash: processing: en [en_CA-wo_accents-only].
    aspell-autobuildhash: processing: en [en_GB-ise-w_accents-only].
    aspell-autobuildhash: processing: en [en_GB-ise-wo_accents-only].
    aspell-autobuildhash: processing: en [en_GB-ize-w_accents-only].
    aspell-autobuildhash: processing: en [en_GB-ize-wo_accents-only].
    aspell-autobuildhash: processing: en [en_GB-variant_0].
    aspell-autobuildhash: processing: en [en_GB-variant_1].
    aspell-autobuildhash: processing: en [en_US-w_accents-only].
    aspell-autobuildhash: processing: en [en_US-wo_accents-only].
    pi.sh: line 35: pip: command not found

    thanks by adavance for your help.

    25. Dezember 2018 at 21:18 #42943

    Hi remy33,

    the error says the installer does not find the „pip“ command line tool. This should automatically be installed by the installer itself, but sometimes fails due to problems with official Raspbian download servers.

    What you may try:
    – install again and see if the error occurs again
    – still showing the error? Then install pip via command line (use SSH to connect to your Pi) and install with „apt-get update && apt-get install python-pip“
    – this time the installer should succeed

    Happy Christmas,
    Stefan

    31. Dezember 2018 at 17:17 #42986

    Thanks for your answer.
    Finally I installed very easily Google assistant on the max2play sd.Google assist was working great since I put the OUTPUT sound for squeezebox on my usb sound card. (the same I putted for google assistant). Since i did that i can’t here the google assistant. I read what you writed above but i’m new to all this. Is there a place where I could find a step to step tutorial to manage to have both my squeezebox and google assistant coming out from my usb sound card…
    thanks by advance

    2. Januar 2019 at 14:46 #42996

    This is neat so then what can you say like for amazon Alexa to play a song and it will do it?

    I put a power switch on my Max2play to just reset it easy when it don’t work. I named it max2play but Alexa don’t under stand that good you have to pick some other name besides max2play.

    This would be neat if you could just say Alexa playmax song. So the key would be something like playmax to play a song from your songs on max2play.

    -Raymond Day

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Register here