Pyatv

Latest version: v0.14.5

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

Scan your dependencies

Page 9 of 17

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

0.8.0

4d9dbd4 scan: Migrate to use get_unique_id internally
0049db1 scan: Be more forgiving if service parsing fails
ecacad7 tests: Make RAOP work in fake device
c36e6b5 raop: Teardown session after streaming
116d29d build(deps): bump zeroconf from 0.28.0 to 0.28.2
b8c3819 scripts: Unset PIP_USER in setup_dev_env.sh
cd849b7 Upgrade to GitHub-native Dependabot
5f590f5 build(deps): Bump bitarray from 2.1.2 to 2.1.3
aa4b53d raop: Fallback to AirPlay credentials
a5bd14c raop: Only perform auth-setup for AirPort Express
795081b docs: Various documentation updates
6cfa66c helpers: Add get_unique_id
1c3adcf mypy: Fix typing issues
73bb7fa build(deps): Bump mypy from 0.812 to 0.902
85d03f0 build(deps): Update bitarray requirement from <2.1.1,==2.1.0 to ==2.1.2
cc5bc8c raop: Support devices not implementing /info
dae7518 raop: Minor updates to documentation
1b3c183 raop: Handle muted volume level
cf2696e raop: Only allow one stream at the time
eaec0a5 raop: Support set_volume, volume_up, volume_down
462512e raop: Make sure authentication is performed early
3b37ec8 raop: Initial volume support
15e4501 support: Add map_range function
4ed1b2c facade: Enforce percentage level for audio

0.7.7

**Changes:**

* Fix bug where apps would appear to crash on tvOS 14.5 (beta)
* Add a retry to heartbeat loop
* Add new script that parses logs: atvlog

**All changes:**


60df163 mrp: Use GenericMessage for heartbeats (975)
8df084f support: Convert knock to use asyncio (988)
14196da gh: Add example to attach log to a bug report (984)
dbe734c build(deps-dev): bump tox from 3.22.0 to 3.23.0
1e1922e cq: Run pylint from tox (979)
7464cb7 atvlog: Rename log2html and bundle it (982)
34d2f53 log2html: Add separate include and exclude filters (981)
0a6fa5e log2html: Add generation date and command (980)
7184717 mrp: Add retry to heartbeats (978)
b0eaaef log2html: Allow toggling of showing date (974)
adda918 build(deps): bump mypy from 0.800 to 0.812
fa8b05d gha: Save log for log2html using pygithub (972)
7584a2c log2html: Fix broken log entry loading (971)
090ba35 build(deps): bump deepdiff from 5.2.2 to 5.2.3 (969)
ce3fecd gha: Store issue/comment body as file for log2html (970)
1ee2691 log2html: Support Home Assistant log format (967)
b9dcadc log2html: Add text and log level filtering (966)
49b17f9 log2html: Render log entries with javascript (965)
5935d50 build(deps-dev): bump tox from 3.21.4 to 3.22.0
aa9b2cf gha: Generate html logs for logs in issues (962)
aa2aa18 log2html: Support environment variable as input (961)
dd91239 log2html: New script converting logs to HTML pages (960)
659031e build(deps): bump pytest-xdist from 2.2.0 to 2.2.1
46aae2f build(deps-dev): bump tox from 3.21.3 to 3.21.4
49aab09 build(deps): bump mypy-protobuf from 1.23 to 1.24

Page 9 of 17

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.