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
71.8k stars 30.06k forks source link

Arcam Error Messages #115416

Closed kernelpanic85 closed 4 months ago

kernelpanic85 commented 5 months ago

The problem

I noticed I am received thousands of Arcam error messages in the logs for my JBL SDP-58 (Arcam AV41 clone). As far as I can tell, despite the errors, the media_player entities are fully functional and report all the accurate info when it's powered on.

What version of Home Assistant Core has the issue?

core-2024.3.3

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

arcam_fmj

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: arcam.fmj.state
Source: runner.py:188
First occurred: April 10, 2024 at 7:51:55 PM (1472 occurrences)
Last logged: 2:33:57 AM

Timeout requesting 20
Timeout requesting 16
Timeout requesting 67
Timeout requesting 24
Timeout requesting 0

Logger: arcam.fmj.utils
Source: runner.py:188
First occurred: April 10, 2024 at 7:51:52 PM (2633 occurrences)
Last logged: 2:33:55 AM

Retrying: <function Client.request_raw at 0x4822c988> (<arcam.fmj.client.Client object at 0x49c7f198>, CommandPacket(zn=2, cc=<CommandCodes.MENU: 20>, data=b'\xf0'))
Retrying: <function Client.request_raw at 0x4822c988> (<arcam.fmj.client.Client object at 0x49c7f198>, CommandPacket(zn=2, cc=<CommandCodes.DECODE_MODE_STATUS_2CH: 16>, data=b'\xf0'))
Retrying: <function Client.request_raw at 0x4822c988> (<arcam.fmj.client.Client object at 0x49c7f198>, CommandPacket(zn=2, cc=<CommandCodes.DECODE_MODE_STATUS_MCH: 17>, data=b'\xf0'))
Retrying: <function Client.request_raw at 0x4822c988> (<arcam.fmj.client.Client object at 0x49c7f198>, CommandPacket(zn=2, cc=<CommandCodes.INCOMING_AUDIO_FORMAT: 67>, data=b'\xf0'))
Retrying: <function Client.request_raw at 0x4822c988> (<arcam.fmj.client.Client object at 0x49c7f198>, CommandPacket(zn=2, cc=<CommandCodes.TUNER_PRESET: 21>, data=b'\xf0'))

Additional information

No response

home-assistant[bot] commented 5 months ago

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

