StevenLooman / home-assistant-dlna-dmr

DLNA/DMR component for home-assistant
Other
14 stars 1 forks source link

Error during discovery #14

Open bithajcsar opened 3 years ago

bithajcsar commented 3 years ago

Hi,

I enabled the DLNA DMR discovery as proposed. After that I got a lot of messages below in the core log:

2021-01-04 16:44:00 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 619, in _update_entity_states
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 283, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 322, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 841, in state_attributes
    value = getattr(self, attr)
  File "/usr/src/homeassistant/homeassistant/components/dlna_dmr/media_player.py", line 284, in volume_level
    return self._device.volume_level
  File "/usr/local/lib/python3.8/site-packages/async_upnp_client/profiles/dlna.py", line 400, in volume_level
    return self._level('Volume')
  File "/usr/local/lib/python3.8/site-packages/async_upnp_client/profiles/dlna.py", line 303, in _level
    raise UpnpError('Missing StateVariable RC/%s' % (var_name, ))
async_upnp_client.client.UpnpError: Missing StateVariable RC/Volume

It seems that discovery doesn't work, no devices found. Thanks in advance for support!

StevenLooman commented 3 years ago

Hi @bithajcsar,

Thank you for the issue. From the looks of it, it seems that a device is found, but the device does not fully implement the DLNA/DMR standard. It seems to be missing the Volume "variable" which is used to determine the volume level.

If you want, we can further investigate. It will require you to run some commands from your home assistant installation and/or enable logging information in home assistant. Then, when we have the information, you'll have to download some files from your device. I'll look at those files to determine what is missing.

Best regards,

Steven