home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.81k stars 30.9k forks source link

HEOS Error setting up entry controller #23640

Closed eyannakis closed 5 years ago

eyannakis commented 5 years ago

Home Assistant release with the issue: 0.92.2

Last working Home Assistant release (if known): Got HEOS to work with 0.92.1, but it stopped working overnight. Updated to 0.92.2 but the problems persists.

Operating environment (Hass.io/Docker/Windows/etc.): Ubuntu with Hass.io

Component/platform: HEOS

Description of problem: Configured HEOS component yesterday using (Configuration --> Integrations) . It worked! All of my Heos components showed up (10 total). Not sure what happened overnight but all my heos media_player entities disappeared. So I decided to remove the components created by "integrations" add my component as a new entry in configuration.yaml.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

heos:
  host: 10.102.218.154

Traceback (if applicable):

Error setting up entry Controller (10.102.218.154) for heos
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/config_entries.py", line 309, in async_setup
    hass, self)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/heos/__init__.py", line 78, in async_setup_entry
    players = await controller.get_players()
  File "/usr/local/lib/python3.7/site-packages/pyheos/heos.py", line 120, in get_players
    await self.load_players()
  File "/usr/local/lib/python3.7/site-packages/pyheos/heos.py", line 111, in load_players
    players.values() if player.available])
  File "/usr/local/lib/python3.7/site-packages/pyheos/player.py", line 213, in refresh
    self.refresh_play_mode())
  File "/usr/local/lib/python3.7/site-packages/pyheos/player.py", line 222, in refresh_now_playing_media
    self._now_playing_media.from_data(payload)
  File "/usr/local/lib/python3.7/site-packages/pyheos/player.py", line 48, in from_data
    self._type = data['type']
KeyError: 'type'

Additional information: HEOS firmware on all devices is the latest 1.505.140

Telnet info

telnet> open 10.102.218.154 1255
Trying 10.102.218.154...
Connected to 10.102.218.154.
Escape character is '^]'.
heos://player/get_players
{"heos": {"command": "player/get_players", "result": "success", "message": ""}, "payload": [{"name": "HS_Kitchen", "pid": -39910240, "model": "HEOS Drive", "version": "1.505.140", "ip": "10.102.218.154", "network": "wired", "lineout": 1}, {"name": "HS_LivingRoom", "pid": -1315994374, "model": "HEOS Amp", "version": "1.505.140", "ip": "10.102.218.159", "network": "wired", "lineout": 0, "serial": "ABZ12170612484"}, {"name": "HS_MasterBedroom", "pid": -1093168160, "model": "Denon AVR-S730H", "version": "1.505.140", "ip": "10.102.218.83", "network": "wired", "lineout": 0, "serial": "ALY12170823073"}, {"name": "HS_Basement", "pid": -1500288744, "gid": 2134769675, "model": "HEOS Drive", "version": "1.505.140", "ip": "10.102.218.153", "network": "wired", "lineout": 1}, {"name": "HS_Attrium", "pid": -25986661, "model": "HEOS Drive", "version": "1.505.140", "ip": "10.102.218.151", "network": "wired", "lineout": 1}, {"name": "HS_FamilyRoom", "pid": -1200888214, "model": "HEOS Super Link", "version": "1.505.140", "ip": "10.102.218.157", "network": "wired", "lineout": 1}, {"name": "HS_HomeTheater", "pid": -1095325538, "model": "HEOS Super Link", "version": "1.505.140", "ip": "10.102.218.155", "network": "wired", "lineout": 2, "control": 4, "serial": "AWE12170900402"}, {"name": "HS_Backyard", "pid": -1937835455, "gid": 2134769675, "model": "HEOS Super Link", "version": "1.505.140", "ip": "10.102.218.158", "network": "wired", "lineout": 1}, {"name": "HS_Garage", "pid": 2134769675, "gid": 2134769675, "model": "HEOS Drive", "version": "1.505.140", "ip": "10.102.218.152", "network": "wired", "lineout": 1}, {"name": "HS_Office", "pid": -1872939096, "gid": 2134769675, "model": "HEOS Super Link", "version": "1.505.140", "ip": "10.102.218.156", "network": "wired", "lineout": 2, "control": 4}]}

