I spent an evening trying to make a television play a film without touching the remote. The television is a Philips 65OLED759 in the living room. The film was on a NixOS box in the basement. What follows is the order things actually happened, including the parts where I was certain of something wrong.
Absence of discovery is not absence of service
The first pass was a UPnP scan. No replies. The obvious reading is that the set has no MediaRenderer at all, and for a while I wrote that down as a fact.
Then I fetched http://<tv>:49152/description.xml and got a full device description: urn:schemas-upnp-org:device:MediaRenderer:1, DMR-1.50, with AVTransport, RenderingControl and ConnectionManager services. It answers no SSDP, ever, so every discovery tool reports nothing while the service sits there listening on a port I had not thought to try.
That mistake cost an hour and produced a retraction.
The wrong port
My next idea was to serve the file myself: python3 -m http.server on the NAS, point the television at it. The set went to TRANSITIONING, then STOPPED, and the server log showed exactly one request, from 127.0.0.1. The host firewall drops new ports by design, so the set never reached it.
The fix was to stop inventing a port. Jellyfin was already running on 8096, had already indexed the video tree, and was already allowed on the LAN. Its DLNA ContentDirectory hands out a res URL that needs no token, and the set fetches it itself:
- browse the directory, take the item's
resURL SetAVTransportURIwith a DIDL-Lite wrapper, thenPlay- poll
GetTransportInfoandGetPositionInfountilRelTimeadvances
The film started. That is the whole mechanism, and nothing more.
Then I broke it
While testing, an item from a different library container was accepted and stayed in TRANSITIONING. The script I had written retried: direct play, then a transcode, then a transcode to another container. Three SetAVTransportURI calls on a transport that had never started. The screen went black with a loading wheel and the previous channel's audio played behind it.
Stop brought the transport back to STOPPED, an empty CurrentURI reported NO_MEDIA_PRESENT, and the DMR layer looked perfectly clean. The overlay did not care. This set has no key API — /6/input/key, /6/powerstate and /6/pair/request all return 403 — so nothing on the network could press Back. The next single attempt, made after a person cleared the screen, played normally.
The rule now lives in the script: read the transport first, refuse to send while it is TRANSITIONING, and make retries opt-in.
A cast is queued, not raised
Casting YouTube works over Lounge: pair once, then point a video at the screen. Two details are worth knowing and neither is in the documentation.
A live stream wedges the app into ambient mode, and nothing recovers it. And a cast does not bring the app forward: I sent a VOD while the set was showing a news channel, got exit code 0, and nothing happened until the app was opened by hand — at which point the video started immediately. Exit 0 means Google accepted the queue entry. It has never meant the television played anything.
The native app is pulled, not pushed
The set has a Plex app, which looked like the better route, so I claimed the Plex server. That part was easy and free: a claim token, one POST, and /identity flips from claimed="0" to claimed="1".
Then the interesting part. /clients listed exactly one client: product="Plex" deviceClass="pc" host="127.0.0.1" — Plex Web on the server itself. The television never appears. It answers no GDM broadcast, it listens on nothing (32500, 3005, 8324 all refuse), and playMedia returns 200 into the void. TV apps of this generation browse the server; they do not accept fling commands. The native app is excellent when a person picks up the remote, and unusable as an automation target.
The container, not the codec
One film would not start. It is h264 video with aac audio in an mp4, exactly what the set plays. Jellyfin advertises it as video/quicktime with a .mov path, because of its container lineage, and the set refuses it. Asking for the same item as .mp4 with Static=false returns real video/mp4 bytes, and it plays.
That transcode also reports a TrackDuration of ten seconds while the position climbs past it for the length of the film. The progress bar lies; the transport does not.
What it is now
One command: a title substring in, a film on the screen. Direct play where the container is plain, a transcode where it is not, one attempt per invocation, and a verification step that waits for the position to move — because every other signal in this story has, at least once, said yes when nothing was playing.