
Turned a LILYGO T-Display into a little Claude usage meter,
A few days ago I ran into alessandro-001's ESP32-claude-usage-display and really liked the idea: a tiny always-on screen that shows how much of your Claude limits you've burned through. I forked it, then ended up rewriting a big chunk, so figured I'd share where it landed.
I'm running it on a LILYGO T-Display S3 (the small 1.9" color one).
The part of the original that bugged me was the auth. It grabs your usage by pasting your claude.ai browser session cookie straight onto the device. That cookie lives in the ESP32's flash and expires/rotates, so you're re-pasting it every so often, and I wasn't thrilled about a live session token sitting on a microcontroller on my wifi.
So I moved the whole credential side off the device. There's now a small Python proxy that runs as a Home Assistant add-on. It talks to Anthropic's OAuth usage endpoint (same data Claude Code's /usage shows), does the token refresh itself, caches the result, and hands the ESP32 a stripped-down JSON with just the percentages and reset times. The Claude token never leaves my HA box; the display only ever talks to the proxy. When I'm not home I expose the proxy through Tailscale Funnel, so it's a single URL that works everywhere with a proper cert.
Couple of other things I added:
- Multiple wifi networks (up to 4). I wanted to actually carry it to the office, so it connects to whichever saved network is in range and switches on its own when I move.
- Redid the UI. Dropped the old number-plus-bar for a ring gauge with the percentage in the middle (color-coded by how close I am to the cap), a countdown to the next 5h reset, and the 7-day reset as an actual local date/time.
Repo and a v1.0 release with a prebuilt binary: https://github.com/AussieCH/ESP32-claude-usage-display
Fair warning that's also in the readme: polling that usage endpoint from a third-party thing is a bit of a ToS grey area, so treat it as a "your own account, at your own risk" project.
Happy to answer anything. Also fully prepared to be told I overengineered the wifi part.