Code owner commands Code owners of `arcam_fmj` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign arcam_fmj` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


arcam_fmj documentation arcam_fmj source (message by IssueLinks)

afnieves commented 5 months ago

I have an ARCAM AV41 and I am getting a ton of errors as well.

2024-04-17 21:27:00.296 WARNING (MainThread) [arcam.fmj.utils] Retrying: <function Client.request_raw at 0x7f87a45eb7e0> (<arcam.fmj.client.Client object at 0x7f87a4610890>, CommandPacket(zn=1, cc=<CommandCodes.SIMULATE_RC5_IR_COMMAND: 8>, data=b'\x10\x1a'))
2024-04-17 21:27:03.298 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140219683474496] 
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/asyncio/tasks.py", line 520, in wait_for
    return await fut
           ^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/arcam/fmj/client.py", line 169, in req
    return await future
           ^^^^^^^^^^^^
asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 239, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2543, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2580, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 971, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1043, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/arcam_fmj/media_player.py", line 75, in _convert_exception
    return await func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/arcam_fmj/media_player.py", line 175, in async_mute_volume
    await self._state.set_mute(mute)
  File "/usr/local/lib/python3.12/site-packages/arcam/fmj/state.py", line 254, in set_mute
    await self._client.request(
  File "/usr/local/lib/python3.12/site-packages/arcam/fmj/client.py", line 184, in request
    response = await self.request_raw(CommandPacket(zn, cc, data))
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/arcam/fmj/utils.py", line 21, in wrapper
    return await f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/arcam/fmj/client.py", line 171, in request_raw
    return await asyncio.wait_for(
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/tasks.py", line 519, in wait_for
    async with timeouts.timeout(timeout):
  File "/usr/local/lib/python3.12/asyncio/timeouts.py", line 115, in __aexit__
    raise TimeoutError from exc_val
TimeoutError
2024-04-17 21:27:25.675 WARNING (MainThread) [arcam.fmj.utils] Retrying: <function Client.request_raw at 0x7f87a45eb7e0> (<arcam.fmj.client.Client object at 0x7f87a4610890>, CommandPacket(zn=1, cc=<CommandCodes.SIMULATE_RC5_IR_COMMAND: 8>, data=b'\x10x'))
2024-04-17 21:27:28.678 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140219683474496] 
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/asyncio/tasks.py", line 520, in wait_for
    return await fut
           ^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/arcam/fmj/client.py", line 169, in req
    return await future
           ^^^^^^^^^^^^
asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 239, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2543, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2580, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 971, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1043, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/arcam_fmj/media_player.py", line 75, in _convert_exception
    return await func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/arcam_fmj/media_player.py", line 175, in async_mute_volume
    await self._state.set_mute(mute)
  File "/usr/local/lib/python3.12/site-packages/arcam/fmj/state.py", line 254, in set_mute
    await self._client.request(
  File "/usr/local/lib/python3.12/site-packages/arcam/fmj/client.py", line 184, in request
    response = await self.request_raw(CommandPacket(zn, cc, data))
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/arcam/fmj/utils.py", line 21, in wrapper
    return await f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/arcam/fmj/client.py", line 171, in request_raw
    return await asyncio.wait_for(
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/tasks.py", line 519, in wait_for
    async with timeouts.timeout(timeout):
  File "/usr/local/lib/python3.12/asyncio/timeouts.py", line 115, in __aexit__
    raise TimeoutError from exc_val
TimeoutError
  File "/usr/local/lib/python3.12/asyncio/tasks.py", line 519, in wait_for
    async with timeouts.timeout(timeout):
  File "/usr/local/lib/python3.12/asyncio/timeouts.py", line 115, in __aexit__
    raise TimeoutError from exc_val
TimeoutError
kernelpanic85 commented 4 months ago

@elupus, thanks for the arcam_fmj 1.5.0 release! Sounds like that might address this issue? Is it ready to be bumped in HA core or do you want me to test with my JBL first?

elupus commented 4 months ago

It might. The lib needs test before i bump in ha. I posted in the other issue on how to test

kernelpanic85 commented 4 months ago

Ahh got it. Here's my results of what you posted, seems like there are still some errors:

homeassistant:/config# arcam-fmj state --host 192.168.2.71 --zone 1
Retrying: <function ClientBase.request_raw at 0x758b76b8> (<arcam.fmj.client.Client object at 0x75836ae0>, CommandPacket(zn=1, cc=<CommandCodes.CURRENT_SOURCE: 29>, data=b'\xf0'))
Retrying: <function ClientBase.request_raw at 0x758b76b8> (<arcam.fmj.client.Client object at 0x75836ae0>, CommandPacket(zn=1, cc=<CommandCodes.MENU: 20>, data=b'\xf0'))
State ({'POWER': True, 'VOLUME': 54, 'SOURCE': <SourceCodes.GAME: 15>, 'MUTE': False, 'MENU': <MenuCodes.NONE: 0>, 'INCOMING_AUDIO_FORMAT': (<IncomingAudioFormat.UNDETECTED: 21>, <IncomingAudioConfig.CODE_33: 33>), 'DECODE_MODE_2CH': <DecodeMode2CH.DOLBY_SURROUND: 4>, 'DECODE_MODE_MCH': None, 'DAB_STATION': None, 'DLS_PDT': None, 'RDS_INFORMATION': None, 'TUNER_PRESET': None, 'PRESET_DETAIL': {}}) Amx ({'Device-SDKClass': 'Receiver', 'Device-Make': 'JBL SYNTHESIS', 'Device-Model': 'SDP-58', 'Device-Revision': '2.0.0'})

homeassistant:/config# arcam-fmj state --host 192.168.2.71 --zone 2
Retrying: <function ClientBase.request_raw at 0x7594d6b8> (<arcam.fmj.client.Client object at 0x758ccab0>, AmxDuetRequest())
Retrying: <function ClientBase.request_raw at 0x7594d6b8> (<arcam.fmj.client.Client object at 0x758ccab0>, CommandPacket(zn=2, cc=<CommandCodes.POWER: 0>, data=b'\xf0'))
Retrying: <function ClientBase.request_raw at 0x7594d6b8> (<arcam.fmj.client.Client object at 0x758ccab0>, CommandPacket(zn=2, cc=<CommandCodes.INCOMING_AUDIO_FORMAT: 67>, data=b'\xf0'))
Timeout requesting 67
State ({'POWER': False, 'VOLUME': 44, 'SOURCE': <SourceCodes.FOLLOW_ZONE_1: 1>, 'MUTE': False, 'MENU': None, 'INCOMING_AUDIO_FORMAT': (None, None), 'DECODE_MODE_2CH': None, 'DECODE_MODE_MCH': None, 'DAB_STATION': None, 'DLS_PDT': None, 'RDS_INFORMATION': None, 'TUNER_PRESET': None, 'PRESET_DETAIL': {}}) Amx ({'Device-SDKClass': 'Receiver', 'Device-Make': 'JBL SYNTHESIS', 'Device-Model': 'SDP-58', 'Device-Revision': '2.0.0'})

homeassistant:/config# arcam-fmj client --host 192.168.2.71 --zone 1 --command 0x08 --data 0x10 0x10
None
elupus commented 4 months ago

Can you try the 1.5.1 release. I've dropped video format and audio format from secondary zones too.

kernelpanic85 commented 4 months ago

Seems better now:

homeassistant:/config# arcam-fmj state --host 192.168.2.71 --zone 1
State ({'POWER': True, 'VOLUME': 55, 'SOURCE': <SourceCodes.GAME: 15>, 'MUTE': False, 'MENU': <MenuCodes.NONE: 0>, 'INCOMING_AUDIO_FORMAT': (<IncomingAudioFormat.UNDETECTED: 21>, <IncomingAudioConfig.CODE_33: 33>), 'DECODE_MODE_2CH': <DecodeMode2CH.DOLBY_SURROUND: 4>, 'DECODE_MODE_MCH': None, 'DAB_STATION': None, 'DLS_PDT': None, 'RDS_INFORMATION': None, 'TUNER_PRESET': None, 'PRESET_DETAIL': {}}) Amx ({'Device-SDKClass': 'Receiver', 'Device-Make': 'JBL SYNTHESIS', 'Device-Model': 'SDP-58', 'Device-Revision': '2.0.0'})

homeassistant:/config# arcam-fmj state --host 192.168.2.71 --zone 2
State ({'POWER': False, 'VOLUME': 44, 'SOURCE': <SourceCodes.FOLLOW_ZONE_1: 1>, 'MUTE': False, 'MENU': None, 'INCOMING_AUDIO_FORMAT': (None, None), 'DECODE_MODE_2CH': None, 'DECODE_MODE_MCH': None, 'DAB_STATION': None, 'DLS_PDT': None, 'RDS_INFORMATION': None, 'TUNER_PRESET': None, 'PRESET_DETAIL': {}}) Amx ({'Device-SDKClass': 'Receiver', 'Device-Make': 'JBL SYNTHESIS', 'Device-Model': 'SDP-58', 'Device-Revision': '2.0.0'})

homeassistant:/config# arcam-fmj client --host 192.168.2.71 --zone 1 --command 0x08 --data 0x10 0x10
None