Pyatv

Latest version: v0.16.0

Safety actively analyzes 682361 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 9 of 18

0.9.3

Time for another drop with a few fixes and enhancements:

* Official support for python 3.10
* The MRP service is now ignored for tvOS 15 devices
* osvers is handled properly in AirPlay which previously caused an
exception when connecting to Apple TV 3 (or older) devices
* Stop is now supported in RAOP

No biggies this time, but should make for a smoooother experience!

**Changes:**

*Protocol: MRP:*


89c9f2f mrp: Ignore service during scan for tvOS >= 15


*Protocol: AirPlay:*


5a1f482 airplay: Quiet log of remote control setup failure
a069208 airplay: Handle semver version in osvers


*Protocol: RAOP:*


5781665 raop: Add support for stop
0ef3232 raop: Report correct progress values


*Other:*


2d16f1d gha: Run tests on python 3.10
62c29a1 docs: Add docs for app_list and launch_app



**All changes:**


5781665 raop: Add support for stop
107a692 facade: Support takeover for PushUpdater
536f241 cq: Remove stream.py
2afdad8 relayer: Fix main_instance and add instances
b6165b0 core: Pass takeover method to protocols
99ed67d facade: Support for protocol takeover
9f93f0e core: Add takeover support to relayer
836aa62 docs: Add tvOS 15 to README description
16c22f0 build(deps): bump flake8 from 4.0.0 to 4.0.1
255c96b build(deps): bump pytest-timeout from 2.0.0 to 2.0.1
b881c32 build(deps): bump pytest-timeout from 1.4.2 to 2.0.0
dd38f63 build(deps): bump flake8 from 3.9.2 to 4.0.0
2d16f1d gha: Run tests on python 3.10
0ef3232 raop: Report correct progress values
5a1f482 airplay: Quiet log of remote control setup failure
4f7fe97 core: Don't connect to dummy services
67ae1b8 build(deps): bump pytest-cov from 2.12.1 to 3.0.0
62c29a1 docs: Add docs for app_list and launch_app
89c9f2f mrp: Ignore service during scan for tvOS >= 15
a069208 airplay: Handle semver version in osvers
65b40bd build(deps): bump mediafile from 0.8.0 to 0.8.1

0.9.2

What? Another release? Already? Suure... So, I am integrating pyatv 0.9.x with
Home Assistant and I find these small annoyances or missing pieces along the way,
fixing them one by one as I go. This release is thus a micro-update, but it
contains a few nuggets.

A `Music` device model has been added that represents the Music app/iTunes. In
the same department I've added a property called `raw_model` to `DeviceInfo`,
returning a raw model string in case it's not a model known by pyatv. This is
very useful for AirPlay receivers as `raw_model` will usually contain the device
manufacturer and hardware model.

It is now possible to pass a set of identifiers to `pyatv.scan`. The intended
use case is to pass all identifiers belonging to a device to handle cases where a
service is missing or getting deprecated (like MRP).

Making this release from my phone. In bed. So I will stop there and go to sleep...

**Changes:**

*Protocol: DMAP:*


180acab dmap: Avoid unnecessary creation of Zeroconf
2e32274 dmap: Add device model Music for Music/iTunes


*Protocol: MRP:*


7a8b86a mrp: Updates to volume management


*Protocol: Companion:*


b28a01e companion: Improve pairing requirement detection


*Other:*


ce90dd6 core: Add raw_model to DeviceInfo
e063ffb scan: Support scanning for multiple identifiers


**All changes:**


22bf5f2 companion: Enable test that should be enabled
180acab dmap: Avoid unnecessary creation of Zeroconf
ce90dd6 core: Add raw_model to DeviceInfo
2e32274 dmap: Add device model Music for Music/iTunes
3623287 fix wrong param
b28a01e companion: Improve pairing requirement detection
e063ffb scan: Support scanning for multiple identifiers
7a8b86a mrp: Updates to volume management

0.9.1

