Windows > Third Party Plug-ins, Programs, and Skins

Home Assistant integration for jriver

<< < (8/29) > >>

mattkhan:
latest build has the above change, had to refactor a number of things so some chance of side effects, seems ok in my setup though

hoyt:

--- Quote from: mattkhan on February 12, 2024, 02:35:01 pm ---latest build has the above change, had to refactor a number of things so some chance of side effects, seems ok in my setup though

--- End quote ---

I took the latest build, it resolved the issue with hamcws dependencies, so that's great! I am still seeing the player flipping to Unavailable somewhat regularly. I do see more in the logs though, so perhaps this will help:


--- Code: ---This error originated from a custom integration.

Logger: custom_components.jriver.coordinator
Source: helpers/update_coordinator.py:313
Integration: JRiver Media Center (documentation, issues)
First occurred: 11:38:30 AM (8 occurrences)
Last logged: 12:43:39 PM

Unexpected error fetching jriver data: unhandled errors in a TaskGroup (1 sub-exception)
  + Exception Group Traceback (most recent call last):
  |   File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 313, in _async_refresh
  |     self.data = await self._async_update_data()
  |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/config/custom_components/jriver/coordinator.py", line 142, in _async_update_data
  |     async with asyncio.TaskGroup() as tg:
  |   File "/usr/local/lib/python3.12/asyncio/taskgroups.py", line 145, in __aexit__
  |     raise me from None
  | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "/usr/local/lib/python3.12/site-packages/hamcws/hamcws.py", line 527, in get_playback_info
    |     ok, resp = await self._conn.get_as_dict("Playback/Info", params=params)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/usr/local/lib/python3.12/site-packages/hamcws/hamcws.py", line 380, in get_as_dict
    |     return await _get(self._session, self.get_mcws_url(path), _to_dict, lambda r: r.text(), params,
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/usr/local/lib/python3.12/site-packages/hamcws/hamcws.py", line 315, in _get
    |     async with session.get(url, params=params, timeout=timeout, auth=auth) as resp:
    |   File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 1194, in __aenter__
    |     self._resp = await self._coro
    |                  ^^^^^^^^^^^^^^^^
    |   File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 605, in _request
    |     await resp.start(conn)
    |   File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 961, in start
    |     with self._timer:
    |   File "/usr/local/lib/python3.12/site-packages/aiohttp/helpers.py", line 735, in __exit__
    |     raise asyncio.TimeoutError from None
    | TimeoutError
    +------------------------------------

--- End code ---

It looks like this popped up in the logs 7 seconds after the player went unavailable.

Nevermind, at the same time, then again.


--- Code: ---2024-02-12 12:43:32.511 ERROR (MainThread) [custom_components.jriver.coordinator] Unexpected error fetching jriver data: unhandled errors in a TaskGroup (1 sub-exception)
--- End code ---


--- Code: ---serv01b - House Speakers (dlna)  became unavailable
12:43:32 PM - 26 minutes ago
--- End code ---

mattkhan:
The error just says the call to MCWS timed out, ie MC doesn't respond. The timeout is 5s which is a pretty long time so I guess it suggests either a network issue or a problem in MC. Anything in MC logs?

I could add some tolerance to this, like give it a few retries before falling or make the timeout longer though that may have other side effects.

mattkhan:
btw the other key point is how long it takes to recover, I think the ideal solution for working around that will vary on whether it's a brief hiccup or a prolonged one

mattkhan:
in my case, the flickering is in https://github.com/kalkih/mini-media-player and really seems like a bug in HA itself (when fresh data arrives, if the media player position hasn't updated then it tells the frontend that there's no such field so the component above reacts by removing the progress bar). I have made a change that avoids that in the latest build (0.2.2).

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version