Last Thursday I published a post about my movie app with this sentence near the top: "It took the whole day to find out that button can't exist."
The button in question was Play on TV. Tap it, and a movie starts on the television. I'd spent a Saturday failing to build it, then spent the Sunday putting our picks on the Plex Watchlist instead.
At 6:37 that same Thursday evening, my Mac Mini started Monty Python and the Holy Grail on our Fire TV Cube with one command and no remote.
So the sentence was wrong, and it was wrong within a day. The way it was wrong is more useful to me than the script.
What "can't" was resting on
Three things held that sentence up. The Plex remote-control path really is gone, and that one survived. The other two were weaker than they sounded.
One was a set of links. I'd sent plex://play and plex://preplay URLs to the Apple TV, watched Plex open and stop, and wrote that the app "ignores everything after plex://." I'd tested two unofficial URLs and written down a conclusion about all of them.
The other was a port. That same Saturday I tried adb against the Fire TV Cube and got Connection refused on 5555. My post mentioned the Cube only as the plan for Sunday. Then Sunday went to the Watchlist and the Cube never got a second look. It was an unopened door in the same post that said no door existed.
The run
This time I wrote the terms down before anything ran. One question: can the Mini start ratingKey 796 on the Cube with one command? One checker: the Plex server's /status/sessions has to show that movie with state set to playing on the Cube. A Plex home screen fails. An info page fails. The agent saying it worked doesn't count. And an attempt log in my notes, so a failed try leaves a record behind.
I wanted that checker because of the Saturday before. atvremote launch_app had exited 0 on every link while nothing played.
Rounds one and two died on the port. The Cube lives on my IoT network on purpose, so a firewall was the obvious suspect, but the evidence said otherwise. A firewall drop usually looks like a timeout. This was a refusal, which meant the Cube itself was answering that nothing was listening there. Ping worked, and three of Amazon's own ports were open. Four tries over two minutes got the same answer. The Cube had also rebooted during round one, and this ruled that out as an excuse.
So I went into Settings, My Fire TV, Developer Options. ADB debugging was off.
That was the entire blocker. One switch, five days after the first refusal. I'd filed it as something to come back to, and it turned out to be the whole distance between "can't" and a working command. With it on, the port accepted on the first try, I ticked Always Allow on the TV, and the Mini had a trusted connection 14 seconds later.
The app told us its routes
Connected, the first thing we learned was that my notes were wrong. Plex's device list had the Cube on the old 10.30.9 app, and the plan assumed that. Asking the device itself gave 2026.20.0, the new React Native build. Next time I'll ask the device first.
Attempt three sent the old plex://play link. Plex Home. Same failure as the Apple TV.
Instead of guessing more URLs, I had the agent pull base.apk off the Cube and read the JavaScript bundle inside it. The answer was sitting in there:
[DeepLink] No app route for path, dropping
The new app treats whatever follows plex:// as one of its own internal routes. A path it doesn't recognize gets dropped, and the app lands on Home. So Plex wasn't ignoring deep links. It was rejecting mine, because I was speaking a dialect from the old app. The movie route was in the same bundle, along with a hook named useAutoplayDeeplinkRedirect, so we tried it with three spellings of autoplay at once:
plex://libraries/<serverId>/movie/<slug>/<ratingKey>?autoplay=1&autoPlay=true&play=1
The rest went quickly, and the checker graded each step:
- Attempt 4, the route with no params: the Holy Grail's info page, Watch button focused. Looks great on the TV. Checker says size 0. Fail.
- Attempt 5, the same page plus a
KEYCODE_MEDIA_PLAYkeypress: playing, but in two steps. Partial. - Attempt 6, params added, Plex in the background: "Who's watching?" appears, one select press, then the movie starts on its own.
- Attempt 7, params added, Plex in the foreground: plays with zero presses. Pass.
- Attempt 8, the whole thing as
firetv-play.sh 796: slug lookup, adb, the link, a select press if the profile picker shows up, then polling the server. Exit 0 in 18.4 seconds.
The script's exit code only means something because of how it's earned. It exits 0 when the server reports the movie playing on the Cube's address, and 1 otherwise. That's the fix for the exact lie that cost me a Saturday. Here's the line that counted as a pass, trimmed:
{"title":"Monty Python and the Holy Grail","ratingKey":"796","product":"Plex for Amazon FireTV","state":"playing","offset":8344}
What's still open
This is a smaller win than it sounds, and I've already overclaimed once on this subject.
There is still no button. There's a shell command, and nothing in the movie app calls it. It handles movies only, though the bundle has a separate route for TV episodes. I don't know which of the three autoplay params does the work, because the run hit its attempt budget before I isolated them, so all three stay. I haven't tested a cold start. And Amazon may flip ADB debugging off after an OS update, which would put me back at Connection refused.
The Apple TV is the bigger gap, since that's the box we usually sit in front of. I never sent it the new route. Its failure looks identical, which makes me suspect the same cause, and that's all it is until /status/sessions says otherwise.
The Watchlist stays. Sunday's point holds: what I asked for was browsing and launching from the remote, and that row does it.
I reread my sentence against what I'd actually tested. The honest version was "two links failed on one device, and I never turned on adb on the other." That's a less satisfying line. It also would have told me exactly what to do next.

