Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controll Telia play or svt play for my in-laws with pyatv. #2332

Open
5opr4ni opened this issue Jan 14, 2024 · 4 comments
Open

Controll Telia play or svt play for my in-laws with pyatv. #2332

5opr4ni opened this issue Jan 14, 2024 · 4 comments
Labels

Comments

@5opr4ni
Copy link

5opr4ni commented Jan 14, 2024

What do you need help with?

Hi

I am trying to make a setup for my in-laws that are 90+ and can't manage the remote any more.
The setup is a RaspberryPi behind the TV, a Streamdeck on the sofa table, with just some buttons like
Start TV, Stop TV, SVT1, SVT2, TV4 and Mute.
This they can manage, but it it's a pain for me to control the Apple tv, I have to do so many remote commands to just come to a state that is always the same, so that i from there can do the sequence that starts for example SVT1.
Sadly SVT or Telia dont have deeplinks, what i know about, i can launch_app but then i come to an unpredicted state and can not do a trusty sequence.
My questions then
Is there a way of "killing" an app with atvremote, just so i can start the app and know that it is in a default state?
Do you know anyway of launching a specific channel in TeliaPlay and/or SVT on Apple TV?

The terrestial tv coverage is so bad that we have to rely on fiber, Internet.

/olle

@postlund
Copy link
Owner

If you double-press the menu button, you can swipe up to kill an app (I assume you know that). Currently there's no swipe support in pyatv, but just calling up might work as it relies on the touch interface. So you should be able to do something like:

  1. Launch app with launch_app
  2. Now you know the app is first in the app switch list
  3. Double tap menu (atvremote menu=2)
  4. Kill app with atvremote up
  5. Launch app again
  6. Now you have a known state

This should result in something like this:

atvremote launch_app=app delay=X menu=2 delay=Y up launch_app=app

Delays will have to be established manually. I don't know of any deep links for those apps. Might exist, but as I don't use any of them I don't have any real way of finding out. There are some tips in the documentation (here) but you might also strike some luck mailing the developers. Assuming you manage to reach any technicians.

@5opr4ni
Copy link
Author

5opr4ni commented Jan 14, 2024

Thanks Pierre

That is what i am doing now, thought there might be some other way. But thanks anyway, and thanks for a fantastic lib.
I actually was in contact with some former colleagues at SVT where I used to work, and the response was what! Deep links?
:)

@postlund
Copy link
Owner

Thanks for using it 😊 Yeah, no, don't think there's any better way. But you more or less had that answer already then 😉

@5opr4ni
Copy link
Author

5opr4ni commented Jan 14, 2024

cmd_sequence = [
'/home/lyckan/.local/bin/atvremote', '-s', '192.168.0.250',
'top_menu', 'top_menu',
'delay=1000', 'up', 'up',
'delay=1000', 'top_menu',
'delay=1000', 'top_menu',
'delay=1000', 'select',
'delay=3000', 'down', 'select'
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants