core: Media players cause alexa to fail discovering any devices.

The problem

Certain media players cause Nabu Casa and Alexa SmartHome Skill to fail discovering ALL devices produced by the integration.

@eifinger mentioned his Denon media players in a chat on Discord causing issues.

For me it’s 2 Yamaha Receivers (yamaha network receiver).

Here is information on the 2 recievers:

media_player.yamaha_receiver on source_list: AirPlay, Echo, Empty, NET RADIO, Phone, Playstation 4, Roku, SERVER, Switch, TUNER, Xbox One, iPod (USB) sound_mode_list: Hall in Munich, Hall in Vienna, Chamber, Cellar Club, The Roxy Theatre, The Bottom Line, Sports, Action Game, Roleplaying Game, Music Video, Standard, Spectacle, Sci-Fi, Adventure, Drama, Mono Movie, Surround Decoder, 2ch Stereo, 7ch Stereo volume_level: 0.7 is_volume_muted: false source: Xbox One sound_mode: Sci-Fi friendly_name: Yamaha Zone One supported_features: 84364 icon: mdi:numeric-1-box
media_player.yamaha_receiver_zone_2 on source_list: AirPlay, Echo, NET RADIO, Phone, SERVER, TUNER, iPod (USB) volume_level: 0.7 is_volume_muted: false source: Echo friendly_name: Yamaha Zone Two supported_features: 84364 icon: mdi:numeric-2-box

It should be interesting to note that the 2 following universal media_players transfer over properly with discovery:

media_player.dining_room_speakers on source_list: AirPlay, Echo, NET RADIO, Phone, SERVER, TUNER, iPod (USB) volume_level: 0.7 is_volume_muted: false source: Echo active_child: media_player.yamaha_receiver_zone_2 friendly_name: Dining Room Speakers supported_features: 84364
media_player.living_room_speakers on source_list: AirPlay, Echo, Empty, NET RADIO, Phone, Playstation 4, Roku, SERVER, Switch, TUNER, Xbox One, iPod (USB) volume_level: 0.7 is_volume_muted: false source: Xbox One active_child: media_player.yamaha_receiver friendly_name: Living Room Speakers supported_features: 84364

Environment

Buster (Debian 10) on a Nuc running home assistant supervised.

  • Home Assistant Core release with the issue: 107.7
  • Last working Home Assistant Core release (if known): Unknown, first attempt outside universal media integration.
  • Operating environment (Home Assistant/Supervised/Docker/venv): Debian 10
  • Integration causing this issue: Alexa, NabuCasa Alexa. Specifically connecting via the following configuration:
alexa:
  smart_home:
    ... etc ...

Problem-relevant configuration.yaml

Problem is simple. With the 2 yamaha media_players, discovery on alexa’s side fails to find ANY devices. Without the 2 media_players, discovery works fine.

Here’s a snippit of the json response to alexa. This is just 1 media player item.

        {
          "capabilities": [
            {
              "interface": "Alexa.PowerController",
              "properties": {
                "proactivelyReported": true,
                "retrievable": true,
                "supported": [
                  {
                    "name": "powerState"
                  }
                ]
              },
              "type": "AlexaInterface",
              "version": "3"
            },
            {
              "interface": "Alexa.Speaker",
              "properties": {
                "proactivelyReported": true,
                "retrievable": true,
                "supported": [
                  {
                    "name": "volume"
                  },
                  {
                    "name": "muted"
                  }
                ]
              },
              "type": "AlexaInterface",
              "version": "3"
            },
            {
              "interface": "Alexa.PlaybackController",
              "supportedOperations": [
                "Play"
              ],
              "type": "AlexaInterface",
              "version": "3"
            },
            {
              "interface": "Alexa.PlaybackStateReporter",
              "properties": {
                "proactivelyReported": true,
                "retrievable": true,
                "supported": [
                  {
                    "name": "playbackState"
                  }
                ]
              },
              "type": "AlexaInterface",
              "version": "3"
            },
            {
              "inputs": [
                {
                  "name": "TUNER"
                }
              ],
              "interface": "Alexa.InputController",
              "type": "AlexaInterface",
              "version": "3"
            },
            {
              "interface": "Alexa.EqualizerController",
              "properties": {
                "proactivelyReported": false,
                "retrievable": false,
                "supported": [
                  {
                    "name": "mode"
                  }
                ]
              },
              "type": "AlexaInterface",
              "version": "3"
            },
            {
              "interface": "Alexa.EndpointHealth",
              "properties": {
                "proactivelyReported": true,
                "retrievable": true,
                "supported": [
                  {
                    "name": "connectivity"
                  }
                ]
              },
              "type": "AlexaInterface",
              "version": "3"
            },
            {
              "interface": "Alexa",
              "type": "AlexaInterface",
              "version": "3"
            }
          ],
          "cookie": {},
          "description": "media_player.yamaha_receiver_zone_2 via Home Assistant",
          "displayCategories": [
            "TV"
          ],
          "endpointId": "media_player#yamaha_receiver_zone_2",
          "friendlyName": "Zone One",
          "manufacturerName": "Home Assistant"
        },

Here’s a VALID working one

        {
          "capabilities": [
            {
              "interface": "Alexa.PowerController",
              "properties": {
                "proactivelyReported": true,
                "retrievable": true,
                "supported": [
                  {
                    "name": "powerState"
                  }
                ]
              },
              "type": "AlexaInterface",
              "version": "3"
            },
            {
              "interface": "Alexa.Speaker",
              "properties": {
                "proactivelyReported": true,
                "retrievable": true,
                "supported": [
                  {
                    "name": "volume"
                  },
                  {
                    "name": "muted"
                  }
                ]
              },
              "type": "AlexaInterface",
              "version": "3"
            },
            {
              "interface": "Alexa.PlaybackController",
              "supportedOperations": [
                "Play"
              ],
              "type": "AlexaInterface",
              "version": "3"
            },
            {
              "interface": "Alexa.PlaybackStateReporter",
              "properties": {
                "proactivelyReported": true,
                "retrievable": true,
                "supported": [
                  {
                    "name": "playbackState"
                  }
                ]
              },
              "type": "AlexaInterface",
              "version": "3"
            },
            {
              "inputs": [
                {
                  "name": "TUNER"
                }
              ],
              "interface": "Alexa.InputController",
              "type": "AlexaInterface",
              "version": "3"
            },
            {
              "interface": "Alexa.EqualizerController",
              "properties": {
                "proactivelyReported": false,
                "retrievable": false,
                "supported": [
                  {
                    "name": "mode"
                  }
                ]
              },
              "type": "AlexaInterface",
              "version": "3"
            },
            {
              "interface": "Alexa.EndpointHealth",
              "properties": {
                "proactivelyReported": true,
                "retrievable": true,
                "supported": [
                  {
                    "name": "connectivity"
                  }
                ]
              },
              "type": "AlexaInterface",
              "version": "3"
            },
            {
              "interface": "Alexa",
              "type": "AlexaInterface",
              "version": "3"
            }
          ],
          "cookie": {},
          "description": "media_player.dining_room_speakers via Home Assistant",
          "displayCategories": [
            "TV"
          ],
          "endpointId": "media_player#dining_room_speakers",
          "friendlyName": "Dining Room Speakers",
          "manufacturerName": "Home Assistant"
        },

unfortunately, it doesn’t look like there are any differences that would be causing the problem. It may be related to the communication process that media_players go through when adding them to Alexa.

Traceback/Error logs


Additional information

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 15 (10 by maintainers)

Most upvoted comments

@Petro31 I suspect it’s the Alexa.EqualizerController capability causing the problem since it doesn’t contain any supported configuration.

To help diagnose, customize the entity for the media player, and override the supported_features attribute to subtract 65536 from the value, 18828 should be the result for your Yamaha Receivers. Restart HA and then retry discovering devices. Report back if discovery worked.

Remove the customization when finished.

I did this for both my Yamaha & Denon and now Alexa can discovered them both as well as control them.

As petro said, I have the same problem for a few releases now. My denvon avr:

source_list: AUX, Blu-ray, Bluetooth, CBL/SAT, DVD/Blu-ray, Favorites, Game, Internet Radio, Media Player, Media Server, Online Music, Spotify, TV Audio, Tuner, iPod/USB
sound_mode_list: MUSIC, MOVIE, GAME, AUTO, STANDARD, VIRTUAL, MATRIX, ROCK ARENA, JAZZ CLUB, VIDEO GAME, MONO MOVIE, DIRECT, PURE DIRECT, DOLBY DIGITAL, DTS SURROUND, MCH STEREO, STEREO, ALL ZONE STEREO
friendly_name: Denon AVR-X1300W
supported_features: 85949