Manage the art on a Samsung The Frame TV from the command line — discover it on the LAN, pair once, then upload, list, mirror, and run the art-mode slideshow.
Warning
Unofficial. This talks to the TV's undocumented art-app WebSocket channel, reverse-engineered against one set of firmware. It can break with a firmware update. Use at your own risk.
go install github.com/garyburd/framectl@latestPair once (accept the prompt that appears on the TV), then drive it with the
recorded data file — no -host/-name and no prompt thereafter:
framectl pair -name "The Frame 50" ~/frame.json
framectl wake ~/frame.json && framectl sync ~/frame.json ~/Pictures/framewake blocks until the TV is reachable and exits non-zero if it never comes
up, so it gates the sync cleanly in a script.
| Command | What it does |
|---|---|
discover [-timeout d] |
Stream a ip⇥name⇥mac line per TV found on the LAN (SSDP/UPnP) until interrupted. |
pair (-host <ip> | -name <name>) <file> |
Authorize against the TV (prompts on screen the first time) and record the connection — host/name, auth token, and MAC — in <file>. |
wake <file> |
Send Wake-on-LAN, then wait until the TV's control port answers. |
list [-all] <file> |
List photos on the TV (My Photos only; -all for every category). |
gallery [-all] <file> [out.html] |
Write a self-contained HTML contact sheet (thumbnails inlined as data URLs). |
slideshow [-shuffle] [-category id] <file> <interval> |
Run the art-mode slideshow. <interval> is off or one of the firmware's fixed durations (3m, 15m, 1h, 12h, 24h). |
sync [-n] [-delete-unmanaged] [-force] <file> <dir> |
Sync <dir> into My Photos: upload new/changed images, delete ones it uploaded that are gone. -n previews the plan; -delete-unmanaged makes it an exact mirror; -force re-uploads everything. |
delete <file> <content-id>... |
Delete photos from the TV by content id. |
<file> is the data file pair writes and the others read back. The full
contract — flag placement, name re-resolution, My Photos semantics — lives in
the package doc:
go doc github.com/garyburd/framectlPhotos that aren't already 16:9 are rendered onto the 3840×2160 panel without cropping; the letter/pillar bars are filled automatically based on the photo content. Create a 16:9 image to avoid automatic bar fills.
-timeoutbounds only connecting (resolve + dial + handshake), never the operation, so a longsyncorgalleryis never cut off by a deadline. Forwakeit's instead how long to wait for the TV to come up.- Ctrl-C cancels any command cleanly (exit 130).
-debugdumps every raw message exchanged with the TV to stderr.- Put flags before
<file>: flag parsing stops at the first non-flag argument.