Comments (4)
It does not support that part of the AirPlay protocol (only Apple TV does). Use stream_file
instead (call it in the same way).
from pyatv.
okay -that seems to work - however, this is a blocking call? And the Homepod vanishes from the list of airplay devices in iOS?
from pyatv.
And shairplay refuses streaming:
Traceback (most recent call last):
File "/home/mrink/pyatv/lib/python3.11/site-packages/pyatv/scripts/atvremote.py", line 978, in _run_application
return await cli_handler(loop)
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mrink/pyatv/lib/python3.11/site-packages/pyatv/scripts/atvremote.py", line 723, in cli_handler
return await _handle_commands(args, config, storage, loop)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mrink/pyatv/lib/python3.11/site-packages/pyatv/scripts/atvremote.py", line 862, in _handle_commands
ret = await _handle_device_command(args, cmd, atv, storage, loop)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mrink/pyatv/lib/python3.11/site-packages/pyatv/scripts/atvremote.py", line 916, in _handle_device_command
return await _exec_command(atv.stream, cmd, True, *cmd_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mrink/pyatv/lib/python3.11/site-packages/pyatv/scripts/atvremote.py", line 945, in _exec_command
value = await tmp(*args)
^^^^^^^^^^^^^^^^
File "/home/mrink/pyatv/lib/python3.11/site-packages/pyatv/core/facade.py", line 371, in stream_file
await self.relay("stream_file")(
File "/home/mrink/pyatv/lib/python3.11/site-packages/pyatv/protocols/raop/__init__.py", line 356, in stream_file
await client.initialize(self.core.service.properties)
File "/home/mrink/pyatv/lib/python3.11/site-packages/pyatv/protocols/raop/stream_client.py", line 337, in initialize
await self._protocol.setup(self.timing_server.port, self.control_client.port)
File "/home/mrink/pyatv/lib/python3.11/site-packages/pyatv/protocols/raop/protocols/airplayv2.py", line 108, in setup
await self._setup_base(timing_server_port)
File "/home/mrink/pyatv/lib/python3.11/site-packages/pyatv/protocols/raop/protocols/airplayv2.py", line 51, in _setup_base
self._verifier = await verify_connection(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mrink/pyatv/lib/python3.11/site-packages/pyatv/protocols/airplay/auth/__init__.py", line 104, in verify_connection
has_encryption_keys = await verifier.verify_credentials()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mrink/pyatv/lib/python3.11/site-packages/pyatv/protocols/airplay/auth/hap_transient.py", line 48, in verify_credentials
await self.http.post("/pair-pin-start", headers=_AIRPLAY_HEADERS)
File "/home/mrink/pyatv/lib/python3.11/site-packages/pyatv/support/http.py", line 432, in post
return await self.send_and_receive(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mrink/pyatv/lib/python3.11/site-packages/pyatv/support/http.py", line 495, in send_and_receive
raise exceptions.HttpError(
pyatv.exceptions.HttpError: HTTP/1.1 method POST failed with code 400: Bad Request
from pyatv.
Yes, it uses RTP streaming to stream audio to the device. Basically is streams audio from the remote source (internet radio in your case), converts it into raw PCM frames and forwards to the device. I.e. this is normal AirPlay audio streaming. I have not managed to figure out how to use built in apps (like Music), so no support for that. The API used on Apple TVs to just stream directly from a URL does not exist on HomePod.
Only one can stream via AirPlay so I assume that is expected.
from pyatv.
Related Issues (20)
- [pyatv.support.mdns] exception during data handling
- atvremote homepod mini HOT 3
- test_simple_dispatch fails on Python 3.12 HOT 1
- Confused about Power State HOT 1
- AppleTV not waking up HOT 10
- Unable to scan, connect, do anything with atvremote
- Playing Radio Station URLs and authentication HOT 4
- pip3 install pyatv (on homebridge ) error: externally-managed-environment HOT 1
- atvremote cli crashes repeatedly
- Import error HOT 3
- ffmpeg live audiostrem HOT 1
- Remove delay from audio Stream HOT 2
- Connecting while only members of Home can controll HOT 2
- Connection broken if connected in an new thread HOT 3
- Playing videos on AirPlay is broken HOT 1
- incompatible with protobuf 5.26.1 HOT 6
- app_id: com.canalplusdistrib.mycanal.prod app_name: myCANAL app entity_picture HOT 1
- atvscript push_updates - output_devices is not supported HOT 3
- Add atv-desktop-remote to list of projects that use pyatv HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyatv.