Closed rbr101 closed 3 months ago
Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (media_player
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
media_player documentation media_player source (message by IssueLinks)
@pssc Why did we use rxv.find() when the host is known? I see that we now also suppress an AttributeError, but is there a reason for that?
@pssc Why did we use rxv.find() when the host is known? I see that we now also suppress an AttributeError, but is there a reason for that?
@joostlek Serial number is only available from the discovery info from find and not from queuing the endpoint unfortunately, so to generate a good uid we use that in preference and then fall back as not all receivers will support discovery, I suspect that this catching of attr error is masking a bug in the underlying lib but it wast my patch and not enough detail was supplied in the pr to look into it further
Okay but can we fix this bug? Otherwise I think reverting would be the best option for now. Ideally we'd use the built in SSDP discovery in HA with a config flow
I added the suppress attribute error to support my Yamaha receivers. I have 2 dev builds and 1 production system. The error only occurred on the production system, so I suppressed it to return the integration to its previous behavior on setup. It's a band aide because we can't really fix rxv without the repo owner responding and he usually doesn't respond to PRs for months/years.
@joostlek yes sure we can fix this sorry just got all the context that will teach me to look from a mobile device this is a different bug from @Petro31's probably in a similar manner
@joostlek I would embark on a rewrite but given most this HW is over a decade old now... this integration probably has a somewhat limited lifespan
I mean, if we don't expect it to stop working anytime soon we can just make it feature complete with the newest features and just have it in a maintenance phase
so looking at this a bit more it looks like broken Unicode/Text supplied by the device and then the supporting lib then blows up.
2024-08-10 12:27:52.047 ERROR (MainThread) [homeassistant.components.media_player] Error while setting up yamaha platform for media_player Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform await asyncio.shield(awaitable) File "/config/custom_components/yamaha/media_player.py", line 167, in async_setup_platform zone_ctrls = await hass.async_add_executor_job(_discovery, config_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/yamaha/media_player.py", line 136, in _discovery for recv in rxv.find(): ^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/rxv/__init__.py", line 19, in find return [RXV(**ri._asdict()) for ri in ssdp.discover(timeout=timeout)] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/rxv/ssdp.py", line 72, in discover res = rxv_details(url) ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/rxv/ssdp.py", line 83, in rxv_details res = cElementTree.XML(requests.get(location).content) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/defusedxml/common.py", line 126, in fromstring parser.feed(text) File "/usr/local/lib/python3.12/xml/etree/ElementTree.py", line 1706, in feed self.parser.Parse(data, False) ValueError: multi-byte encodings are not supported
Still got issues
ValueError
Ok added value error @quadflight see how you go
ValueError
Ok added value error @quadflight see how you go
Yep. That worked. Thank you for giving back my weekend !
@quadflight Sorry for borking it out of interest do you get a serial/unique_id or is it still unavailable?
@quadflight Sorry for borking it out of interest do you get a serial/unique_id or is it still unavailable?
No UID
@quadflight :-( suspected that might be the case
Heya,
I also recently upgraded to the latest version and my Yamaha integration died. I was only able to capture this error before I rolled back to the previous version (2024.1)
Logger: homeassistant.components.media_player
Source: helpers/entity_platform.py:408
integration: Media player (documentation, issues)
First occurred: 12:44:04 AM (1 occurrences)
Last logged: 12:44:04 AM
Setup of platform yamaha is taking longer than 60 seconds. Startup will proceed without waiting any longer.
Does this fix address this problem? Thanks!
@avwuff without seeing a debug log maybe...
The problem
The yahama integration is broken after upgrade to 2024.8.0, it was working fine until I upgraded.
What version of Home Assistant Core has the issue?
core-2024.8.0
What was the last working version of Home Assistant Core?
core-2024.7.3
What type of installation are you running?
Home Assistant OS
Integration causing the issue
yamaha
Link to integration documentation on our website
https://www.home-assistant.io/integrations/yamaha
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response