You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to stream to either an AppleTV or a HomePod mini, it fails with RTSP/1.0 method SETUP failed with code 400: Bad Request
The RTSP stream binds to the docker network IP, not the host IP. Specifying an --address HOST_IP doesn't change the RTSP IP used.
Running it directly on the host works.
Error log
homeassistant:/config# atvremote --id XXXXXXX stream_file=http://XXXXXXX:8123/api/tts_proxy/XXXXXXX_en_-_google_translate.mp3
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/pyatv/scripts/atvremote.py", line 997, in _run_application
return await cli_handler(loop)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyatv/scripts/atvremote.py", line 726, in cli_handler
return await _handle_commands(args, config, storage, loop)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyatv/scripts/atvremote.py", line 876, in _handle_commands
ret = await _handle_device_command(args, cmd, atv, storage, loop)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyatv/scripts/atvremote.py", line 932, in _handle_device_command
return await _exec_command(atv.stream, cmd, True, *cmd_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyatv/scripts/atvremote.py", line 964, in _exec_command
value = await tmp(*args)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyatv/core/facade.py", line 374, in stream_file
await self.relay("stream_file")(
File "/usr/local/lib/python3.12/site-packages/pyatv/protocols/raop/__init__.py", line 356, in stream_file
await client.initialize(self.core.service.properties)
File "/usr/local/lib/python3.12/site-packages/pyatv/protocols/raop/stream_client.py", line 338, in initialize
await self._protocol.setup(self.timing_server.port, self.control_client.port)
File "/usr/local/lib/python3.12/site-packages/pyatv/protocols/raop/protocols/airplayv2.py", line 109, in setup
await self._setup_base(timing_server_port)
File "/usr/local/lib/python3.12/site-packages/pyatv/protocols/raop/protocols/airplayv2.py", line 56, in _setup_base
setup_resp = await self.rtsp.setup(
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyatv/support/rtsp.py", line 177, in setup
return await self.exchange("SETUP", headers=headers, body=body)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyatv/support/rtsp.py", line 294, in exchange
resp = await self.connection.send_and_receive(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyatv/support/http.py", line 496, in send_and_receive
raise exceptions.HttpError(
pyatv.exceptions.HttpError: RTSP/1.0 method SETUP failed with code 400: Bad Request
>>> An error occurred, full stack trace above
How to reproduce the bug?
Run atvremote --id XXXXXXX stream_file=http://XXXXXXX:8123/api/tts_proxy/XXXXXXX_en_-_google_translate.mp3 from a docker container without using network_mode: "host".
What is expected behavior?
A --host-ip and -host-port (I've seen it defaults to 5353) arguments should be introduced to be used for the RTSP stream.
Operating System
Docker
Python
3.12
pyatv
0.15.1
Device
Apple TV 4K (gen 2), tvOS 18.1 and HomePod Mini, tvOS 18.1
Additional context
In the Apple Home app settings, "Speakers & TV" is set to "Everyone".
Running pyatv directly on the host works.
I use an Avahi repeater to get mDNS messages to and from the docker network
The text was updated successfully, but these errors were encountered:
Describe the bug
When trying to stream to either an AppleTV or a HomePod mini, it fails with
RTSP/1.0 method SETUP failed with code 400: Bad Request
The RTSP stream binds to the docker network IP, not the host IP. Specifying an
--address HOST_IP
doesn't change the RTSP IP used.Running it directly on the host works.
Error log
How to reproduce the bug?
Run
atvremote --id XXXXXXX stream_file=http://XXXXXXX:8123/api/tts_proxy/XXXXXXX_en_-_google_translate.mp3
from a docker container without usingnetwork_mode: "host"
.What is expected behavior?
A
--host-ip
and-host-port
(I've seen it defaults to 5353) arguments should be introduced to be used for the RTSP stream.Operating System
Docker
Python
3.12
pyatv
0.15.1
Device
Apple TV 4K (gen 2), tvOS 18.1 and HomePod Mini, tvOS 18.1
Additional context
In the Apple Home app settings, "Speakers & TV" is set to "Everyone".
Running pyatv directly on the host works.
I use an Avahi repeater to get mDNS messages to and from the docker network
The text was updated successfully, but these errors were encountered: