postlund / pyatv

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

[Help for a Dumb] Trying to only Pair/Authenticate and send 1 Cursor Down #2490

Open Revono opened 2 weeks ago

Revono commented 2 weeks ago

What to investigate?

Hi all,

Im trying to understand how this works, i investigated now 6 hours to get 1 little python script without using pyatv lib to pair my own script and send a cursor down but it looks like im to dumb, if someone can help me or give me a nice example it would be very cool.

Thank you very much.

Expected outcome

I want to do my own script to only Pair with Apple TV 4k and send Cursor Down without using pyatv lib for learning purpose

postlund commented 2 weeks ago

Do you mean that you want to implement the protocols yourself (not depends on pyatv at all)?

Revono commented 2 weeks ago

@postlund Yes, but only for the remote control features. While PyATV is a great library, it’s too large and complex for my needs. I’m only looking for the basic functionality. I’m fine with reusing individual files, but I don’t need the entire library. Additionally i want to understand what im doing.

postlund commented 1 week ago

I would focus on the Companion protocol, it's the simplest one. You can either pull files from pyatv/protocols/companion and some dependencies from other places. Everything is pretty tight coupled within pyatv (due to re-use of code amongst protocols). If you want a bare minimum implementation, then you will need to write an implementation yourself. You can get good guidance from the pyatv code, by running atvremote and reading on https://pyatv.dev/documentation/protocols/#companion-link.