Media Player Integration/Alexa/Nabu Casa

First, I have a (slightly modified) version of the Xantech Media player scripts to support my Dayton Audio DAX88. This is likely not the issue but it should be mentioned. I am using Nabu Casa and Alexa to control many things, including this device. This device has 8 zones which results in 8 media players, one for each zone. They appear perfectly in the GUI and I can do things like turn each zone on/off, vol up/down and mute on/off. It the GUI I can also select the source as it has 8 sources.

What I cannot figure out is what to say to Alexa to change the input source. I can tell Alexa:

“Turn on DAX Deck” … it works
“Set volume on DAX Deck to 30%” … it works
“Set mute to off on Dax Deck” … it works

But anything I try to do something like:

“Change Dax Deck source to Wifi” … or “Change Dax Deck input to Wifi” or anything like it does not work.

Now, I can go to Developer Tools and call the service “Media player: Select source” with the entity “Dax Deck” and set the name to “Wifi” and it works.

So I am either confused as to what exactly to say to Alexa (to go through Nabu Casa) or possibly I cannot change the source? Anyone got any hints?

1 Like

I should note that in the Configuration screen for Nabu Casa/Alexa I see this:

image

Which to me says I should be able to control the Input. As I said, I can control POwer, Volume and Mute through Alexa, just not the input

As an update, I see this in logs now:

2022-04-17 12:35:32 ERROR (MainThread) [homeassistant.components.alexa.state_report] Error when sending ChangeReport for media_player.deck_alexa to Alexa: THROTTLING_EXCEPTION: Request could not be processed due to throttling.

2022-04-17 12:35:34 ERROR (MainThread) [homeassistant.components.alexa.state_report] Error when sending ChangeReport for media_player.deck_alexa to Alexa: THROTTLING_EXCEPTION: Request could not be processed due to throttling.

So Alexa is not selecting the right media_player … humm

Hey @kbrown01, do you mind share your Xantech Media player script modification? I finally got DAX88 and trying to reproduce your setup.

Wow. Taxing my brain here but I will try.

I have a include for media_player.yaml:

- platform: xantech
  type: dax88
  port: /dev/ttyUSB0
  zones:
    11:
      name: "Kitchen"
    12:
      name: "Living Room"
    13:
      name: "Deck"
    14:
      name: "Hot Tub"
    15:
      name: "Patio"
    16:
      name: "Foyer"
    17:
      name: "Master"
    18:
      name: "Unused"
  sources:
    1:
      name: "Alexa"
    2:
      name: "MintyFresh"
    3:
      name: "Volumio"
    4:
      name: "Input 4"
    5:
      name: "Input 5"
    6:
      name: "Input 6"
    7:
      name: "Input 7"
    8:
      name: "WiFi"

That said, I know the commands slightly differ so I modified pyxantech I am sure. I will need to look and get back to you. Obviously because type of “dax88” I must have wrote.

OK … at the very least I added these to pyxantech:

dayton.yaml in protocols:

- protocol: dayton
  name: "Dayton Audio 8-Zone Amp Protocol"

  connection:
    rs232:
      baud: 9600
      data: 8
      parity: N
      stop: 1

  limits:
    volume:
      min: 0
      max: 38
    treble:
      min: 0
      max: 14
    bass:
      min: 0
      max: 14
    balance:
      min: 0
      max: 20
    source: # technically limited by hardware series yaml, not protocol
      min: 1
      max: 8
    zone: # technically limited by hardware series yaml, not protocol
      min: 1
      max: 8
 
  command_eol: "\r"
  command_separator: ""

  commands:
    zone_status:   '?{zone}'

    set_power:     '<{zone}PR{power:02}' # power: 1 = on; 0 = off
    power_on:      '<{zone}PR01'
    power_off:     '<{zone}PR00'

    set_mute:      '<{zone}MU{mute:02}'  # mute: 1 = on; 0 = off
    mute_on:       '<{zone}MU01'
    mute_off:      '<{zone}MU00'

    set_volume:    '<{zone}VO{volume:02}'   # volume: 0-38
    set_treble:    '<{zone}TR{treble}:02}'  # treble: 0-14
    set_bass:      '<{zone}BS{bass:02}'     # bass: 0-14
    set_balance:   '<{zone}BL{balance:02}'  # balance: 0-20
    set_source:    '<{zone}CH{source:02}'   # source: 0-6

  response_eol: "\r"

  responses:
    zone_status: '>(?P<zone>\d\d)(?P<unknown>\d\d)(?P<power>[01]{2})(?P<mute>[01]{2})(?P<do_not_disturb>[01]{2})(?P<volume>\d\d)(?P<treble>\d\d)(?P<bass>\d\d)(?P<balance>\d\d)(?P<source>\d\d)(?P<keypad>\d\d)'

  extra:
    restore_zone:    [ 'set_power', 'set_source', 'set_volume', 'set_mute', 'set_bass', 'set_balance', 'set_treble' ]
    restore_success: "OK\r"

dax88.yaml in series:

- series: dax88
  name: "Dax 88 8-Zone Amp"

  supported:
    - manufacturer: "Dayton Audio"
      model: "DAX88"

  features:
    zones: 8
    sources: 8

  # FIXME: switch code to features
  num_zones: 8
  num_sources: 8
  max_amps: 3
  
  # FIXME: load these limits from protocol
  max_balance: 20
  max_bass: 14
  max_treble: 14
  max_volume: 38

  protocol: dayton
  min_time_between_commands: 0.4

  rs232:
    baudrate: 9600
    bytesize: 8
    parity: 'N'
    stopbits: 1
    timeout: 1.0
    write_timeout: 1.0
 
  hardware_volume_steps: 38
 
  sources:
    1: "Source 1"
    2: "Source 2"
    3: "Source 3"
    4: "Source 4"
    5: "Source 5"
    6: "Source 6"
    7: "Source 7"
    8: "Source 8"
 
  # technically zone = {amp_number}{zone_num_within_amp_1-6} (e.g. 11 = amp number 1, zone 1)
  zones:
    11: "Zone 1"          # main amp 1    (e.g. 15 = amp 1, zone 5)
    12: "Zone 2"
    13: "Zone 3"
    14: "Zone 4"
    15: "Zone 5"
    16: "Zone 6"
    17: "Zone 7"
    18: "Zone 8"

I think I made other changes to pyxantech because it would not compile. I will need to likely revisit all this for the change to python 3.10 and do a real Github fork.

1 Like

Got it, thanks. I can help you to clean it up for the release if you want. DM me.

@kbrown01 I have a DAX88 as well, and have recently started with Home Assistant. What’s the state of your HA integration with the DAX88? Is it available? I’d love to try it out. Thanks!

@mr_fixit made some changes. Mine is based on a older version of the Xantech integration. Possibly he can post to Github and we can both take a newer version. I do not feel comfortable giving mine although it works like a charm, I would feel better coming from a developer with experience.

I will say this, it is the best kick-ass multi-zone amp I have ever owned, far exceeding the power of Monoprice and other alternatives (have owned both Russound and Monoprice). I have 7 zones set up, I left open. On 6 zones there are 4 wired speakers mostly Bose outdoor and in-wall, in-ceiling, Zone 7 is passthrough to another Amp (as 7 and 8 are pre-amp on the Dax88). So right now 28 speakers total and cranked up to 50% you can hear my music 1/2 mile away. Although I do live on 42 acres so not many neighbors to complain.

Last night we had a football watch party. One of my inputs is stereo piped from DirecTV box wireless to a receiver into the Amp. You could feel the tackles!

I sent my changes to the Xantech developer and he just emailed me that he merged them. So I assume this will become part of the regular release.

I just looked at the custom repository and I see the developer must have put my changes into the release. Using HACS, go to integrations and search Xantech or here: rsnodgrass/hass-xantech: Xantech Multi-Zone Matrix Audio for Home Assistant (github.com)

It does support all 8 Zones (of course 7 and 8 are pre-amp on the Dax 88). My configuration looks like this:

- platform: xantech
  type: dax88
  port: /dev/ttyUSB0
  zones:
    11:
      name: "Kitchen"
    12:
      name: "Living Room"
    13:
      name: "Deck"
    14:
      name: "Hot Tub"
    15:
      name: "Patio"
    16:
      name: "Foyer"
    17:
      name: "Master"
    18:
      name: "Unused"
  sources:
    1:
      name: "Alexa"
    2:
      name: "MintyFresh"
    3:
      name: "Volumio"
    4:
      name: "PatioVizio"
    5:
      name: "Input 5"
    6:
      name: "Input 6"
    7:
      name: "Input 7"
    8:
      name: "WiFi"

