Sonos · KNX · Home Assistant · 8 min read

Sonos Multi-room Audio + KNX Integration via Home Assistant

Sonos is the de-facto standard for multi-room audio in European KNX smart homes — not because it speaks KNX, but because it doesn't need to. Home Assistant acts as the bridge, translating KNX group address telegrams into Sonos local API calls without any cloud dependency.

Sonos product selection for KNX projects

Choosing the right Sonos device for each zone determines audio quality, installation complexity and integration method. The table below covers every current Sonos product relevant to KNX residential and hospitality installations.

ModelBest zoneKey featureNotes
Era 300Living room / open planSpatial audio (Dolby Atmos)Best standalone speaker for large rooms
Era 100Bedroom / kitchenCompact, dual tweetersReplaces One — ideal secondary zone
ArcTV / cinema roomDolby Atmos soundbarHDMI eARC — pairs with TV via KNX relay
Beam G2Compact TV zoneSoundbar, HDMI ARCSmaller rooms; good soundstage
Move 2Terrace / portableBattery 24h, IP56, Wi-Fi + BTNo passive speakers needed outdoors
RoamGarden / pool zoneIP67, 10h battery, charging cradleTrue waterproof — pool or garden use
AmpPassive speaker zones2× 125W, Ethernet, line inDrives existing in-ceiling 8Ω speakers

How Sonos local API works

Sonos operates a local UPnP stack on every device. No cloud subscription is required for LAN control — the Sonos HTTP API responds on port 1400 and is discoverable via mDNS (Bonjour). Home Assistant finds all Sonos devices on the LAN automatically during setup; no IP addresses need to be entered manually.

Local API endpoints

  • • HTTP on port 1400 (SOAP/UPnP)
  • • mDNS service type: _sonos._tcp
  • • Works on isolated LAN (no internet needed)
  • • Subscription to events via port 3400
  • • HA Sonos integration uses local API by default
  • • Response time: <100ms typical on same LAN

HA Sonos integration setup

  1. Enable discovery in HA (Settings → Integrations)
  2. Sonos devices appear automatically under "Discovered"
  3. Click "Add" — no credentials needed
  4. Each Sonos speaker becomes a media_player entity
  5. Configure zone names to match room labels
  6. KNX integration installs separately (same HA instance)

KNX → Sonos: automation examples

The following automations cover the most common KNX-triggered Sonos use cases in residential projects. All use the Home Assistant YAML automation format and require both the KNX and Sonos integrations active in HA.

1. KNX binary ON → Sonos Living Room play Spotify playlist

automation:
  - alias: "KNX Living Room audio ON"
    trigger:
      - platform: event
        event_type: knx_event
        event_data:
          destination: "1/0/0"    # KNX binary DPT 1.001
          value: true
    action:
      - service: media_player.play_media
        target:
          entity_id: media_player.living_room
        data:
          media_content_id: "spotify:playlist:37i9dQZF1DX4sWSpwq3LiO"
          media_content_type: music
      - service: media_player.volume_set
        target:
          entity_id: media_player.living_room
        data:
          volume_level: 0.35

2. 'Dinner' KNX scene → Sonos volume 30%, play Jazz radio

automation:
  - alias: "KNX Dinner scene → Jazz radio"
    trigger:
      - platform: event
        event_type: knx_event
        event_data:
          destination: "4/0/2"    # KNX scene DPT 18.001, scene value 4
    action:
      - service: media_player.volume_set
        target:
          entity_id: media_player.dining_room
        data:
          volume_level: 0.30
      - service: media_player.play_media
        target:
          entity_id: media_player.dining_room
        data:
          media_content_id: "https://jazz24.org/jazz24-256k.mp3"
          media_content_type: music

3. 'Departure' KNX binary → pause all Sonos + cut TV power

automation:
  - alias: "KNX Departure → pause audio + TV off"
    trigger:
      - platform: event
        event_type: knx_event
        event_data:
          destination: "4/0/9"    # Departure binary DPT 1.001
          value: true
    action:
      - service: media_player.media_pause
        target:
          entity_id: all            # pause every Sonos speaker
      - service: knx.send
        data:
          address: "2/0/5"          # KNX relay: TV power off
          payload: false

4. Ajax alarm trigger → all zones play alarm at 100%

automation:
  - alias: "Ajax alarm → Sonos full-volume alarm"
    trigger:
      - platform: event
        event_type: knx_event
        event_data:
          destination: "3/0/0"    # Ajax alarm zone, DPT 1.001
          value: true
    action:
      - service: media_player.volume_set
        target:
          entity_id: all
        data:
          volume_level: 1.0
      - service: media_player.play_media
        target:
          entity_id: all
        data:
          media_content_id: "http://192.168.1.10/media/alarm.mp3"
          media_content_type: music

5. Guest doorbell → chime in kitchen + living room

automation:
  - alias: "Doorbell → Sonos chime"
    trigger:
      - platform: event
        event_type: knx_event
        event_data:
          destination: "0/0/10"   # Doorbell binary DPT 1.001
          value: true
    action:
      - service: media_player.play_media
        target:
          entity_id:
            - media_player.kitchen
            - media_player.living_room
        data:
          media_content_id: "http://192.168.1.10/media/chime.mp3"
          media_content_type: music

Sonos → KNX: push now-playing to Gira display

Gira X1 and G1 touchscreens display KNX DPT 16.001 string values. The automation below pushes the current artist and track name to a KNX group address whenever the playing media changes — so the room panel always shows what is playing.

Now-playing → KNX group address DPT 16.001

automation:
  - alias: "Sonos now-playing → KNX string"
    trigger:
      - platform: state
        entity_id: media_player.living_room
        attribute: media_title
    action:
      - service: knx.send
        data:
          address: "1/0/50"        # DPT 16.001 — 14-char string max
          payload: >
            {{ state_attr('media_player.living_room', 'media_artist')
               | truncate(6, True, '') }} -
            {{ state_attr('media_player.living_room', 'media_title')
               | truncate(6, True, '') }}

KNX DPT 16.001 supports 14 characters maximum (ISO 8859-1 encoded). Truncate artist and title to fit. For longer strings use DPT 16.000 (ASCII) or Gira proprietary display objects if available on the touchscreen firmware.

Sonos grouping from KNX

When a 'Party' KNX scene fires, all speakers should play the same source in sync. Thesonos.joinHA service groups speakers under a coordinator (the first entity) within milliseconds.

KNX Party scene → group living room + kitchen

automation:
  - alias: "KNX Party scene → Sonos group"
    trigger:
      - platform: event
        event_type: knx_event
        event_data:
          destination: "4/0/5"    # Party scene DPT 18.001
    action:
      - service: sonos.join
        data:
          master: media_player.living_room
          entity_id:
            - media_player.kitchen
            - media_player.dining_room
            - media_player.terrace
      - service: media_player.volume_set
        target:
          entity_id: media_player.living_room
        data:
          volume_level: 0.50

Multiroom volume control from KNX

KNX sends volume as either a 2-byte float (DPT 9.001, range 0–100) or a 1-byte relative step (DPT 5.001, range 0–255 → 0–100%). Both are supported:

KNX volume → Sonos (absolute + relative)

automation:
  - alias: "KNX absolute volume → Sonos"
    trigger:
      - platform: event
        event_type: knx_event
        event_data:
          destination: "1/0/20"   # DPT 9.001 float, 0–100
    action:
      - service: media_player.volume_set
        target:
          entity_id: media_player.living_room
        data:
          volume_level: "{{ trigger.event.data.value | float / 100 }}"

  - alias: "KNX relative volume step → Sonos"
    trigger:
      - platform: event
        event_type: knx_event
        event_data:
          destination: "1/0/21"   # DPT 5.001 relative, up/down
    action:
      - choose:
          - conditions:
              - condition: template
                value_template: "{{ trigger.event.data.value > 128 }}"
            sequence:
              - service: media_player.volume_up
                target:
                  entity_id: media_player.living_room
          - conditions:
              - condition: template
                value_template: "{{ trigger.event.data.value <= 128 }}"
            sequence:
              - service: media_player.volume_down
                target:
                  entity_id: media_player.living_room

Local music library: NAS, Plex, elevator music

Sonos plays from any SMB share or Plex/Jellyfin server on the LAN without internet access. This is particularly useful for hotel lobby background music, conference room announcements, or elevator music where a fixed playlist must play 24/7 regardless of Spotify connectivity.

NAS music library

  • Sonos → Settings → Add Music Library
  • Browse SMB share on NAS
  • Indexing: automatic, ~1h per 10,000 tracks
  • Playback: direct LAN, no cloud

Plex Media Server

  • Install Plex on NAS or server
  • Add Plex as Sonos music service
  • HA: media_player.play_media with plex:// URI
  • Works offline if Plex server on LAN

Hotel / commercial use

  • License-free music: Epidemic Sound, Artlist
  • Download tracks to NAS — no streaming cost
  • KNX time schedule triggers playlist by zone
  • Different zones: lobby, bar, restaurant, spa

Audio integration in your KNX panel

We design panels with Sonos Amp supply circuits, KNX relay outputs for amplifier switching, and 0-10V analog outputs for volume control — all pre-tested before delivery.

Request a quote →
Loading...
Back to top