Skip to content
Projetos

victaphu/glass-home-samsung-tv

Ver no GitHub

Sobre

A minimal home screen for Samsung Tizen TVs: rotating nature photos, a glass dock of your apps, and a photo website served by the TV.

Design e mídia

Como estes números são medidos

Crescimento medido de estrelas

em 24 h
+2
em 7 dias
+6
em 15 dias
+15
em 1 mês
Coletando histórico

Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.

README.md

Original

Glass Home

A minimal, Apple TV-style home screen for Samsung Tizen TVs, plus a small password-protected website, served by the TV itself, for adding photos and shortcuts from your phone.

Glass Home on the TV

  • Full-screen photos that crossfade every 45 seconds with a slow drift: 12 bundled CC0 nature photos mixed with your own, shuffled once a day.
  • A frosted-glass dock of your apps, then your website and YouTube shortcuts, then +.
  • Clock and date, and optionally the weather (now plus 7 days, from Open-Meteo, no account or key).
  • A screensaver (only the photos after 3 minutes idle; the first button press just wakes the screen) and dimmed photos in the evening.
  • + shows the address and password of the TV's photo website. Open it on your phone to upload photos (resized on the phone, so iPhone HEIC works) and add YouTube or website shortcuts.
  • Plain HTML, CSS and JavaScript. No frameworks, no tracking, no ads.

The + panel (desktop preview; on the TV it shows the TV's own address)

Photos of it on the tested TV, and of the Samsung settings from the guide, are in docs/screenshots/on-tv.

Read this first

  • It does not replace Samsung's Home screen. No app can on its own: the Home button still opens Smart Hub. What works: pin Glass Home first on the Home row, turn Start with Smart Hub Home off and Autorun Last App on, and the TV starts in Glass Home. (Autorun Last App reopens the last app, so turn the TV off from Glass Home if you want to come back to it.) Two other projects, CleanFrame and Arn0, do change what Home opens, by rewriting undocumented TV settings from Developer Mode. Each was tested on one TV, and a firmware update can undo or break it.
  • You install it yourself in the TV's Developer Mode, signed with a free Samsung developer certificate made for your TV. That needs a computer, about an hour the first time, and a free Samsung account. There is no ready-made download: a signed package only installs on the TV it was made for.
  • Reported working on Samsung TVs from 2018 to 2025 (Tizen 4 to 10): see Tested TVs. Reports welcome. If YouTube, Netflix or Prime Video won't open from the dock, set smartHubLaunch: true; on 2018 TVs (Tizen 4) also set photoService: false (see Settings).
  • A big OS upgrade can delete it. Samsung's Tizen OS upgrades (for example to Tizen 9 / One UI Tizen) have removed sideloaded apps on other TVs. You can reinstall it the same way.
  • The photo website is plain HTTP on your home network. It only answers devices on your local network and needs the password, but anyone on the same Wi-Fi who intercepts traffic could see the password and photos in transit.

Install

Step by step: docs/INSTALL.md. In short:

  1. Turn on Developer Mode on the TV.
  2. Install Samsung's Tizen SDK command-line tools on your computer.
  3. Make a free Samsung certificate for your TV (one browser sign-in).
  4. Set your options in app/js/config.js.
  5. scripts/build.sh, then scripts/install.sh.
  6. Pin it on the Home row, set it to open at power-on, and turn Developer Mode off again.

Settings

All in app/js/config.js:

Setting What it does
apps The dock apps, in order. Each is found by its Tizen app ID, then by name. Remove what you don't have. icon: false shows a plain name tile.
inputs HDMI ports as dock tiles, after the apps: { hdmi: 4, label: 'Games console' }, optionally with an icon path under app/. { tv: true, label: 'Live TV' } is the antenna (the TV's tuner). Empty by default.
weather Off until you set enabled: true, latitude and longitude (place is the label shown under the forecast; temperatureUnit: 'fahrenheit' for °F).
locale Date and time format, e.g. 'en-GB'; empty uses the TV's.
ambient Screensaver delay.
night Evening dimming hours (24-hour, TV clock).
youtubeMode How YouTube shortcuts are opened (see below).
photos.matchSky true opts into time/weather and seasonal matching for tagged bundled or remote photos. Off by default.
photos.remoteManifest URL of an optional HTTP(S) photo manifest. Empty by default; works with photoService: false. See remote photos.
photoIntervalMs How often the photo changes.
photoService false turns off the photo website, and with it +, shortcuts and your own photos. For TVs that can't run it (2018 models); also remove <tizen:service> and the web.service feature from app/config.xml.
smartHubLaunch true if apps won't open from the dock (seen on 2017–2020 TVs): opens them through Samsung's own launcher, trying each Samsung store ID listed for the app, and hides the photos while they start. Off by default.

Your own logo: scripts/use-logo.sh path/to/logo.png (square, ideally 1024 x 1024) makes the TV icon and the website icons. The on-screen name is in app/index.html (brand-name) and app/config.xml (<name>).

Using it

Remote What happens
Left / Right move along the dock
OK open the app, website or video, or switch to the HDMI input
Hold OK Move left, Move right, Remove (shortcuts) or Hide (apps and inputs), Cancel
Back closes the menu or the panel; does nothing on the home screen
OK on + the website address and password; New password; show hidden apps

Photos and shortcuts. On a phone on the same Wi-Fi, open the address shown under + and sign in with the password shown there. Upload photos (up to 300, 500 MB in total; portrait photos are fitted on blurred edges or cropped), and add websites or YouTube links (videos, playlists, Shorts, links with a start time). New photos appear next on the TV. The phone stays signed in for 30 days.

YouTube shortcuts open the YouTube app at the video. On the tested TV the plain watch?v= link worked from a cold start and while YouTube was running; Samsung's documented PAYLOAD deep link lost the video at YouTube's "Who's watching?" screen. The switch at the bottom of the + panel cycles through watch URL, the PAYLOAD form, and both, if yours behaves differently.

Websites open in Samsung's own browser (the code follows Samsung's documented method, but this wasn't tested on a TV yet).

HDMI inputs (the inputs setting) switch the TV with tizen.tvwindow.setSource, then open Samsung's TV viewer (org.tizen.tv-viewer) so the input fills the screen. This needs the public tv.window privilege. Tested on a 2022 S95B (Tizen 6.5) with HDMI 4.

Live TV ({ tv: true } in inputs) does the same with the TV's tuner source. If the TV reports no tuner source, only the TV viewer is opened. Tested on a 2022 S95B (Tizen 6.5), which reports the tuner as TV number 1.

Tested TVs

Reported by people running it. Thank you! To add yours, fill in a TV report.

TV Year Tizen Notes Report
Samsung S85F 2025 10 #8
Samsung Q70C 2023 8 the TV it was built on
Samsung S95B 2022 6.5 HDMI and Live TV tiles tested here #10, #12
Samsung Q80A 2021 6.0 #9
Samsung QN90A 2021 6.0 needed the CSS fixes from #5, now included #4
Samsung Q77T 2020 5.5 photo website works; YouTube, Netflix and Prime Video needed a local fix to open #13
Samsung Q70T 2020 5.5 the service runs on Node 4.4.3 here; the fallbacks in app/service/compat.js cover it #15
Samsung TU8000 2020 5.5 photo service included #3
Samsung NU6900 2018 4.0 with photoService: false and smartHubLaunch: true #2

A 2017 MU7000 (Tizen 3.0) also runs it with two changes that aren't in this repository yet (#6).

How it works

 TV (one Tizen web app package)
 ┌──────────────────────────────┐   http://127.0.0.1:8090/local/*    ┌────────────────────────────┐
 │ Glass Home                   │ ─────────────────────────────────▶ │ Photos service             │
 │ index.html, js/, css/        │   loopback + this install's key    │ app/service/*.js (Node)    │
 │ dock, photos, clock, + panel │ ◀──── photos, shortcuts, password  │ port 8090 on the home LAN  │
 └──────────────────────────────┘                                    └─────────────▲──────────────┘
         starts the service at launch                                             │ http://<TV IP>:8090
                                                                     phone on the home Wi-Fi, signed in
  • The app is what you see. It asks the service for your photos and shortcuts and keeps the last answer, so it still works if the service is down.
  • The service is a Tizen web service inside the same package (Node.js; the tested TV runs Node 16, the code sticks to the Node 12 API). It serves the phone website and keeps everything in the app's private data folder, which survives restarts and updates and is deleted with the app. (Only if that folder isn't writable does it fall back to /home/owner/share/GlassHome1, which is kept after uninstalling; the + panel shows which is in use.)
  • With the free (public-level) certificate the service can't start itself at boot; the app starts it whenever it opens.

Security. The password is three random words and two digits, stored as a PBKDF2-SHA256 hash. Five wrong tries lock a device out for 5 minutes, and a device guessing passwords can't block others from signing in. The site only answers private-network and loopback addresses, refuses other host names (DNS rebinding), and has CSRF protection and a strict content security policy. Uploads are checked as real JPEGs with size caps. The app and its service share a random key generated per install (never committed). So the TV can show the password after a restart, the service keeps it in a private file next to its hash.

Network use. The app contacts nothing except the service itself; Open-Meteo if weather is on; each website you add, once, for its own icon (no third-party favicon services, never addresses on your home network); and YouTube for shortcut titles and thumbnails.

Develop

Needs Node 22 (what it was developed and tested with) and a Chromium-based browser (Chrome, Brave, Chromium or Edge; set BROWSER to choose). The servers listen only on 127.0.0.1; the demo shortcuts and the tests fetch site icons and YouTube details from the internet (node dev/run.js --no-fetch avoids that, but some tests then fail).

node dev/run.js --demo     # service :18090, TV app :18091, throwaway data
                           # TV app:  http://127.0.0.1:18091/index.html?preview=1
                           # website: http://127.0.0.1:18090/ (password printed)
dev/test-api.sh            # website + service API (curl)
node dev/ui-test.js        # TV app and phone website in a headless browser
node dev/test-netutil.js   # address rules (IPv4/IPv6, LAN, loopback, hosts)
node dev/test-parsers.js   # hostile-page parsing stays fast
node dev/test-limiter.js   # sign-in throttle and fair queue
node dev/test-data.js      # TV app's service client
node dev/test-ytparse.js   # YouTube link parser
node dev/test-compat.js    # Node 4 fallbacks match the built-ins
node dev/test-launch.js    # opening apps: store IDs in turn, then the normal launch
node dev/test-backdrop.js  # photo rotation
node dev/lint-node12.js    # service code stays within the Node 12 API

GitHub runs all of these on every pull request and push to main (macOS, Node 22): .github/workflows/test.yml.

Preview options: ?preview=1, ?api=…, ?focus=N, ?bg=nature-05.jpg, ?panel=1, ?menu=1, ?still=1, ?wx=mock (sample weather), ?idle=MS (screensaver delay), ?night=1, ?inputs=1 (two sample HDMI tiles), ?photoService=0.

The dev tools and image scripts use macOS's sips; the app itself has no platform dependency.

Also in here

  • docs/SAMSUNG-SETTINGS.md: turning off Samsung's content recognition, ad ID, promotions and autoplay, a DNS ad filter that kept every app working, and how to undo each.
  • tools/: a standard-library Python remote for the TV's local control API (tvremote.py), a page that turns an iPhone on the same Wi-Fi into a camera pointed at the TV (phonecam.py; Samsung TVs can't take screenshots), and Wake-on-LAN (wake.py).

How this was made

Built in an evening with Claude Code, which did the research, drove the TV over Wi-Fi, checked every step through the iPhone camera, and wrote and tested the app. It also watched one cat video. Proof.

Licence

MIT. Photo and data credits: CREDITS.md. Not affiliated with Samsung, Apple or any app shown.

Photos from a URL

Set photos.remoteManifest in app/js/config.js to the URL of a JSON file on a NAS, Pi, or other web server. The TV loads it once at startup and adds its photos to the bundled rotation. No additional enable flag or photo service is required. Restart Glass Home to load edits to the manifest.

[
  {"file": "photos/coast.jpg", "title": "Coast", "author": "Your name", "licence": "Your licence"}
]

The existing photos, items, or wallpapers object wrappers and src/path aliases also work. Relative paths resolve against the manifest URL (including ../); absolute HTTP(S) image URLs work too. Remote images must have a .jpg, .jpeg, .png, .gif, .webp, .avif, or .bmp path; actual format support depends on the TV. The manifest is data only, with no scripts, nested manifests, or settings. Only the configured manifest address is requested; image addresses come from its entries. Failed or invalid manifests leave the bundled/uploaded photos available. Without any photos, the background gradient remains visible.

Use a server and images you trust. The TV must be able to reach them without sign-in; HTTP traffic is unencrypted. For desktop previews, the server must allow cross-origin requests (CORS). No Home Assistant integration is needed.

Match photos to the sky and season

Set photos.matchSky: true to use optional entry tags in either manifest:

{"file":"coast.jpg", "time":["dawn","golden"], "weather":["clear","fog"], "month":[6,7,8]}

time accepts dawn, day, golden, night; weather accepts clear, cloudy, fog, rain; month accepts numbers 1–12. A holiday string can be halloween, thanksgiving (US), christmas, or newyear. No separate switches are needed for tags. With matching off, all tags are ignored. Untagged photos and uploaded photos retain their normal rotation.

Dawn runs from 45 minutes before sunrise to an hour after; golden hour from 90 minutes before sunset to 30 minutes after. Otherwise it is day between sunrise and sunset, night outside them. Weather supplies sun times for the configured location; keep the TV clock in that location's timezone. Without sun times it uses 07:00 and 18:30. Stale weather stops narrowing by weather. Clear is WMO 0–2, fog 45/48, rain 51–67, 80–82 and 95+, everything else cloudy.

The rotation prefers regular photos matching time and weather, then time alone if fewer than three fit, then all regular photos. Missing tags impose no restriction. Holiday photos join during the four weeks before Halloween, US Thanksgiving (no earlier than Nov 1), and Christmas (after Thanksgiving), through each holiday. Dec 26–31 is New Year. Holiday photos prefer the current time if at least three fit. Month photos join only in their month and time. Entries with both seasonal tags must satisfy both. Out-of-season entries never enter the fallback; if none qualify, the last photo or gradient stays visible. The pool updates on weather changes and once a minute, taking effect on the next scheduled transition. Desktop previews accept ?holiday=christmas|none and ?month=12; TV query strings do not override the season.

Settings on the TV

Open the Settings dock tile with OK. Up/Down selects a row; Left/Right or OK changes it. Back saves and reloads Glass Home to apply the changes. Photo interval, sky matching, screensaver delay, evening dimming hours, and temperature unit are available even with the photo service disabled.

Settings stay in this app's local storage across restarts and updates. Reset to the defaults, then Back, removes the overrides and restores your config.js values. Uninstalling the app also removes the overrides. The manifest address, weather location, app IDs, and build options stay in the configuration files. No Home Assistant or phone app is required.

Explore projetos relacionados

Carregando…