Bose soundtouch create_zone

You can resolve the dropping issue by assigning static IPs. I experienced the same problem initially and static IPs fixed it.

Regrettably that’s the only good news. The bose app/system is extremely poor. I regret having bought into the system; the sound quality is what you’ve come to expect from Bose, but the “smartness” is just not there.

The system is years behind Sonos and unfortunately I only learned that after I’d bought them.

Any smart integration into HA requires lots of tinkering and they (bose) just don’t talk to anything else. Plex, etc

Even the amazon Alexa skills are substandard.

1 Like

Yeah, I assigned IPs and set up the media_player statically (as opposed to auto discovery); I still experience the occasional unavailability issue. My network in general is very stable. I’ve soured on Bose at this point, their software support has been pretty lackluster.

I’m in the same boat as you though; had I known Bose wouldn’t invest as much into a solid solution as SONOS did, I would have gone the SONOS route. How unfortunate… but, first world problems, they work, just not how I want them to with HA.

I’ve followed several of your (@juan11perez) Bose posts, guides and examples and such; thanks for that by the way.

Ok, I see you also use ubiquity so I think not much to improve there. I use AC PRO access points and I don’t have the dropping issue.

I guess I should qualify; the disconnect issue definitely improved and stabilized in HA after I assigned IPs and such. The speakers themselves though still experience disconnects, which leads me to believe the problem is more on Bose than HA.

I’ve got a USG-3, SW-150 and two UAP-AC-PROs with the Unifi controller running on my Intel NUC. Solid as a rock.

General agreement on the network reliability of the Bose SoundTouch.
But (IMO) the sound is better. I have 6 systems (went all in before realizing the SW issues) and they fill the house beautifully with sound when they work.

To that end, I have found that the (poorly written) phone apps and the (out of date) HA component are partly to blame for the problems. The speakers themselves contribute but are not 100% responsible.

I have been experimenting with the raw BOSE API, sending it rest commands.
I am having very good success with these little automations

- id: GroupAfterKitchen
  alias: Group after Kitchen
  initial_state: true
  trigger:
  - platform: state
    entity_id: media_player.bose_kitchen
    from: 'off'
    to: 'playing'
  action:
  - service: rest_command.bose_add_stairs
  - service: rest_command.bose_add_lounge
  - service: rest_command.bose_add_family_room

So I use the HA Component here to detect when the speaker starts playing. This seems to be reliable for me.

and then I use these rest commands as the actions.

rest_command:
  bose_add_stairs:
    method: POST
    url:  http://192.168.2.180:8090/setZone
    payload: '<?xml version="1.0" encoding="UTF-8" ?><zone master="000C8AC06D11"><member ipaddress="192.168.2.182">A81B6A53F41B</member></zone>'
  bose_add_lounge:
    method: POST
    url:  http://192.168.2.180:8090/setZone
    payload: '<?xml version="1.0" encoding="UTF-8" ?><zone master="000C8AC06D11"><member ipaddress="192.168.2.181">08DF1F0DC6E0</member></zone>'
  bose_add_family_room:
    method: POST
    url:  http://192.168.2.180:8090/setZone
    payload: '<?xml version="1.0" encoding="UTF-8" ?><zone master="000C8AC06D11"><member ipaddress="192.168.2.183">B0D5CCD8F1C5</member></zone>'
  bose_add_back_deck:
    method: POST
    url:  http://192.168.2.180:8090/setZone
    payload: '<?xml version="1.0" encoding="UTF-8" ?><zone master="000C8AC06D11"><member ipaddress="192.168.2.186">EC24B8E5CF0E</member></zone>'
  bose_add_master_bedroom:
    method: POST
    url:  http://192.168.2.180:8090/setZone
    payload: '<?xml version="1.0" encoding="UTF-8" ?><zone master="000C8AC06D11"><member ipaddress="192.168.2.185">F45EAB5367D7</member></zone>'

I created the payload by using Postman and playing with the API reference
https://developer.bose.com/guides/bose-soundtouch-api/bose-soundtouch-api-reference

Basically, make a zone with the phone app, then call getZone with Postman to get the strings you need for the rest_command payloads.

So now all I need to do is turn on the Kitchen Bose, best done with the remote / push buttons on the unit and then a few seconds latter the other speakers join the zone. And its reliable! The only unreliability is when HA does not see the state change of the speaker. This has only happened once over the past month for me (I use it every day) and rebooting the speaker fixed this.
(I plan to look into using rest_commands to reboot the speakers every night)

I have a similar automation on the Lounge Bose, but it creates a slightly different speaker grouping. And I exposed the “add_back_deck” rest_command to an Alexa routine so I can say “Alexa, add back deck”.

At the moment this is a messy cut and paste implementation because “zone_master” is hard coded into the rest commands. I need to template that so its more elegant. I’ll post it back here when I get around to it.

1 Like

Nice work! I’m not using zones yet. For now I would be happy if I could select a preset in a decent way in lovelace. I used the code of Juan perrez but it stopped working :thinking: so I gave up for a while. But the sound is great.

Hmm, I am not doing anything special to get the presets to work.

input_select:
  bose_preset:
    name: Bose Preset
    options:
      - None
      - Preset 1
      - Preset 2
      - Preset 3
      - Preset 4
      - Preset 5
      - Preset 6
      
  bose_master:
    name: Bose Group Master
    options:
      - None
      - Kitchen
      - Lounge

Then these automations

- id: BoseStart
  alias: Start Bose
  initial_state: true
  trigger:
    platform: state
    entity_id: input_select.bose_preset
  condition:
    condition: template
    value_template: '{{ states.input_select.bose_preset.state != ''None'' }}'
  action:
    service: script.play_bose
- id: BoseStop
  alias: Stop Bose
  initial_state: true
  trigger:
    platform: state
    entity_id: input_select.bose_preset
    to: None
  action:
    service: script.stop_bose

and these scripts which just use the soundtouch component.
If you only have one master you could hard code the play_bose script and it would simplify to the point where you could just do it directly in the automation

play_bose:
  sequence:
  - service: media_player.play_media
    data_template: 
      entity_id: >
        {% if is_state('input_select.bose_master','Kitchen') %}
           media_player.bose_kitchen
        {% elif is_state('input_select.bose_master','Lounge') %}
           media_player.bose_lounge
        {% else %}
           media_player.bose_kitchen
        {% endif %}
      media_content_id: >
        {% if is_state("input_select.bose_preset", "Preset 1") %} 1
        {% elif is_state("input_select.bose_preset", "Preset 2") %} 2
        {% elif is_state("input_select.bose_preset", "Preset 3") %} 3
        {% elif is_state("input_select.bose_preset", "Preset 4") %} 4
        {% elif is_state("input_select.bose_preset", "Preset 5") %} 5
        {% elif is_state("input_select.bose_preset", "Preset 6") %} 6
        {% endif %}
      media_content_type: >
        PLAYLIST       

stop_bose:
  sequence:
  - service: media_player.turn_off
    data:
      entity_id: media_player.bose_kitchen
  - service: media_player.turn_off
    data:
      entity_id: media_player.bose_stairs
  - service: media_player.turn_off
    data:
      entity_id: media_player.bose_lounge
  - service: media_player.turn_off
    data:
      entity_id: media_player.bose_family_room
  - service: media_player.turn_off
    data:
      entity_id: media_player.bose_master_bedroom
  - service: media_player.turn_off
    data:
      entity_id: media_player.bose_back_deck

Thx for sharing your configuration, I will test it out as soon as I can.

This is brilliant! Thanks for the tip. Works like a charm!

Dear Salzmret,

more than a year later there is still no answer for this issue.
did you perhaps find a solution?

I have a working setup, my system is SoundTouch compatible
I’m using the Mini media player
zones, presets all working now.

Hi guys, cheers for your great job done!

I do try to create zones with my Bose soundtouch speakers:

  • 1x SoundTouch 20
  • 2x SoundTouch 10
  • 1x Soundtouch WiFi adapter

I struggle to get any zones / master / slaves setup.

