• 0 Posts
  • 7 Comments
Joined 1 year ago
cake
Cake day: October 19th, 2023

help-circle

  • 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



  • I do something like this, but it’s not easy.

    I have all my music on a NAS and two BlueSound speakers that are indexing the NAS.

    For the voice command part I have a raspberry Pi with a microphone hat and running Rhasspy Voice Assistant (bonus: it’s purely offline).

    That interacts over MQTT and is processed by a rather complicated Node-RED flow that handles all the play/pause actions. Voice commands include “Volume Up|Down, Play next track, Skip Album, Skip Artist.”

    All this assumes that you have a playlist loaded and ready to go. It doesn’t look up a track and play it. You can’t say “Play Never Gonna Give You Up By Rick Ashley”, it will just ignore you.

    You could do it with a massive amount of work. You would need to index your music library (track names, artists, albums) and import it into Rhasspy as data for it to learn. It would take a huge amount of processing for that, and it would need to be done every time new tracks are added or removed - which is why I never bothered.

    If there is a way to replicate the google/alexa experience by using locally stored music, I would love to know.