postlund / pyatv

A client library for Apple TV and AirPlay devices
https://pyatv.dev
MIT License
892 stars 99 forks source link

volume and set_volume doesn't works anymore on version #2524

Open martinorob opened 1 month ago

martinorob commented 1 month ago

Describe the bug

command volume and set_volume doesn't works anymore

volume always return 0.0 and set_volume returns errors.

Error log

set_volume error

atvremote --id FA7D6FF5C646 set_volume=10.0
Traceback (most recent call last):
  File "/usr/lib/python3.10/asyncio/locks.py", line 214, in wait
    await fut
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.10/asyncio/tasks.py", line 456, in wait_for
    return fut.result()
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/[atvremote.log](https://github.com/user-attachments/files/17401117/atvremote.log)/.local/lib/python3.10/site-packages/pyatv/scripts/atvremote.py", line 997, in _run_application
    return await cli_handler(loop)
  File "/home/martinorob/.local/lib/python3.10/site-packages/pyatv/scripts/atvremote.py", line 726, in cli_handler
    return await _handle_commands(args, config, storage, loop)
  File "/home/martinorob/.local/lib/python3.10/site-packages/pyatv/scripts/atvremote.py", line 876, in _handle_commands
    ret = await _handle_device_command(args, cmd, atv, storage, loop)
  File "/home/martinorob/.local/lib/python3.10/site-packages/pyatv/scripts/atvremote.py", line 916, in _handle_device_command
    return await _exec_command(atv.audio, cmd, True, *cmd_args)
  File "/home/martinorob/.local/lib/python3.10/site-packages/pyatv/scripts/atvremote.py", line 964, in _exec_command
    value = await tmp(*args)
  File "/home/martinorob/.local/lib/python3.10/site-packages/pyatv/core/facade.py", line 479, in set_volume
    await self.relay("set_volume")(level)
  File "/home/martinorob/.local/lib/python3.10/site-packages/pyatv/protocols/mrp/__init__.py", line 856, in set_volume
    await asyncio.wait_for(self._volume_event.wait(), timeout=5.0)
  File "/usr/lib/python3.10/asyncio/tasks.py", line 458, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError

>>> An error occurred, full stack trace above

How to reproduce the bug?

atvremote --id FA7D6FF5C646 volume --debug

What is expected behavior?

volume return the volume level set_volume=100 set the volume to 100

Operating System

Ubuntu

Python

3.8

pyatv

0.15.1

Device

Apple TV 4K

Additional context

Connected with Airplay Receiver AirPort Express

postlund commented 3 weeks ago

Did this work in a previous version of pyatv? Maybe you can try 0.14.0 or so?

martinorob commented 1 week ago

Not working on last and on The 0.14.Buy only volume command doesnt worls. Play selecr pause works fine..Any troubleshoots that I can try?Thanks  Il giorno 4 nov 2024, alle ore 10:13, Pierre Ståhl @.***> ha scritto: Did this work in a previous version of pyatv? Maybe you can try 0.14.0 or so?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>