Solution for smart speaker integration of selfhosted music library - eviltoast

I’ve been using a google home smart speaker to play music from spotify for a while now, and my family really enjoys this (especially the kids who are young enough that they don’t use smartphones or computers like that they can just ask google to play their favorite songs). But I’ve got a lot of music in my own library that isn’t on Spotify or other cloud services, that I want to get the same functionality with. Specifically, I want to be able to give voice commands to have a smart speaker play music from a selfhosted library. At the bare minimum I want to be able to give a specific voice command to start playback on a pre-set speaker of a pre-set album or song. Ideally, I’d like it to be flexible enough to be able to accept voice commands for starting playback on any speaker of any song / album in my library, along with things like pausing and skipping songs via voice command.

I currently have google home smart speakers and a plex server for my music library, and I can manually select music from my plex library on my phone or a computer with a plex client and choose to cast playback to my google speaker, but I want to add voice command functionality. So I started setting up a home assistant server with plex integration using this https://github.com/maykar/plex_assistant. But when I got partway through, I found that google assistant has recently disabled the “text ingredient” commands that made this method possible, and my searching hasn’t found any work around to get that functionality back. It looks like home assistant has a subscription service called Nabu Casa that may add this functionality, but I’m not interested in paying for a subscription. If there is a way to integrate google home with a plex music library that would be great, but I’m open to different solutions as well, I just want to avoid Alexa. I found these instructions to build your own voice remote https://www.home-assistant.io/voice_control/thirteen-usd-voice-remote/ which I will probably try next if I can’t find any way to integrate google assistant on my existing google speakers, but that would be a last resort.

    • root-node@alien.topB
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      The one I currently use, I wrote it myself - took weeks of work. Looking at it now, it also relies on Home Assistant to monitor the speakers.

      I am happy to share it, but there are a lot of moving parts and it’s written specifically for BlueSound speakers.

      • LastTreestar@alien.topB
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        I understand and I appreciate your work, and I’d be happy to sort through it, given your caveat. Please share via DM if you’d like!

        I want a BlueSound system after doing some research on it! I’ve been looking for this solution for a long time… Now on to find high-humidity tolerant speakers for the bathroom…

        Thank you!

        • root-node@alien.topB
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          I have three speakers, two are set up in a group. [Study] and [Lounge|Kitchen]

          You will need:

          • Node-RED setup and running. When you import the below flows into Node-RED you may get a warning about duplicate nodes, it’s just the way it exports sub-flows. You will need the Home Assistant and Node-RED Dashboard nodes added.

          • Home Assistant setup and running. (change “homeassistant.ip.address” in the Node-RED code to its IP or hostname).

          • The bluesound speakers setup in Home Assistant so that it can see them.

          • Edit the JSON before importing, and change 1.1.1.1 to the IP or hostname of your Home Assistant server/device. Change 2.2.2.2 to the IP/hostname of your MQTT server.

          Flows:

          1st: Music configuration (does all the work) https://pastebin.com/ZZ1cLuHz

          2nd: Music UI (allows a wed front end for controlling the players) https://pastebin.com/N2wpQDKY

          3rd: MQTT input from Rhasspy Voice Assistant - You’ll need to change this if you don’t use Rhasspy https://pastebin.com/8z7mxZgV