Error with Denon

I am recieveing the following error when trying to connect with the Denon platform:

16-11-02 10:46:00 homeassistant.components.media_player: Error while setting up platform denon
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 151, in _async_setup_platform
    entity_platform.add_entities, discovery_info
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/media_player/denon.py", line 38, in setup_platform
    if denon.update():
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/media_player/denon.py", line 83, in update
    self._volume = int(volume_str) / 60
ValueError: invalid literal for int() with base 10: 'ON'

I’ve seen this too on occasion. I think you can ignore this error.
For some reason, using the telnet interface, the Denon’s response to a volume change is not the value of the new volume (e.g. “33”) but some other seemingly random messages - in your case “ON”.
The component expects a number which it tries to divide by 60 - which obviously fails if there is no number.

I’d suggest you try this component instead:
https://community.home-assistant.io/t/improved-denon-marantz-avr-component/2936

Sebastian

Thanks! Works perfectly