Can anyone share your working configuration, so I can use that to work with mine?
@jasebob do you still use soundtouch system?

THanks

Hello

Yes I still use but they are frustrating.:slight_smile:

Here are some automation and scripts, they go with a input number helper. I try an mostly make this automatic, so when I hit the preset button in the kitchen it groups up automatically and sets the volume based on the time of day. I also use mini media player card which also works.

hope this helps

- id: '1613851664071'
  alias: Bose Create Kitchen Zone
  description: When kitchen starts playing, create a zone and start kitchen bar
  trigger:
  - platform: state
    entity_id: media_player.soundtouch_kitchen
    to: playing
  condition: []
  action:
  - service: soundtouch.create_zone
    data:
      master: media_player.soundtouch_kitchen
      slaves: media_player.soundtouch_kitchen_bar
  - choose:
    - conditions:
      - condition: time
        before: 08:00:00
      sequence:
      - service: input_number.set_value
        data:
          value: 1
        entity_id: input_number.group_volume
    - conditions:
      - condition: time
        after: '20:00:00'
      sequence:
      - service: input_number.set_value
        data:
          value: 2
        entity_id: input_number.group_volume
    default:
    - service: input_number.set_value
      data:
        value: 3
      entity_id: input_number.group_volume
  mode: single
- id: '1615149883467'
  alias: 'Bose Group Lounge '
  description: Add Lounge to playing group after kitchen bar starts
  trigger:
  - platform: state
    entity_id: media_player.soundtouch_kitchen_bar
    to: playing
  condition:
  - condition: state
    entity_id: media_player.samsung_q80_series_65
    state: 'off'
  action:
  - service: soundtouch.add_zone_slave
    data:
      master: media_player.soundtouch_kitchen
      slaves: media_player.soundtouch_lounge
  mode: single
- id: '1615492950024'
  alias: Bose Volume Scripts
  description: ''
  trigger:
  - platform: state
    entity_id: input_number.group_volume
  condition: []
  action:
  - choose:
    - conditions:
      - condition: state
        entity_id: input_number.group_volume
        state: '1.0'
      sequence:
      - service: script.soundtouch_volume_low
        data: {}
    - conditions:
      - condition: state
        entity_id: input_number.group_volume
        state: '2.0'
      sequence:
      - service: script.soundtouch_volume_medium_low
        data: {}
    - conditions:
      - condition: state
        entity_id: input_number.group_volume
        state: '3.0'
      sequence:
      - service: script.soundtouch_volume_medium
        data: {}
    - conditions:
      - condition: state
        entity_id: input_number.group_volume
        state: '4.0'
      sequence:
      - service: script.soundtouch_volume_medium_high
        data: {}
    - conditions:
      - condition: state
        entity_id: input_number.group_volume
        state: '5.0'
      sequence:
      - service: script.soundtouch_volume_high
        data: {}
    default: []
  mode: single

and scripts

soundtouch_volume_low:
  alias: Bose Volume Low
  sequence:
  - service: media_player.volume_set
    data:
      entity_id: media_player.soundtouch_kitchen
      volume_level: 0.15
  - service: media_player.volume_set
    data:
      entity_id: media_player.soundtouch_kitchen_bar
      volume_level: 0.22
  - service: media_player.volume_set
    data:
      entity_id: media_player.soundtouch_lounge
      volume_level: 0.2
  - service: media_player.volume_set
    data:
      entity_id: media_player.soundtouch_master_bed
      volume_level: 0.15
  - service: media_player.volume_set
    data:
      entity_id: media_player.soundtouch_office
      volume_level: 0.2
  mode: single
soundtouch_volume_medium_low:
  alias: Bose Volume Medium-Low
  sequence:
  - service: media_player.volume_set
    data:
      entity_id: media_player.soundtouch_kitchen
      volume_level: 0.2
  - service: media_player.volume_set
    data:
      entity_id: media_player.soundtouch_kitchen_bar
      volume_level: 0.3
  - service: media_player.volume_set
    data:
      entity_id: media_player.soundtouch_lounge
      volume_level: 0.25
  - service: media_player.volume_set
    data:
      entity_id: media_player.soundtouch_master_bed
      volume_level: 0.2
  - service: media_player.volume_set
    data:
      entity_id: media_player.soundtouch_office
      volume_level: 0.3
  mode: single
