framesmith
Control Samsung Frame TVs over your local network — no cloud, no Samsung account.
framesmith is an async Rust library for managing artwork, display settings, slideshows, and more on Samsung's The Frame TV lineup. It communicates directly with the TV using WebSocket and HTTP protocols over your LAN.
Features
- Discover Frame TVs on your network via SSDP multicast
- Upload, select, and delete artwork (JPEG and PNG)
- Art Mode — enable/disable the Frame's signature display mode
- Slideshows — cycle through artwork with configurable duration, shuffle, and category
- Mattes & filters — apply decorative borders and photo filters
- Display settings — brightness, color temperature, auto-brightness, rotation
- Motion sensor — configure the idle timer and sensitivity
- Remote control — simulate 40+ button presses (power, volume, navigation, HDMI input, etc.)
- Authentication — persistent token-based auth with pluggable storage
- No native TLS dependency — uses
rustlsunder the hood
Quick Start
Add framesmith to your Cargo.toml:
[]
= "0.1.0"
= { = "1", = ["rt-multi-thread", "macros"] }
Connect and Upload Art
use Ipv4Addr;
use Path;
use ;
async
Discover TVs
use discover;
let tvs = discover.await?;
for tv in &tvs
Manage Art
// List all uploaded images
let images = tv.get_uploaded_art_images.await?;
// Get info for the currently displayed image
let current = tv.get_selected_art_image.await?;
println!;
// Get info for a specific image by content ID
let info = tv.get_art_image_info.await?;
// Select an image for display
tv.select_art_image_by_id.await?;
// Delete images
tv.delete_uploaded_art_images.await?;
// Download a thumbnail
let thumb = tv.get_art_image_thumbnail.await?;
write?;
Center Small Images on a Canvas
use ;
let image = builder
.load_png?
.center_image
.build?;
tv.upload_art_image.await?;
Display Settings
use ;
tv.set_display_brightness.await?;
tv.set_display_color_temp.await?;
tv.enable_auto_brightness.await?;
Slideshows
use ;
use Duration;
tv.enable_slideshow.await?;
Remote Control
use RemoteControlButton;
tv.press_remote_control_button.await?;
tv.press_remote_control_button.await?;
Custom Auth Token Storage
The default FileAuthTokenStore saves tokens to a file, but you can implement the AuthTokenStore trait to store tokens however you like (database, keychain, environment variable, etc.).
Network Requirements
- Your machine and the TV must be on the same local network (same subnet, or use SNAT masquerading for cross-VLAN setups)
- The TV communicates over port 8001 (HTTP) and port 8002 (WSS)
- The TV must be powered on or in Art Mode / standby with network standby enabled
- On first connection, someone must physically approve the pairing prompt on the TV screen
Error Handling
All operations return Result<T, framesmith::Error>. Error variants include ConnectionFailed, Unauthorized, TvError, Timeout, IncorrectImageSize, and wrappers for WebSocket, HTTP, JSON, I/O, and image processing errors.
CLI
Looking for a command-line tool? See framesmith-cli.
License
MIT