Adding all the HEOS debug logs

2019-05-02 20:12:25 INFO (MainThread) [homeassistant.setup] Setting up heos
2019-05-02 20:12:25 INFO (MainThread) [homeassistant.setup] Setup of domain heos took 0.0 seconds.
2019-05-02 20:12:26 DEBUG (MainThread) [pyheos.connection] Executed command 'system/register_for_change_events': '{'command': 'system/register_for_change_events', 'result': 'success', 'message': 'sequence=0&enable=on'}'
2019-05-02 20:12:26 DEBUG (MainThread) [pyheos.connection] Connected to 10.102.218.154
2019-05-02 20:12:26 DEBUG (MainThread) [pyheos.connection] Executed command 'system/check_account': '{'command': 'system/check_account', 'result': 'success', 'message': 'signed_out'}'
2019-05-02 20:12:26 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_players': '{'command': 'player/get_players', 'result': 'success', 'message': ''}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_play_state': '{'command': 'player/get_play_state', 'result': 'success', 'message': 'pid=-39910240&state=stop'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_now_playing_media': '{'command': 'player/get_now_playing_media', 'result': 'success', 'message': 'sequence=4&pid=-39910240'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_volume': '{'command': 'player/get_volume', 'result': 'success', 'message': 'pid=-39910240&level=39'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_mute': '{'command': 'player/get_mute', 'result': 'success', 'message': 'pid=-39910240&state=off'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_play_mode': '{'command': 'player/get_play_mode', 'result': 'success', 'message': 'pid=-39910240&repeat=off&shuffle=off'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_play_state': '{'command': 'player/get_play_state', 'result': 'success', 'message': 'pid=-1315994374&state=stop'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_now_playing_media': '{'command': 'player/get_now_playing_media', 'result': 'success', 'message': 'sequence=9&pid=-1315994374'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_volume': '{'command': 'player/get_volume', 'result': 'success', 'message': 'pid=-1315994374&level=39'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_mute': '{'command': 'player/get_mute', 'result': 'success', 'message': 'pid=-1315994374&state=off'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_play_mode': '{'command': 'player/get_play_mode', 'result': 'success', 'message': 'pid=-1315994374&repeat=off&shuffle=off'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_play_state': '{'command': 'player/get_play_state', 'result': 'success', 'message': 'pid=-1093168160&state=stop'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_now_playing_media': '{'command': 'player/get_now_playing_media', 'result': 'success', 'message': 'sequence=14&pid=-1093168160'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_volume': '{'command': 'player/get_volume', 'result': 'success', 'message': 'pid=-1093168160&level=55'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_mute': '{'command': 'player/get_mute', 'result': 'success', 'message': 'pid=-1093168160&state=off'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_play_mode': '{'command': 'player/get_play_mode', 'result': 'success', 'message': 'pid=-1093168160&repeat=off&shuffle=off'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_play_state': '{'command': 'player/get_play_state', 'result': 'success', 'message': 'pid=-1500288744&state=stop'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_now_playing_media': '{'command': 'player/get_now_playing_media', 'result': 'success', 'message': 'sequence=19&pid=-1500288744'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_volume': '{'command': 'player/get_volume', 'result': 'success', 'message': 'pid=-1500288744&level=56'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_mute': '{'command': 'player/get_mute', 'result': 'success', 'message': 'pid=-1500288744&state=off'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_play_mode': '{'command': 'player/get_play_mode', 'result': 'success', 'message': 'pid=-1500288744&repeat=off&shuffle=off'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_play_state': '{'command': 'player/get_play_state', 'result': 'success', 'message': 'pid=-25986661&state=stop'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_now_playing_media': '{'command': 'player/get_now_playing_media', 'result': 'success', 'message': 'sequence=24&pid=-25986661'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_volume': '{'command': 'player/get_volume', 'result': 'success', 'message': 'pid=-25986661&level=39'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_mute': '{'command': 'player/get_mute', 'result': 'success', 'message': 'pid=-25986661&state=off'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_play_mode': '{'command': 'player/get_play_mode', 'result': 'success', 'message': 'pid=-25986661&repeat=on_all&shuffle=off'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_play_state': '{'command': 'player/get_play_state', 'result': 'success', 'message': 'pid=-1200888214&state=stop'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_now_playing_media': '{'command': 'player/get_now_playing_media', 'result': 'success', 'message': 'sequence=29&pid=-1200888214'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_volume': '{'command': 'player/get_volume', 'result': 'success', 'message': 'pid=-1200888214&level=40'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_mute': '{'command': 'player/get_mute', 'result': 'success', 'message': 'pid=-1200888214&state=off'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_play_mode': '{'command': 'player/get_play_mode', 'result': 'success', 'message': 'pid=-1200888214&repeat=off&shuffle=off'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_play_state': '{'command': 'player/get_play_state', 'result': 'success', 'message': 'pid=-1095325538&state=stop'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_now_playing_media': '{'command': 'player/get_now_playing_media', 'result': 'success', 'message': 'sequence=34&pid=-1095325538'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_volume': '{'command': 'player/get_volume', 'result': 'success', 'message': 'pid=-1095325538&level=52'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_mute': '{'command': 'player/get_mute', 'result': 'success', 'message': 'pid=-1095325538&state=off'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_play_mode': '{'command': 'player/get_play_mode', 'result': 'success', 'message': 'pid=-1095325538&repeat=off&shuffle=off'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_play_state': '{'command': 'player/get_play_state', 'result': 'success', 'message': 'pid=-1937835455&state=stop'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_now_playing_media': '{'command': 'player/get_now_playing_media', 'result': 'success', 'message': 'sequence=39&pid=-1937835455'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_volume': '{'command': 'player/get_volume', 'result': 'success', 'message': 'pid=-1937835455&level=56'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_mute': '{'command': 'player/get_mute', 'result': 'success', 'message': 'pid=-1937835455&state=off'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_play_mode': '{'command': 'player/get_play_mode', 'result': 'success', 'message': 'pid=-1937835455&repeat=off&shuffle=off'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_play_state': '{'command': 'player/get_play_state', 'result': 'success', 'message': 'pid=2134769675&state=stop'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_now_playing_media': '{'command': 'player/get_now_playing_media', 'result': 'success', 'message': 'sequence=44&pid=2134769675'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_volume': '{'command': 'player/get_volume', 'result': 'success', 'message': 'pid=2134769675&level=40'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_mute': '{'command': 'player/get_mute', 'result': 'success', 'message': 'pid=2134769675&state=off'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_play_mode': '{'command': 'player/get_play_mode', 'result': 'success', 'message': 'pid=2134769675&repeat=off&shuffle=off'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_play_state': '{'command': 'player/get_play_state', 'result': 'success', 'message': 'pid=-1872939096&state=stop'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_now_playing_media': '{'command': 'player/get_now_playing_media', 'result': 'success', 'message': 'sequence=49&pid=-1872939096'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_volume': '{'command': 'player/get_volume', 'result': 'success', 'message': 'pid=-1872939096&level=45'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_mute': '{'command': 'player/get_mute', 'result': 'success', 'message': 'pid=-1872939096&state=off'}'
2019-05-02 20:12:27 DEBUG (MainThread) [pyheos.connection] Executed command 'player/get_play_mode': '{'command': 'player/get_play_mode', 'result': 'success', 'message': 'pid=-1872939096&repeat=off&shuffle=off'}'
2019-05-02 20:12:27 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Controller (10.102.218.154) for heos
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/config_entries.py", line 309, in async_setup
    hass, self)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/heos/__init__.py", line 78, in async_setup_entry
    players = await controller.get_players()
  File "/usr/local/lib/python3.7/site-packages/pyheos/heos.py", line 120, in get_players
    await self.load_players()
  File "/usr/local/lib/python3.7/site-packages/pyheos/heos.py", line 111, in load_players
    players.values() if player.available])
  File "/usr/local/lib/python3.7/site-packages/pyheos/player.py", line 213, in refresh
    self.refresh_play_mode())
  File "/usr/local/lib/python3.7/site-packages/pyheos/player.py", line 222, in refresh_now_playing_media
    self._now_playing_media.from_data(payload)
  File "/usr/local/lib/python3.7/site-packages/pyheos/player.py", line 48, in from_data
    self._type = data['type']
KeyError: 'type'
2019-05-02 20:12:41 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:12:51 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:13:02 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:13:12 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:13:19 INFO (MainThread) [homeassistant.components.discovery] Unknown service discovered: spotify_connect {'host': '10.102.218.83', 'port': 80, 'hostname': 'HS-MasterBedroom.local.', 'properties': {'VERSION': '1.0', 'CPath': '/spotify'}}
2019-05-02 20:13:19 INFO (MainThread) [homeassistant.components.discovery] Unknown service discovered: spotify_connect {'host': '10.102.218.151', 'port': 80, 'hostname': 'HS-Attrium.local.', 'properties': {'VERSION': '1.0', 'CPath': '/spotify'}}
2019-05-02 20:13:19 INFO (MainThread) [homeassistant.components.discovery] Unknown service discovered: spotify_connect {'host': '10.102.218.159', 'port': 80, 'hostname': 'HS-LivingRoom.local.', 'properties': {'VERSION': '1.0', 'CPath': '/spotify'}}
2019-05-02 20:13:19 INFO (MainThread) [homeassistant.components.discovery] Unknown service discovered: spotify_connect {'host': '10.102.218.157', 'port': 80, 'hostname': 'HS-FamilyRoom.local.', 'properties': {'VERSION': '1.0', 'CPath': '/spotify'}}
2019-05-02 20:13:19 INFO (MainThread) [homeassistant.components.discovery] Unknown service discovered: spotify_connect {'host': '10.102.218.152', 'port': 80, 'hostname': 'HS-Garage.local.', 'properties': {'VERSION': '1.0', 'CPath': '/spotify'}}
2019-05-02 20:13:19 INFO (MainThread) [homeassistant.components.discovery] Unknown service discovered: spotify_connect {'host': '10.102.218.154', 'port': 80, 'hostname': 'HS-Kitchen.local.', 'properties': {'VERSION': '1.0', 'CPath': '/spotify'}}
2019-05-02 20:13:19 INFO (MainThread) [homeassistant.components.discovery] Unknown service discovered: spotify_connect {'host': '10.102.218.155', 'port': 80, 'hostname': 'HS-HomeTheater.local.', 'properties': {'VERSION': '1.0', 'CPath': '/spotify'}}
2019-05-02 20:13:19 INFO (MainThread) [homeassistant.components.discovery] Unknown service discovered: dlna_dms {'host': '10.102.218.152', 'port': 60006, 'ssdp_description': 'http://10.102.218.152:60006/upnp/desc/aios_device/aios_device.xml', 'name': 'HS_Garage', 'model_name': 'HEOS Drive', 'model_number': 'DWSA-10 3.0', 'serial': None, 'manufacturer': 'Denon', 'udn': 'uuid:e135e135-1cd1-1ba0-0080-0005cd547400', 'upnp_device_type': 'urn:schemas-denon-com:device:AiosDevice:1'}
2019-05-02 20:13:19 INFO (MainThread) [homeassistant.components.discovery] Unknown service discovered: dlna_dms {'host': '10.102.218.153', 'port': 60006, 'ssdp_description': 'http://10.102.218.153:60006/upnp/desc/aios_device/aios_device.xml', 'name': 'HS_Basement', 'model_name': 'HEOS Drive', 'model_number': 'DWSA-10 3.0', 'serial': None, 'manufacturer': 'Denon', 'udn': 'uuid:035810d2-16af-1289-0080-0005cd547450', 'upnp_device_type': 'urn:schemas-denon-com:device:AiosDevice:1'}
2019-05-02 20:13:19 INFO (MainThread) [homeassistant.components.discovery] Unknown service discovered: dlna_dms {'host': '10.102.218.154', 'port': 60006, 'ssdp_description': 'http://10.102.218.154:60006/upnp/desc/aios_device/aios_device.xml', 'name': 'HS_Kitchen', 'model_name': 'HEOS Drive', 'model_number': 'DWSA-10 3.0', 'serial': None, 'manufacturer': 'Denon', 'udn': 'uuid:e573310e-63a0-1e4d-0080-0005cd5473aa', 'upnp_device_type': 'urn:schemas-denon-com:device:AiosDevice:1'}
2019-05-02 20:13:19 INFO (MainThread) [homeassistant.components.discovery] Unknown service discovered: dlna_dms {'host': '10.102.218.155', 'port': 60006, 'ssdp_description': 'http://10.102.218.155:60006/upnp/desc/aios_device/aios_device.xml', 'name': 'HS_HomeTheater', 'model_name': 'HEOS Super Link', 'model_number': 'DWSP-10 4.0', 'serial': 'AWE12170900402', 'manufacturer': 'Denon', 'udn': 'uuid:b2e0d00c-3a49-1db8-0080-0005cd77e54c', 'upnp_device_type': 'urn:schemas-denon-com:device:AiosDevice:1'}
2019-05-02 20:13:19 INFO (MainThread) [homeassistant.components.discovery] Unknown service discovered: dlna_dms {'host': '10.102.218.156', 'port': 60006, 'ssdp_description': 'http://10.102.218.156:60006/upnp/desc/aios_device/aios_device.xml', 'name': 'HS_Office', 'model_name': 'HEOS Super Link', 'model_number': 'DWSP-10 4.0', 'serial': None, 'manufacturer': 'Denon', 'udn': 'uuid:8a6ac4bb-f171-1344-0080-0005cde21606', 'upnp_device_type': 'urn:schemas-denon-com:device:AiosDevice:1'}
2019-05-02 20:13:19 INFO (MainThread) [homeassistant.components.discovery] Unknown service discovered: dlna_dms {'host': '10.102.218.158', 'port': 60006, 'ssdp_description': 'http://10.102.218.158:60006/upnp/desc/aios_device/aios_device.xml', 'name': 'HS_Backyard', 'model_name': 'HEOS Super Link', 'model_number': 'DWSP-10 4.0', 'serial': None, 'manufacturer': 'Denon', 'udn': 'uuid:0bdb981c-f0ed-1f5f-0080-0005cde2503e', 'upnp_device_type': 'urn:schemas-denon-com:device:AiosDevice:1'}
2019-05-02 20:13:19 INFO (MainThread) [homeassistant.components.discovery] Unknown service discovered: dlna_dms {'host': '10.102.218.159', 'port': 60006, 'ssdp_description': 'http://10.102.218.159:60006/upnp/desc/aios_device/aios_device.xml', 'name': 'HS_LivingRoom', 'model_name': 'HEOS Amp', 'model_number': 'DWA-200 4.0', 'serial': 'ABZ12170612484', 'manufacturer': 'Denon', 'udn': 'uuid:19ea0c96-7ffa-1338-0080-0005cde41bda', 'upnp_device_type': 'urn:schemas-denon-com:device:AiosDevice:1'}
2019-05-02 20:13:19 INFO (MainThread) [homeassistant.components.discovery] Unknown service discovered: dlna_dms {'host': '10.102.218.230', 'port': 50001, 'ssdp_description': 'http://10.102.218.230:50001/desc/device.xml', 'name': 'homenas01', 'model_name': 'DS1817+', 'model_number': None, 'serial': '1840PWN305100', 'manufacturer': 'Synology Inc', 'udn': 'uuid:0011328d-6433-0011-3364-33648d321100', 'upnp_device_type': 'urn:schemas-upnp-org:device:MediaServer:1'}
2019-05-02 20:13:19 INFO (MainThread) [homeassistant.components.discovery] Unknown service discovered: dlna_dms {'host': '10.102.218.230', 'port': 9002, 'ssdp_description': 'http://10.102.218.230:9002/plugins/UPnP/MediaServer.xml', 'name': 'Logitech Media Server [homenas01]', 'model_name': 'Logitech Media Server 7.7.61452060463', 'model_number': '1', 'serial': '106173c8-c959-4d02-8dd4-04a86cae65bb', 'manufacturer': 'Logitech', 'udn': 'uuid:FB70812C-C959-4D02-8DD4-04A86CAE65BB', 'upnp_device_type': 'urn:schemas-upnp-org:device:MediaServer:1'}
2019-05-02 20:13:19 INFO (MainThread) [homeassistant.components.discovery] Unknown service discovered: dlna_dms {'host': '10.102.218.83', 'port': 60006, 'ssdp_description': 'http://10.102.218.83:60006/upnp/desc/aios_device/aios_device.xml', 'name': 'HS_MasterBedroom', 'model_name': 'Denon AVR-S730H', 'model_number': 'Aios 4.025', 'serial': 'ALY12170823073', 'manufacturer': 'Denon', 'udn': 'uuid:edd79498-3cb1-1d14-0080-0005cdea249e', 'upnp_device_type': 'urn:schemas-denon-com:device:AiosDevice:1'}
2019-05-02 20:13:19 INFO (MainThread) [homeassistant.components.discovery] Unknown service discovered: dlna_dmr {'host': '10.102.218.151', 'port': 60006, 'ssdp_description': 'http://10.102.218.151:60006/upnp/desc/aios_device/aios_device.xml', 'name': 'HS_Attrium', 'model_name': 'HEOS Drive', 'model_number': 'DWSA-10 3.0', 'serial': None, 'manufacturer': 'Denon', 'udn': 'uuid:8ca8fb8e-5582-17eb-0080-0005cd548074', 'upnp_device_type': 'urn:schemas-denon-com:device:AiosDevice:1'}
2019-05-02 20:13:19 INFO (MainThread) [homeassistant.components.discovery] Unknown service discovered: dlna_dmr {'host': '10.102.218.152', 'port': 60006, 'ssdp_description': 'http://10.102.218.152:60006/upnp/desc/aios_device/aios_device.xml', 'name': 'HS_Garage', 'model_name': 'HEOS Drive', 'model_number': 'DWSA-10 3.0', 'serial': None, 'manufacturer': 'Denon', 'udn': 'uuid:e135e135-1cd1-1ba0-0080-0005cd547400', 'upnp_device_type': 'urn:schemas-denon-com:device:AiosDevice:1'}
2019-05-02 20:13:19 INFO (MainThread) [homeassistant.components.discovery] Unknown service discovered: dlna_dmr {'host': '10.102.218.153', 'port': 60006, 'ssdp_description': 'http://10.102.218.153:60006/upnp/desc/aios_device/aios_device.xml', 'name': 'HS_Basement', 'model_name': 'HEOS Drive', 'model_number': 'DWSA-10 3.0', 'serial': None, 'manufacturer': 'Denon', 'udn': 'uuid:035810d2-16af-1289-0080-0005cd547450', 'upnp_device_type': 'urn:schemas-denon-com:device:AiosDevice:1'}
2019-05-02 20:13:19 INFO (MainThread) [homeassistant.components.discovery] Unknown service discovered: dlna_dmr {'host': '10.102.218.154', 'port': 60006, 'ssdp_description': 'http://10.102.218.154:60006/upnp/desc/aios_device/aios_device.xml', 'name': 'HS_Kitchen', 'model_name': 'HEOS Drive', 'model_number': 'DWSA-10 3.0', 'serial': None, 'manufacturer': 'Denon', 'udn': 'uuid:e573310e-63a0-1e4d-0080-0005cd5473aa', 'upnp_device_type': 'urn:schemas-denon-com:device:AiosDevice:1'}
2019-05-02 20:13:19 INFO (MainThread) [homeassistant.components.discovery] Unknown service discovered: dlna_dmr {'host': '10.102.218.155', 'port': 60006, 'ssdp_description': 'http://10.102.218.155:60006/upnp/desc/aios_device/aios_device.xml', 'name': 'HS_HomeTheater', 'model_name': 'HEOS Super Link', 'model_number': 'DWSP-10 4.0', 'serial': 'AWE12170900402', 'manufacturer': 'Denon', 'udn': 'uuid:b2e0d00c-3a49-1db8-0080-0005cd77e54c', 'upnp_device_type': 'urn:schemas-denon-com:device:AiosDevice:1'}
2019-05-02 20:13:19 INFO (MainThread) [homeassistant.components.discovery] Unknown service discovered: dlna_dmr {'host': '10.102.218.156', 'port': 60006, 'ssdp_description': 'http://10.102.218.156:60006/upnp/desc/aios_device/aios_device.xml', 'name': 'HS_Office', 'model_name': 'HEOS Super Link', 'model_number': 'DWSP-10 4.0', 'serial': None, 'manufacturer': 'Denon', 'udn': 'uuid:8a6ac4bb-f171-1344-0080-0005cde21606', 'upnp_device_type': 'urn:schemas-denon-com:device:AiosDevice:1'}
2019-05-02 20:13:19 INFO (MainThread) [homeassistant.components.discovery] Unknown service discovered: dlna_dmr {'host': '10.102.218.157', 'port': 60006, 'ssdp_description': 'http://10.102.218.157:60006/upnp/desc/aios_device/aios_device.xml', 'name': 'HS_FamilyRoom', 'model_name': 'HEOS Super Link', 'model_number': 'DWSP-10 4.0', 'serial': None, 'manufacturer': 'Denon', 'udn': 'uuid:a3f90177-7106-108b-0080-0005cde4053e', 'upnp_device_type': 'urn:schemas-denon-com:device:AiosDevice:1'}
2019-05-02 20:13:19 INFO (MainThread) [homeassistant.components.discovery] Unknown service discovered: dlna_dmr {'host': '10.102.218.158', 'port': 60006, 'ssdp_description': 'http://10.102.218.158:60006/upnp/desc/aios_device/aios_device.xml', 'name': 'HS_Backyard', 'model_name': 'HEOS Super Link', 'model_number': 'DWSP-10 4.0', 'serial': None, 'manufacturer': 'Denon', 'udn': 'uuid:0bdb981c-f0ed-1f5f-0080-0005cde2503e', 'upnp_device_type': 'urn:schemas-denon-com:device:AiosDevice:1'}
2019-05-02 20:13:19 INFO (MainThread) [homeassistant.components.discovery] Unknown service discovered: dlna_dmr {'host': '10.102.218.159', 'port': 60006, 'ssdp_description': 'http://10.102.218.159:60006/upnp/desc/aios_device/aios_device.xml', 'name': 'HS_LivingRoom', 'model_name': 'HEOS Amp', 'model_number': 'DWA-200 4.0', 'serial': 'ABZ12170612484', 'manufacturer': 'Denon', 'udn': 'uuid:19ea0c96-7ffa-1338-0080-0005cde41bda', 'upnp_device_type': 'urn:schemas-denon-com:device:AiosDevice:1'}
2019-05-02 20:13:22 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:13:32 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:13:42 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:13:52 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:14:02 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:14:12 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:14:22 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:14:32 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:14:42 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:14:52 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:15:02 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:15:12 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:15:22 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:15:32 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:15:42 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:15:53 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:16:03 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:16:13 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:16:23 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:16:33 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:16:43 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:16:53 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:17:03 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:17:13 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:17:23 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:17:33 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:17:43 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:17:53 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:18:03 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:18:13 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:18:23 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:18:33 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:18:37 INFO (MainThread) [homeassistant.components.discovery] Unknown service discovered: dlna_dms {'host': '10.102.218.151', 'port': 60006, 'ssdp_description': 'http://10.102.218.151:60006/upnp/desc/aios_device/aios_device.xml', 'name': 'HS_Attrium', 'model_name': 'HEOS Drive', 'model_number': 'DWSA-10 3.0', 'serial': None, 'manufacturer': 'Denon', 'udn': 'uuid:8ca8fb8e-5582-17eb-0080-0005cd548074', 'upnp_device_type': 'urn:schemas-denon-com:device:AiosDevice:1'}
2019-05-02 20:18:37 INFO (MainThread) [homeassistant.components.discovery] Unknown service discovered: dlna_dms {'host': '10.102.218.157', 'port': 60006, 'ssdp_description': 'http://10.102.218.157:60006/upnp/desc/aios_device/aios_device.xml', 'name': 'HS_FamilyRoom', 'model_name': 'HEOS Super Link', 'model_number': 'DWSP-10 4.0', 'serial': None, 'manufacturer': 'Denon', 'udn': 'uuid:a3f90177-7106-108b-0080-0005cde4053e', 'upnp_device_type': 'urn:schemas-denon-com:device:AiosDevice:1'}
2019-05-02 20:18:43 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:18:53 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:19:03 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:19:13 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:19:23 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:19:33 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:19:43 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:19:53 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:20:03 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:20:13 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:20:23 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:20:33 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:20:44 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:20:54 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:21:04 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:21:14 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:21:24 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:21:34 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:21:44 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:21:54 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:22:04 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:22:14 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:22:24 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:22:34 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:22:44 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:22:54 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:23:04 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:23:14 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:23:24 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
2019-05-02 20:23:34 DEBUG (MainThread) [pyheos.connection] Executed command 'system/heart_beat': '{'command': 'system/heart_beat', 'result': 'success', 'message': ''}'
andrewsayre commented 5 years ago

It looks like the issue is in the player/get_now_playing_media command. type describes what is playing and should always be populated according to the spec (even if nothing is playing -- it should be blank). I bet if you start playing music or change the source to something else on HS_Office, this problem goes away.

While the problem is occurring, can you telnet this command paste the output? heos://player/get_now_playing_media?pid=-1872939096

eyannakis commented 5 years ago

As requested, this is the telnet output with the condition present.

heos://player/get_now_playing_media?pid=-1872939096
{"heos": {"command": "player/get_now_playing_media", "result": "success", "message": "pid=-1872939096"}, "payload": {"type": "station", "song": "Chromecast", "station": "Chromecast", "album": "", "artist": "", "image_url": "", "album_id": "inputs/", "mid": "inputs/optical_in_1", "qid": 1, "sid": 1027, "gid": 2134769675}, "options": []}

Following your intuition, I'm currently playing music on HS_Office and ran the telnet command again, the output is know:

heos://player/get_now_playing_media?pid=-1872939096
{"heos": {"command": "player/get_now_playing_media", "result": "success", "message": "pid=-1872939096"}, "payload": {"type": "station", "song": "1999 ft. Troye Sivan", "station": "95.9 Virgin Radio", "album": "", "artist": "Charli XCX", "image_url": "http://cdn-profiles.tunein.com/s31213/images/logoq.png?t=155377", "album_id": "s31213", "mid": "http://playerservices.streamtheworld.com/pls/CJFMFMAAC.pls?DIST=TuneIn&TGT=TuneIn&maxServers=2&tdtok=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImtpZCI6ImZTeXA4In0.eyJpc3MiOiJ0aXNydiIsInN1YiI6IjIxMDY0IiwiaWF0IjoxNTU2ODU0OTY3LCJ0ZC1yZWciOmZhbHNlfQ.Rw-vuRz_IuVk7Cw", "qid": 1, "sid": 3}, "options": [{"play": [{"id": 19, "name": "Add to HEOS Favorites"}]}]}
andrewsayre commented 5 years ago

Hmm, there's nothing wrong with the payloads you posted. Are you still having the issue in HA? Perhaps I grabbed the wrong player ID...

Can you run it for the other player IDs and post if one doesn't have "type": in the response?

Sorry it may be a tad tedious... I want to make sure we find the payload that's being returned without type because there may be other missing elements I need to account for.

eyannakis commented 5 years ago

No worries... Thank you for getting this component out!

So I think we're on to something here... Out of the 10 players there is 1 that doesn't have a "type:" in the response. Is the HS_FamilyRoom.

This particular zone is running out from HEOS Super Link, connected to the inputs of a Yamaha receiver. Now, because the HEOS app cannot control the Yamaha receiver (like other Denon receivers) it might be acting weird.

I will check on my end if I can change the configuration on that specific player, in the meantime, here is the telnet output

heos://player/get_now_playing_media?pid=-1200888214
{"heos": {"command": "player/get_now_playing_media", "result": "success", "message": "pid=-1200888214"}, "payload": {}, "options": []}
andrewsayre commented 5 years ago

Thanks - it's odd the entire payload is empty "payload": {}. I will update the library to handle this case, but then you won't see the now playing information. I have also asked Denon to take a look at this issue.