Minor bug fix release coming up! Should fix connection issues when a stale
MRP service is present after upgrading to tvOS 15. Also improves pairing requirement
handling for AirPlay and RAOP in case access control is set to "Only devices in
my home" (will now report as Disabled). Companion is also reported as Unsupported
for HomePods as pyatv cannot pair with them.

A new convert method to convert a `DeviceModel` to string has been added.

**Changes:**

*Protocol: AirPlay:*


2558a89 airplay: Support Disabled pairing requirement


*Protocol: Companion:*


6cb7269 companion: Better support for pairing requirement


*Protocol: RAOP:*


d257378 raop: Support Disabled pairing requirement


*Other:*


70b4992 convert: Add model_str method
535b56b core: Use connect order based on protocol


**All changes:**


6cb7269 companion: Better support for pairing requirement
d257378 raop: Support Disabled pairing requirement
2558a89 airplay: Support Disabled pairing requirement
70b4992 convert: Add model_str method
535b56b core: Use connect order based on protocol

0.9.0

So, what's new? Yeah, right, tvOS 15 was released the day before yesterday
which broke everything. My intention was to release 0.9.0 before tvOS 15
dropped, but things kept popping up and I had no choice but to delay. So here
we are.

The biggest feature in this release is obviously support for tvOS 15. Perhaps
not the most exciting feature per se, but important as most of the
functionality in pyatv is lost without it. The gist is that Apple decided to
drop support for the MRP protocol introduced in tvOS. In practice they didn't
get rid or it, they just allocated a special stream type in AirPlay (2) and
decided to tunnel MRP over it. So MRP is still there, it's just carried over
AirPlay now. As far as I know, this is how they have done it the last couple of
iOS/tvOS releases. So it's not really new, just something no one looked into.
The deprecation of the "regular" MRP protocol is reasonable (who uses the
Remote app nowadays?), so I don't blame Apple for it. Would have been nice to
have figured this out earlier though, as it required a lot of intense reverse
engineering to unravel everything. Now it does work though, so totally worth
it! I have tried to document how it works on the protocols page:

https://pyatv.dev/documentation/protocols/

All needed to get things working again is to provide AirPlay credentials. One
important thing to note though is that you need to re-pair with this release
(or later) to get new credentials. The old ones will only work with `play_url`,
not for tunneling MRP over AirPlay. A small bonus here is that the HomePod
works in the same way as the Apple TV in this regards, so pyatv can now be used
to control HomdPods as well. No pairing is needed for that, it's just
plug-and-play!

Let's leave MRP now... My vision for pyatv is to create a "core", where
protocols work as plugins to provide functionality. The API used by developers
is supposed be towards core and not the protocols themselves. This basically
means that all functions in the API should behave in the same way, no matter
what protocols are used in regards to arguments, return values, listener
interfaces, error handling and so on. This release contains a lof of work
towards realizing that vision. I'm not quite there yet, but it's closer than
ever. Hopefully, this will only manifest itself through more consistent
behavior and not much you as a developer need to pay any attention to. But if
you notice any changes in behavior, this might be the reason. Be sure to report
anything that you find peculiar, it might need fixing or an explanation.

Another minor new feature is that the Audio interface has been extended to
include volume_up and volume_down, which also means those methods are
deprecated in `RemoteControl`. Please update your code for this. Also, all the
protocol specic service types, e.g. `conf.MrpService` and `conf.AirPlayService`
have been deprecated in favor of `conf.ManualService`. Update your code for
this as well, in case you rely on any of them. They will stick around for a few
releases, so your code won't break because of this. The last minor feature is a
helper method called `helpers.is_streamable`, which can check if file is
supported by `Stream.stream_file`.

