AppleTV Integration Deep Link URLs - Which Are Working?

Thank you, got it to work. Faster action now, even though being able to send text to apple keyaboard saved me a lot of time.

Do you know of a way to to the same for plex?

https://www.reddit.com/r/homeassistant/s/omwjgbES1F

I manged to play episodes by getting specific metadata id, but getting the meta data id from the show page just starts playing S01e01, and not continue where I left of. So if there was a way to just get to the series page I could hit play myself

Are you vintage414 on reddit? …if so, I have answered you there.

Basically, with the Plex integration, you can do things like this:

- service: media_player.select_source
  data:
    source: Plex
  target:
    entity_id: media_player.appletv
- delay:
    seconds: 1
- service: media_player.play_media
  data:
    media_content_type: EPISODE
    media_content_id: >-
      {
        "library_name" : "TV Shows",
        "show_name": "30 Rock",
        "shuffle": 1,
        "maxresults": 1
      }
    enqueue: replace
  target:
    entity_id: media_player.plex_plex_for_apple_tv_apple_tv
1 Like

Nice! Thank you, worked like a charm!

Glad to have been able to help!

Any luck with youtube music to homepod?

Trying to deep link Apple TV to launch a live network on Hulu. I can launch Hulu but can’t go any deeper. Any suggestions?

Hulu doesn’t seem to support direct linking, or at least I’ve never been able to figure out the URL structure. I just link Hulu to the TV app and then get the URL for the TV app and use that.

Oh, I’ve been trying to deep link youtube and getting this error, is this the cause?

Message malformed: extra keys not allowed @ data[‘action’] error on

Is there a way of deep linking into a specific area of the Apple TV Settings menu?

I use the Dialogue Enhance feature a lot and it would be great to be able to go straight into that section of the settings (Settings/Video and Audio/Enhance Dialogue)

I don’t think so. The deep linking mentioned in this thread has to do with media objects (i.e. URLs to movies, TV shows, or episodes). To my knowledge there are no URLs for settings areas.

1 Like

Thanks. I’ve tried all sorts of combinations and couldn’t find anything that worked so I think you are right.

In Max streaming I have Eurosport 1.
I created a button with this code

tap_action:
action: perform-action
perform_action: media_player.play_media
data:
media_content_type: url
media_content_id: >-
Max | Stream Series and Movies
enqueue: replace
target:
device_id: 424aeaea38946a349afce4c47960ac67

This opens Eurosport like a charm. But both the physical remote and the media player loose connection to the app. If switch to a different app and back to Eurosport the sound is doubled. It’s working like opening an url in a new browser window. Only possible thig, I can do, is to close the app on the physical remote.
Btw. I tried with and without the enqueue option.

Any suggestions?

This deeplink works for the VLC app. I couldn’t get it to play YouTube links, but works fine for RTSP.

action: media_player.play_media
data:
  media_content_type: url
  media_content_id: vlc-x-callback://x-callback-url/stream?url=rtsp://192.168.1.5:554/live
target:
  entity_id: media_player.apple_tv

The Apple TV Peacock deep link took me a while to track down, but wanted to share what I found from this thread on Android/Google TV. The format is working for me on Apple TV, too. Basically just a urlencoded JSON param appended to the deeplink URL:

{
  "pvid": "<PVID OF THE CONTENT>",
  "type": "PROGRAMME",
  "action": "<PLAY|PDP>"
}

The pvid can be found from a share link as the id query param or in the URL if viewing in a browser. the action PLAY autoplays the content and PDP opens the content page but does not autoplay.

Here’s an example to auto-play the Parks and Recreation pilot episode:

{
  "pvid": "04569a08-33e0-3835-9a21-76af2e31fa69",
  "type": "PROGRAMME",
  "action": "PLAY"
}

url encode that and append it to the base url of https://www.peacocktv.com/deeplink as the deeplinkData query param and you get

https://www.peacocktv.com/deeplink?deeplinkData=%7B%22pvid%22%3A%2204569a08-33e0-3835-9a21-76af2e31fa69%22%2C%22type%22%3A%22PROGRAMME%22%2C%22action%22%3A%22PLAY%22%7D
2 Likes

Thanks for this. I also figured out how to deep link to a TV series page. I’ve updated the first post with your find and that.

For those wondering, I link to the series instead of autoplaying the episode because I have some automated cron jobs that pull info from TV maze and create a deep link when a new episode drops, but I didn’t want to manually update that with the new episode info. So the deep-link gets me to the show page, and that almost always has a one-click way to get to the next episode to watch. That way I don’t have to think about anything.

1 Like

Thanks to this post I’ve now finally managed to get my show watching automated.

I can add shows manually, or I get notified if something I’ve been watching in one of the aps are not allready in the list. Node red handles the automation - gets posters, search the web for url to the show, checks how many unwatched episodes I have using trakt tv.

Everything gets populated into a sensor per streaming service - like sensor.apple_poster.

With attributes like:

serie_1: Murderbot
serie_1_poster: https://image.tmdb.org/t/p/w500/mIKfKo2uDk3itzAPYIcSeYr4KtF.jpg
serie_1_link: https://tv.apple.com/us/show/murderbot/umc.cmc.5owrzntj9v1gpg31wshflud03
serie_1_usett: 4
serie_2: Stick
serie_2_poster: https://image.tmdb.org/t/p/w500/y8EWrf5Ry1WmYksWT7MOPWexvr5.jpg
serie_2_link: https://tv.apple.com/us/show/stick/umc.cmc.52w04zy67tiv11p8xvbc57wmc
serie_2_usett: 2

Just thought I would share if someone wants ideas on how to take advantage of deep links.

2 Likes

I would be very interested in understanding how you automated finding the links.

I’ve got one more for Hulu – it seems to be working for me using

action: media_player.play_media
target:
  entity_id:
    - media_player.office_apple_tv
data:
  media_content_id: hulu://watch/73df1fcf-09ed-4717-a9d2-14d3138afd7e
  media_content_type: url

so basically remove the host/query params of the web url and change the scheme to hulu://. changing watch to series opens the series page instead of playing the media. Still early in testing other variations, but hope this helps!

1 Like

I used SerpApi and sent a http request from node red. It searches for the name of the tv show, filter it so that it looks for Apple TV+ links for shows I have on Apple TV+ and prime, for netflix show it grabs the netflix link and so on. Chat GPT was a very good friend and set it all up :yum: A free SerpAPI gives you 100 searches per month I think

Brilliant. Would you be prepared to share the http request with (I assume) variables in it?