One Dax88, one unused zone for now, still 3 inputs open.

I am sure that this component will cause this to be updated (which is where my changes were):

rsnodgrass/pyxantech: Python RS232 API for multi-zone amps (Monoprice/Soundavo/Xantech/Dayton Audio) (github.com)

1 Like

Great, thanks!

HI all - i’m looking to do home audio and just found the DAX88 - it looks great.

I really just want to be able to cast music from youtube music like i am casting now to my chrome casts. Seems this can do that?

I’m renovating my home and going to install in ceiling speakers (wired) to a central point.

thank you

Well you can do anything you wish, whether it is supported “natively” by the device or whether you might need something else is the only question.

My DAX88 has as inputs:

Wifi: primarily used for Spoitify and this I would term as “native” to the device.

Input 1: An alexa hockey puck, anything you can play on it(including Spotify, Pandora, etc.)

Input 2: Volumio server, most used for my entire 10,000 song music collection ripped in MP3s BUT it can also be Spotify and Pandora and other radio and etc.

Input 3: One TV in the house with audio out back to the reciever as audio in with a simple sender/receiver … this is football and other sports mostly.

Translation … you can plug in whatever you wish to RCA, mini-din or Optical depending on the input. That is an input. You can send any input to one or more outputs

Oh and its a DLNA device so you can play that way too.
Yu want YouTube Music, no problem. Put any cast device in that receives the sound and has an output.

Picture … SpotifyPlus streaming into the player on most all zones:

I can activate various inputs to have music coming in.
I can control what input I want to each output zone,
And with my stuff I can control bass/treble/balance etc. on each output zone.
And two of those are preamp zones, only one used for now.
I can control that one separately.

Here is a shot now, different zones in the house … different music, different volumes … jamming:

thanks so much - so with input 1 do you need to turn on teh zone through the app to use it or is it always on or ready in standby?

i was looking at this one WS66i (KIT-Package) with 6 White LCD Keypads / Whole-Home Audio Distribution Network Controller Matrix with Streamer & App Control – Soundavo

but confirmed that running a chromecast or alexa into it - the zone won’t turn on you have to go into the control app and turn that zone on which is dissapointing. But you can just leave the zone on always.

How does the dax88 handle this with your alexa input @kbrown01

thank you for your help

I have it all in HA. If what you want is auto on to whatever input is live, i have never cared about that. I pick input and zones have automations that set things into moods that i want. So for instance, I play Spotify and it automatically turns on the Hot Tub and Back Deck zones, sets the volume, and activates SpotifyPlus.

Considering that the volume could be in any state you left it, I find this the right way as to not start too loud depending on who listened last. After all, in those screens, all one does it click the speaker icon next to the Zone (turn on), adjust slider (volume), possibly change input (input select). Across the top tabs there is “Groups” which probably should be “Moods” that are a whole set of things that are turned on and set to specific volumes and input(s).

That is a screen of the one I am setting up now, I finished another recently that has 12 different “moods” from Party to TV Sports to different music in different areas of the winery.

That said, I believe you have a triggering system in the DAX that can auto turn on given an input, but I never use it.

Got it. Yeah my family use google home to activate music now. So it would a big change to force them to use a dashboard to do so. I do have multiple dashboards tho thst could do this.

Really appreciate your tips

Understood … then again I use Alexa and have through scripts set up so I can just say “Alexa Start Party Mode” … no buttons !

sounds like you can use HA to turn zones on and off on the dax88 which is a lot better than the one i linked

Each output zone in the DAX integration is it’s own media player:

So that is one Dax, 8 outputs which are 6 Amped zones (1 through 6) and two Pre-Amp zones to feed powered subwoofer or another Amp (7 and 8). Or one used to daisy-chain another Dax if needed.

Every one of those can have any one input (8 in total, 7 from external input and one built-in Wifi).

So Zone 1,2,3 can be on Wifi with Spotify (all synced of course).
4,5 on Alexa playing something.
6,7,8 not on or other inputs or whatever.