Documentation
¶
Overview ¶
Command framectl manages art on a Samsung "The Frame" TV over its undocumented art-app WebSocket channel. Its subcommands:
framectl discover # stream TVs found on the LAN (SSDP/UPnP) until interrupted framectl pair (-host <ip> | -name <name>) <file> # authorize, record connection in data file framectl wake <file> # Wake-on-LAN, then wait until the TV is reachable framectl list <file> # list photos on the TV (TSV) framectl display <file> <content-id> # show one photo on the TV framectl display-all <file> <interval> # slideshow My Photos (the TV's "Display All"; off, 3m, 15m, 1h, 12h, 24h) framectl contact-sheet <file> [out.html] # write an HTML contact sheet (thumbnails as data URLs) framectl upload <file> <image>... # upload images to "My Photos", printing each content id framectl sync <file> <dir> # sync <dir> to "My Photos" (-delete-unmanaged for exact mirror) framectl delete <file> <content-id>... # delete photos from the TV by content id
list and contact-sheet default to the "My Photos" category (the photos uploaded to the TV); pass -all to include every category.
discover streams a tab-separated "ip<TAB>name<TAB>mac" line per device as it's found (see discover.go). pair and the commands that follow take exactly one of -host (an address) or -name (an SSDP friendly name, resolved by a discovery pass and matched case-insensitively).
pair connects to the remote-control channel, which prompts for approval on the TV the first time (accept it) and returns an auth token; pair records that token in the data file <file> along with the identifier it was given — the -name if pairing used -name (re-resolved by SSDP on each later use, so it survives the TV's address changing), otherwise the -host verbatim — plus the TV's MAC, so wake can send a Wake-on-LAN packet. list (and the other commands) read <file> and reuse the token, so they need no -host/-name and trigger no prompt:
framectl pair -name "The Frame 50" ~/data.json framectl wake ~/data.json && framectl sync ~/data.json ~/Pictures/frame
wake powers the TV up and blocks until it's reachable, then exits 0, so it gates a sync cleanly in a script (it exits non-zero if the TV never comes up).
Put any flags before <file>: flag parsing stops at the first non-flag argument. Add -debug to dump every message exchanged with the TV.
-timeout bounds only *connecting* to the TV (resolving a -name + dial + handshake) — never the operation itself, so a long sync or contact-sheet is never cut off by a deadline. Ctrl-C cancels any command cleanly (for discover, the scan duration; without -timeout, discover watches until Ctrl-C). For wake, -timeout is instead how long to wait for the TV to become reachable.