{"schema_version":1,"id":"pa0l0s-token-usage-indicator","name":{"en":"Token Usage Indicator"},"summary":{"en":"Personal-desk firmware showing Claude+Codex token usage on ESP8266 SSD1306 OLED and TTGO T-Display ESP32 color TFT","zh":"屏幕上四根进度条报告 Claude 与 Codex 的额度用到了哪：五小时会话一条、七天周期一条，两家各两行。"},"purpose":"token usage display","tier":"community","author":"pa0l0s","repository":"https://github.com/pa0l0s/token-usage-indicator","license":"MIT","shape":"square","scenes":["art","home","ai"],"boards":[{"name":"TTGO T-Display","page":"https://esp32gallery.com/boards/ttgo-t-display/"}],"native_board":{"en":"TTGO T-Display","page":"https://esp32gallery.com/boards/ttgo-t-display/"},"motion":true,"hardware":{"en":"Supported hardware: TTGO T-Display. Confirm the exact board revision and pin map in the upstream repository.","zh":"支持硬件：TTGO T-Display。烧录前请在上游仓库核对板卡版本与引脚定义。"},"notes":{"en":"Four bars report how close you are to the Claude and Codex limits: the five-hour session and the seven-day window, one pair per provider. Two builds share one codebase, an ESP8266 with a 128x64 SSD1306 and a TTGO T-Display with a 240x135 colour panel, with parsing, caching, timers and battery maths kept hardware-agnostic and unit-tested on a computer. Anthropic is queried directly with an OAuth bearer token pasted at the setup portal; Codex needs a LAN proxy, because chatgpt.com rejects anything that is not the Codex CLI at the TLS layer. Polls run every 300 seconds, a 401 triggers one refresh attempt, and eight failed fetches in a row reboot the board to clear heap fragmentation. Only one client can hold the rotating refresh token.","zh":"屏幕上四根进度条报告 Claude 与 Codex 的额度用到了哪：五小时会话一条、七天周期一条，两家各两行。同一套代码出两个硬件版本，ESP8266 配 128x64 的 SSD1306，TTGO T-Display 配 240x135 彩屏；解析、缓存、计时、电量估算这些逻辑与硬件无关，在电脑上跑单元测试。Anthropic 直连 OAuth Bearer 接口，凭证在 setup 门户里粘贴；Codex 必须自建局域网代理，因为 chatgpt.com 在 Cloudflare 层拒绝非 Codex CLI 的 TLS 指纹。默认 300 秒轮询一次，401 只触发一次刷新重试，连续 8 次取数失败就重启清堆。刷新令牌每次使用都会轮换，电脑和板子只能有一个持有。"},"evidence":{"en":"Reviewed from public README media at commit 862f0fe44306 under MIT. Firmware was not executed.","zh":"项目画面来自提交 862f0fe44306 的公开 README 媒体，许可证为 MIT；预览未执行固件。"},"readme_excerpts":[{"label":"Poll","quote":"Within one poll cycle (default 300 s) the dashboard populates."},{"label":"Limit","quote":"chatgpt.com rejects any non-Codex-CLI TLS fingerprint at the Cloudflare edge"},{"label":"Limit","quote":"Refresh tokens rotate on every use"},{"label":"Recovery","quote":"after 8 consecutive status==0 fetches"}],"images":{"type":"gallery","primary":"https://esp32gallery.com/previews/pa0l0s-token-usage-indicator/poster.jpg","poster":"https://esp32gallery.com/previews/pa0l0s-token-usage-indicator/poster.jpg","sources":["https://esp32gallery.com/previews/pa0l0s-token-usage-indicator/frames/view-001.jpg"]},"media_credit":{"status":"upstream-project-media","creator":"pa0l0s","source":"https://github.com/pa0l0s/token-usage-indicator/tree/862f0fe44306d268a8b12d04341f78bbbd8cb815","note":{"en":"Screenshots decoded from the upstream README at a pinned commit. Repository code and firmware were not executed; the license texts are included in the preview package.","zh":"画面来自固定提交中的上游 README 截图。未执行仓库代码或固件；预览包内保留了许可证文本。"},"reviewed":"2026-10-20"},"preview":{"browser_playable":false,"kind":"media_gallery","label":{"en":"Project screenshots","zh":"项目截图"},"width":960,"height":720,"shape":"square","source_commit":"862f0fe44306d268a8b12d04341f78bbbd8cb815"},"stars":0,"pushed_at":"2026-10-14T22:32:29Z","added_at":"2026-10-20T16:49:38+08:00","urls":{"html":"https://esp32gallery.com/projects/pa0l0s-token-usage-indicator/","html_zh":"https://esp32gallery.com/zh/projects/pa0l0s-token-usage-indicator/","json":"https://esp32gallery.com/data/catalog/projects/pa0l0s-token-usage-indicator.json","markdown":"https://esp32gallery.com/data/catalog/projects/pa0l0s-token-usage-indicator.md"}}
