AutoVoice Controling Music Player Daemon (MPD) with Alexa routines

Discussion in 'AutoApps' started by z0ne, Feb 1, 2019.

  1. z0ne

    z0ne New Member

    Joined:
    Feb 1, 2019
    Messages:
    2
    Likes Received:
    0
    Hi,

    I'm trying to create Alexa routine to control MPD (Music Player Daemon) which is located on Raspberry Pi. I've created a virtual device inside AutoVoice app for MPD, Alexa discovers it, but when trying to setup create command, options inside Alexa app doesn't contain playback options (start, pause, play, etc.) for MPD.

    If the virtual device has enabled only "Control Playback" option from device creation dialog, Alexa will discover a new device, but device will be hidden when creating routines. If the virtual device has "Control Playback" and for example "Turn on/off", only option to turn on and off your device will be presented when creating routine for that device.

    Usual playback control with "Alexa, ask autovoice to play music" which is mapped to MPDroid command "play" works, but I would like to map my custom commands for Alexa.

    Any help?
    Thanks!
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Hmm, maybe you should try using normal AutoVoice commands by saying "ask autovoice to..."? Would that work for you?
     
  3. z0ne

    z0ne New Member

    Joined:
    Feb 1, 2019
    Messages:
    2
    Likes Received:
    0
    Well, I really wanted to use routines like "Alexa, music play" instead "Alexa, ask AutoVoice to play" on MPD, so I've managed to create a little "hack". I needed 4 custom routines (play/stop/pause/next), so I've created two virtual devices with "turn on/off" options (since playback option doesn't work), created a profile which will be triggered when device A is turned on, and linked that to task with MPDroid command to play, and turning off the same device will trigger stop command.

    So, for example "Alexa, pause music" will trigger on device A and pause music through MPDroid plugin, but sometimes after an hour or two, the same command doesn't work if Android device is unused/locked for some time. After unlocking the device, the same command is working.

    Any thoughts on problem with "works after unlock"?
     
: mpd, alexa

Share This Page