Bluesound integration

I have a multiroom Bluesound system and I’d love to see support for it on HASS. It’s pretty easy to control over the network and I’ve even found a list of commands that you can use in a web browser to control it.

Example:
Simple commands:
http://192.168.1.38:11000/Pause
http://192.168.1.38:11000/Play

My PR of this component has just been approved and it will be included in the next version of HA :slight_smile:

1 Like

Super! I can’t wait to try it!

I have a multi audio system with NAD multi room players and amplifiers using Bluesound. I used the bluesound integration but HAAS sees the multiroom player as only 1 player (NAD CI 580) I guess since it has only 1 IP address. Bluesound and NAD has drivers for commercial controls systems (Creston, Control4, Elan, etc.) and Roon has found a solution but I couldn’t find any info on it on Haas. Did anybody experience this issue, are there any suggesstins to make it work?

Do you plan to support also the Bluesound players ? it would be fantastic with ability to browse through radios of Bluesound from ha :slight_smile:

If you set presets in the Bluesound app for your radio stations, they appear as sources in the HA media player.

Yep but unhappy it’s not way I’d like to use it ! I’d like to be able in HA to browse radio stations offered by the Bluesound :wink: (list of radios in HA is sorry to say unusable in its current state !)

I’m not sure if this is the right place to ask. Would it be possible to have a mps playing or any other file when an trigger is activated? So stop playing and play the message and resume where stopped. I see that others have created something with their smart speakers. Would be nice to find out what other have working withe their Bluesound speakers.

Hi Willem @mr_home-assitant,

mps typo for mp3?

For one sound only you might want to explore The Option of chime (but not all BluOS will have this option and the sound can likely not be changed):

rest_command:
  bluos_play_chime:
    url: "http://192.168.1.100:11000/Doorbell?play=1"

It look like you can also play e.g. a mp3 file

rest_command:
  bluos_play_url: 
    url="http://192.168.1.100:11000/Play?url=https%3A%2F%2Fwww%2Esoundhelix%2Ecom%2Fexamples%2Fmp3%2FSoundHelix-Song-1%2Emp3"

You need to explore yourself how to run a shorter file from local and afterwards return and continue.

Hope this is helpful.

I have wrote some code (using the custom pyscript) to control the volume of my BlueSound streaming amplifier (NAD C700 v2) using decibels (dB) and a Mute function.

  • get_volume returns the current volume in dB
  • change_volume_delta_db adds the decibels to the current volume. For example -3 will reduce the volume by 3dB
  • set_volume_db sets the absolute new volume, for example -60 will set the volume to -60dB
  • mute will toggle the mute on and off

Maybe someone with better HA integration skills can add this to the BlueSound integration?

import aiohttp
import asyncio
import xmltodict


HOST = "192.168.xxx.xxx".  # your ip address
PORT = "11000"

def fetch_data(param=None):
    if param:
        url = f'http://{HOST}:{PORT}/Volume?{param}'
    else:
        url = f'http://{HOST}:{PORT}/Volume'

    async with aiohttp.ClientSession() as session:
        async with session.get(url=url) as response:
            if 200 == response.status: 
                return xmltodict.parse(response.text())
            else:
                log.warning(f"Error:{response.status}")

@service
def get_volume():
    resp = fetch_data()
    volume = resp['volume']['@db']
    log.warning(f"Current {volume=}")
    return volume

@service
def change_volume_delta_db(decibels):
    resp = fetch_data(f"db={decibels}")
    volume = resp['volume']['@db']
    log.warning(f"New {volume=}")
    return volume

@service
def set_volume_db(decibels):
    resp = fetch_data(f"abs_db={decibels}")
    volume = resp['volume']['@db']
    log.warning(f"New {volume=}")
    return volume

@service
def mute():
    volume = get_volume()
    if "-127" == volume:
        resp = fetch_data(f"mute=0")
    else:
        resp = fetch_data(f"mute=1")

Apparently in the latest FW update (Jan 2025) when muted the volume now responds with -125 instead of -127 hence I changed the mute function:

@service
def mute():
    volume = get_volume()
    if int(volume) < -80:             # -80db is lowest possible volume on my amp. YMMV
        resp = fetch_data(f"mute=0")
    else:
        resp = fetch_data(f"mute=1")