soundtouch_volume_medium:
  alias: Bose Volume Medium
  sequence:
  - service: media_player.volume_set
    data:
      entity_id: media_player.soundtouch_kitchen
      volume_level: 0.25
  - service: media_player.volume_set
    data:
      entity_id: media_player.soundtouch_kitchen_bar
      volume_level: 0.4
  - service: media_player.volume_set
    data:
      entity_id: media_player.soundtouch_lounge
      volume_level: 0.3
  - service: media_player.volume_set
    data:
      entity_id: media_player.soundtouch_master_bed
      volume_level: 0.25
  - service: media_player.volume_set
    data:
      entity_id: media_player.soundtouch_office
      volume_level: 0.3
  mode: single
soundtouch_volume_medium_high:
  alias: Bose Voume Medium-High
  sequence:
  - service: media_player.volume_set
    data:
      entity_id: media_player.soundtouch_kitchen
      volume_level: 0.3
  - service: media_player.volume_set
    data:
      entity_id: media_player.soundtouch_kitchen_bar
      volume_level: 0.45
  - service: media_player.volume_set
    data:
      entity_id: media_player.soundtouch_lounge
      volume_level: 0.35
  - service: media_player.volume_set
    data:
      entity_id: media_player.soundtouch_master_bed
      volume_level: 0.3
  - service: media_player.volume_set
    data:
      entity_id: media_player.soundtouch_office
      volume_level: 0.35
  mode: single
soundtouch_volume_high:
  alias: Bose Volume High
  sequence:
  - service: media_player.volume_set
    data:
      entity_id: media_player.soundtouch_kitchen
      volume_level: 0.45
  - service: media_player.volume_set
    data:
      entity_id: media_player.soundtouch_kitchen_bar
      volume_level: 0.7
  - service: media_player.volume_set
    data:
      entity_id: media_player.soundtouch_lounge
      volume_level: 0.5
  - service: media_player.volume_set
    data:
      entity_id: media_player.soundtouch_master_bed
      volume_level: 0.45
  - service: media_player.volume_set
    data:
      entity_id: media_player.soundtouch_office
      volume_level: 0.5
  mode: single

Thanks jasebob!

I started to use the mini media player now, it appears it may help me to get my soundtouch system to the some better functionality than Bose App on my iOS.

Unfortunatley the grouping (zones) gives the error as:

Failed to call service soundtouch/CREATE_ZONE. Unable to find service soundtouch.create_zone

any idea? I could not find any instruction in the documentation.

Make sure you use the platform option, you will need to edit in yaml
Soundtouch is a bit silly with its API, it makes you call create_zone to combine the first two speakers, then add_zone after that.

Here is the code from my screenshot, its moderately complex using template-card as well as mini-media player. But it should help.

