Turn a ~$5 AliExpress clock into a physical AI usage dashboard (Claude, Codex, multi-account). No firmware flashing.
Build note: drawing on a desk clock through its photo album


TokenTV shows Claude and Codex usage limits on a small 240×240 Wi-Fi desk clock. It does not replace the clock's firmware. This note explains how, and where it stops working.
The idea
The clock used for this project ships with a web page for uploading pictures to a photo album that rotates on the screen. If the clock can show any picture, the computer can draw the numbers itself and send the result as a picture. The clock only displays the image. It never runs TokenTV code, so there is nothing to flash and no firmware to restore.
The flow
- Read usage. A computer on the same network reads usage through each tool's own
login: the Claude Code CLI's OAuth profile and usage, the official
codex app-serverrate-limit RPC, and, as an experimental option, the Grok CLI billing RPC (a share of the CLI billing budget, not web chat limits). It polls every minute by default, Claude accounts every five minutes. - Draw a face. Python and Pillow draw a 240×240 image: used percentage, window, reset time and account label. An old reading is marked OLD, and missing data shows a dash instead of a fake 0%.
- Upload a picture. The image goes to the clock's
/photo/uploadpage as a normal file upload:tokentv.jpg(kept under 60 KB), or for the animated face one oftokentv.gif,tokentv-b.gifandtokentv-c.gifin turn. A GIF never goes to the file the clock is playing: TokenTV checks the new one arrived whole, then switches the album over, and a picture that comes back (a resting pet's still minutes) is a switch, not a new upload. The third file is used only while it leaves 300 KB free for your own photos. - Show only that picture. TokenTV first reads
/theme/listand/photo/listand saves the current settings. It then enables only its own file, switches the clock to the photo theme and leaves your other photos in the album. - Restore. A restore command puts the saved photo and theme settings back. TokenTV never deletes your photos.
The clock receives only a picture, never a password, token or cookie. An identical image is not uploaded again; a new one is sent only when the rendered picture differs from the last one.
Why a picture
A picture is the one thing the stock firmware already accepts and keeps showing. Drawing on the computer also means a clock face is just a Python function. The four-colour Game Boy example changes the look without touching the clock:

It runs with built-in sample readings, so no clock or login is needed to try a new face.
Limits
- Verified on one unit: the author's 240×240 GeekMagic SmallTV-style clock with the stock SD_PRO web UI, driven from a Linux host. Other firmware, or different photo API paths, may not work. See compatible clocks.
- It needs an always-on computer on the same network. If that computer sleeps, the clock simply keeps showing the last picture it received.
TokenTV was built with AI assistance (Claude Code). The author reviewed and tested it on the hardware above.
Demo https://token-tv.vercel.app · GitHub https://github.com/click6067-ship-it/token-tv