home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.77k stars 30.88k forks source link

Squeezebox Radio not working #80942

Closed dminninger-devk closed 1 year ago

dminninger-devk commented 2 years ago

The problem

I had 2 Issues:

1) Squeezebox Radio was not found by SlimProto.

When I navigated to "My Music" on the Radio I got "Connecting to homeassistant" followed by "Problem Connecting". But now there is 1 Device in SlimProto. So something worked.

Now we get to Issue 2) I can not control Radio. I only get to the "Problem connecting"-Screen on Radio. Full Text: "We couldn't connect to homeassistant. Make sure your computer is turned on and connected to your local network, and that Logitech Media Server is currently running" And I got 2 choices "Try again" and "switch library". Those two choices lead to the same "Problem Connecting" error. I tried to control the Radio with the Media Controls in HA but to no avail. Power on/off, un/mute, Volume up/down won't work.

What version of Home Assistant Core has the issue?

core-2022.10.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

slimproto

Link to integration documentation on our website

https://www.home-assistant.io/integrations/slimproto

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

I have 3 Log Entries regarding slimproto.
# 1 #################################
Logger: homeassistant
Source: /usr/src/homeassistant/homeassistant/runner.py:96
First occurred: October 24, 2022 at 8:45:28 PM (11322 occurrences)
Last logged: 12:28:48 PM

Error doing job: Exception in callback SlimClient._process_stat_stmt(b'\x00\x00\x0...0\x00\x00\x00')
Error doing job: Exception in callback SlimClient._process_stat_stmt(b"\x00\x00\x0...0\x00\x00\x00")
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/local/lib/python3.10/site-packages/aioslimproto/client.py", line 580, in _process_stat_stmt
    ) = struct.unpack("!BBBLLLLHLLLLHLLH", data)
struct.error: unpack requires a buffer of 49 bytes

# 2 #################################
Logger: homeassistant
Source: /usr/src/homeassistant/homeassistant/runner.py:96
First occurred: October 24, 2022 at 8:45:28 PM (13 occurrences)
Last logged: 12:25:38 PM

Error doing job: Exception in callback SlimClient._process_stat_aude(b'\x00\x00\x0...0\x00\x00\x00')
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/local/lib/python3.10/site-packages/aioslimproto/client.py", line 504, in _process_stat_aude
    (spdif_enable, dac_enable) = struct.unpack("2B", data[:4])
struct.error: unpack requires a buffer of 2 bytes

# 3 #############################
Logger: homeassistant.components.websocket_api.http.connection
Source: components/slimproto/media_player.py:167
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 12:16:05 PM (2 occurrences)
Last logged: 12:16:07 PM

[140277278275328] can't set attribute 'muted'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 202, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1738, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1775, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 207, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 678, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 931, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 715, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/slimproto/media_player.py", line 167, in async_mute_volume
    await self.player.mute(mute)
  File "/usr/local/lib/python3.10/site-packages/aioslimproto/client.py", line 287, in mute
    self.muted = muted
AttributeError: can't set attribute 'muted'

Additional information

No response

home-assistant[bot] commented 2 years ago

Hey there @marcelveldt, mind taking a look at this issue as it has been labeled with an integration (slimproto) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `slimproto` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Change the title of the issue. - `@home-assistant unassign slimproto` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


slimproto documentation slimproto source (message by IssueLinks)

marcelveldt commented 2 years ago

I'm working on this. Seems to be depending on firmware version and the code needs to be adjusted to handle a few more use cases as the slim-foto is sometimes implemented a bit freely with differences between hardware devices.

acfnews commented 1 year ago

Hi Guys, having the same issue with HA 2023_01_07 in Docker. Is there anything I can be of use for to have this fixed?

issue-triage-workflows[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

dminninger-devk commented 1 year ago

I've seen this Issue https://github.com/home-assistant-libs/aioslimproto/issues/50 where you fixed the issue regarding SB Radio. But the new lib is not referenced in home assistant (https://github.com/home-assistant/core/blob/dev/homeassistant/components/slimproto/manifest.json#L9). Can you give a rough estimate when the new lib is going to be used?