One last thing... This release fills a big gap that has been present for a long
time: when do you need to pair? Each service now contains a "pairing" property
that will tell you of pairing is needed or not. This makes it possible to
programmatically determine if the pairing procedure needs to to performed,
something that wasn't clear before. After scanning, just iterate all services
and pair the ones requiring it. A similar property has been added for passwords
as well, called `requires_password`. If True, then a password is required to
connect. Only applicable to RAOP so far (it works for AirPlay as well, but
there's no support for passwords in AirPlay yet).

To round things up, I just wanted to say that docker images are automatically
built for new releases as well as the latest commit on master, making it easy
to test pyatv without having to install any additional software other than
docker. I still have some areas to improve, but it's a good start. This release
will be the first release having docker images pre-built as it's tricky to
backport.

That is it for now. Make sure to check out the migration guide to get some
hints on what you need to do when upgrading.

Be sure to check out the migration notes before upgrading:

https://pyatv.dev/support/migration/

**Notes:**

* mediafile replaced audio-metadata as a dependency in this release
* At least version 3.17.3 of protobuf is required

**Changes:**

*Protocol: DMAP:*


099c975 dmap: Add support for pairing requirement


*Protocol: MRP:*


6177e86 mrp: Add support for pairing requirement
0bdd614 mrp: Add support for Audio interface
2495e56 mrp: Extract build number from DEVICE_INFO


*Protocol: AirPlay:*


31bf148 airplay: Add support for pairing requirement
af5c441 airplay: Add support for requires_password
8c35d1f airplay: Add support for transient pairing
a407efa airplay: Support MRP tunneling over AirPlay 2


*Protocol: Companion:*


e49b9ef companion: Add support for pairing requirement


*Protocol: RAOP:*


d47924d raop: Send empty audio during latency period
f075d4d raop: Add support for pairing requirement
f66563a raop: Add support for requires_password


*Other:*


9339954 if: Add volume_up and volume_down to Audio
1c11600 gh: Convert issue templates to forms
8f7f9bd gha: Build and publish Docker containers
4f76bf3 core: Switch from audio-metadata to mediafile

0.8.2

Time for another minor release! Highlights this time is
improved scanning, password protected RAOP services, support
for HSCP and some remote buttons in Companion.

An issue hwere some devices were not discovered by Home Assistant
anymore suddenly appeared (pun intended). Some digging concluded
that asking for too many Zeroconf services in one request might
yield a response too big to fit in one IP packet. This makes the
sender silently drop records, rendering the response incomplete
without pyatv knowing that. Since Companion and RAOP was added in

0.8.1

This minor release contains a few improvements to the RAOP protocol.
First and foremost, `time.perf_counter` is now used in favor of
`time.monotonic` for audio scheduling. Scheduling has also been changed to work
with "global time" (from stream start) instead of per frame. These changes
improve streaming stability, with less chance of getting out of sync. They were
also necessary to get streaming working on Windows.

Another important addition in the streaming department is the ability to read
input from a FILE-like object, instead of just from a filename. One usecase for
this is to take input via stdin from another process and send it to a receiver.
`atvremote` has been adjusted to read from stdin if `-` is specified as
filename. Here's an example streaming output from ffmpeg (RTSP as input!):

shell
ffmpeg -i rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov -f mp3 - | atvremote -s 10.0.10.184 --debug stream_file=-


Documentation for this:

https://pyatv.dev/documentation/atvremote/#streaming
https://pyatv.dev/development/stream/#stream-a-file

**Changes:**

*Protocol: RAOP:*


f41d552 raop: Sync sending based on absolute time
bd15ff2 raop: Use perf_counter instead of monotonic
4abfc94 raop: Add small buffer to BufferedReaderSource
ee1ee94 raop: Fix timing when starting to stream
8096928 raop: Support streaming files from a buffer


**All changes:**


f41d552 raop: Sync sending based on absolute time
bd15ff2 raop: Use perf_counter instead of monotonic
03f9a6b build(deps): bump mypy from 0.902 to 0.910
244d9ee build(deps): bump isort from 5.8.0 to 5.9.1
a23c144 docs: Add missing tutorial example
4abfc94 raop: Add small buffer to BufferedReaderSource
ee1ee94 raop: Fix timing when starting to stream
8096928 raop: Support streaming files from a buffer
a2df952 docs: Add tutorial as an example
6cf2f4c build(deps): bump types-protobuf from 0.1.12 to 0.1.13

Page 9 of 18

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.