type: entities
entities:
  - type: custom:config-template-card
    entities:
      - media_player.soundtouch_kitchen
    name: Templated SoundTouch
    card:
      type: custom:mini-media-player
      entity: media_player.soundtouch_kitchen
      name: Kitchen Group
      artwork: full-cover
      group: true
      info: scroll
      hide:
        power: true
        volume: true
        source: true
      speaker_group:
        platform: soundtouch
        show_group_count: true
        entities:
          - entity_id: media_player.soundtouch_kitchen
            name: Kitchen
          - entity_id: media_player.soundtouch_kitchen_bar
            name: Kitchen Bar
          - entity_id: media_player.soundtouch_lounge
            name: Lounge
          - entity_id: media_player.soundtouch_master_bed
            name: Master Bed
          - entity_id: media_player.soundtouch_office
            name: Office
      shortcuts:
        align_text: left
        columns: 2
        buttons:
          - icon: mdi:numeric-1-box
            id: 1
            type: playlist
          - icon: mdi:numeric-2-box
            id: 2
            type: playlist
          - icon: mdi:numeric-3-box
            id: 3
            type: playlist
          - icon: mdi:numeric-4-box
            id: 4
            type: playlist
          - icon: mdi:numeric-5-box
            id: 5
            type: playlist
          - icon: mdi:numeric-6-box
            id: 6
            type: playlist
  - entity: input_number.group_volume
    name: Volume Preset
  - type: divider
  - type: custom:mini-media-player
    entity: media_player.soundtouch_kitchen
    name: Kitchen
    group: true
    hide:
      controls: true
      info: true
      source: true
  - type: custom:mini-media-player
    entity: media_player.soundtouch_kitchen_bar
    name: Kitchen Bar
    group: true
    hide:
      controls: true
      info: true
      source: true
    tap_action:
      action: call-service
      service: soundtouch.add_zone_slave
      service_data:
        master: media_player.soundtouch_kitchen
        slaves: media_player.soundtouch_kitchen_bar
  - type: custom:mini-media-player
    entity: media_player.soundtouch_lounge
    name: Lounge
    group: true
    hide:
      controls: true
      info: true
      source: true
    tap_action:
      action: call-service
      service: soundtouch.add_zone_slave
      service_data:
        master: media_player.soundtouch_kitchen
        slaves: media_player.soundtouch_lounge
  - type: custom:mini-media-player
    entity: media_player.soundtouch_master_bed
    name: Master Bed
    group: true
    hide:
      controls: true
      info: true
      source: true
    tap_action:
      action: call-service
      service: soundtouch.add_zone_slave
      service_data:
        master: media_player.soundtouch_kitchen
        slaves: media_player.soundtouch_master_bed
  - type: custom:mini-media-player
    entity: media_player.soundtouch_office
    name: Office (L)
    group: true
    hide:
      controls: true
      info: true
      source: true
    tap_action:
      action: call-service
      service: soundtouch.add_zone_slave
      service_data:
        master: media_player.soundtouch_kitchen
        slaves: media_player.soundtouch_office
  - type: custom:mini-media-player
    entity: media_player.soundtouch_office_r
    name: Office (R)
    group: true
    hide:
      controls: true
      info: true
      source: true
    tap_action:
      action: call-service
      service: soundtouch.add_zone_slave
      service_data:
        master: media_player.soundtouch_kitchen
        slaves: media_player.soundtouch_office
  - type: divider
  - entity: automation.create_kitchen_bose_zone
    name: Auto Group Kitchen
  - entity: automation.group_lounge_bose
    name: Auto Group Lounge

Hi @jasebob, @mathea, @vandura231, @Hielke_Haan, @Reedstrr, @ranunculales, @juan11perez - in case you are still using SoundTouch with Home Assistant …

I have developed a new SoundTouchPlus integration to control my SoundTouch devices. It can also be easily installed via HACS. More info can be found on my GitHub Project page.

I also wrote the underlying bosesoundtouchapi python 3 library as well, which is packed with features. I basically got tired of libsoundtouch not being supported, so I wrote my own. More info on the API can be found on the Pypi.org page or the ReadTheDocs.io pages.

I have also started a SoundTouch WebServices API notes page that contains detailed information on some of the supported SoundTouch WebService API services. It’s been an uphill battle with the WebServices API, as Bose no longer publishes documentation. I have been able to figure out quite a few things: Pandora music service support, playing of https content items, tone controls (bass and treble), etc, besides the standard volume controls, preset switching, etc.

Hope it helps.

1 Like

Hi @thlucas! Great job and thanks for the effort!

Do you believe it would be possibile to add the snapshot/restore function? They did not use to work very well with the old libsoundtouch library.

Hi @override - snapshot and restore are already supported. Check out this wiki link for details.

Oh my god! It also does tts messages than resumes from where it left with the music! Amazing!!

1 Like

Yes, TTS notifications are supported on some SoundTouch devices. For example, I can play TTS notifications on my ST-10, but they won’t play for some reason on my bigger ST-300 soundbar. I am still trying to figure that one out, but it appears to be an issue in the Bose WebServices API that is restricting it.