miracle2k / onkyo-eiscp

Control Onkyo A/V receivers over the network; usuable as a script, or as a Python library.
MIT License
466 stars 110 forks source link

Socket Errors in latest Home Assistant usage #147

Open shbatm opened 1 year ago

shbatm commented 1 year ago

Linking an issue here, as I don't know if anyone is tagged as a code owner on Home Assistant for Onkyo and it uses this package.

Using Home Assistant version 2023.5.0 results in socket errors in the eiscip package.

https://github.com/home-assistant/core/issues/92134

2023-04-27 13:27:21.136 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.game_room_receiver fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 554, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 784, in async_device_update
    await coro
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/onkyo/media_player.py", line 295, in update
    status = self.command("system-power query")
  File "/usr/src/homeassistant/homeassistant/components/onkyo/media_player.py", line 282, in command
    result = self._receiver.command(command)
  File "/usr/local/lib/python3.10/site-packages/eiscp/core.py", line 480, in command
    response = self.raw(iscp_message)
  File "/usr/local/lib/python3.10/site-packages/eiscp/core.py", line 470, in raw
    return filter_for_message(self.get, iscp_message)
  File "/usr/local/lib/python3.10/site-packages/eiscp/core.py", line 260, in filter_for_message
    candidate = getter_func(0.05)
  File "/usr/local/lib/python3.10/site-packages/eiscp/core.py", line 443, in get
    ready = select.select([self.command_socket], [], [], timeout or 0)
TypeError: argument must be an int, or have a fileno() method.