> ## Content Index
> Fetch the complete content index at: https://blog.bajonczak.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# AI Usage Monitor: The Little Desk Gadget I Built for Claude and Codex
- URL: https://blog.bajonczak.com/ai-usage-monitor-a-small-desk-display-for-my-claude-and-codex-quotas/
- Published: 2026-10-11T07:35:37.000Z
- Updated: 2026-10-11T07:35:37.000Z
- Description: I built a small ESP32-S3 desk gadget that shows my Claude and Codex usage, remaining 5-hour and weekly quotas, mascot animations, and live MQTT data from Home Assistant.
- Author: Sascha Bajonczak
- Tags: AI tools, ESP32, ESP32-S3, Home Assistant, MQTT, Claude, Codex

I use a lot of coding tools. Copilot is usually open in my editor, and Claude and Codex are often involved when I work on larger changes, debugging, or one of those ideas that starts with “this should only take an hour”.

The annoying part is keeping an eye on the quotas. The information is usually somewhere in a web dashboard, or I only notice it when a tool tells me that I have used too much. Nothing dramatic, but annoying enough to make me build a small screen for it.

That is how my AI Usage Monitor started.

It sits on my desk and shows the remaining Claude and Codex usage at a glance. The inner ring is the current 5-hour or session quota. The outer ring shows the weekly quota. The display uses remaining percentages, so something like `5H 46% FREE` tells me immediately where I stand. I do not have to convert a “used” value in my head first.

![Claude and Codex AI Usage Monitor switching between views](https://storage.ghost.io/c/ad/39/ad3949f5-cc02-41f8-8fec-9fcb9606e5e4/content/images/2026/10/monitor-preview-small.gif)

*The monitor switching between its different views. I made this short preview from the video I recorded while testing it.*

## The hardware

The project is built around the Waveshare ESP32-S3 Touch AMOLED 1.43-inch round display. It has a 466 × 466 pixel panel, which is plenty for readable labels, smooth rings, and a few small animated characters while keeping the device small enough for a desk.

The board gives me the main parts I need in one package:

- ESP32-S3
- 1.43-inch round AMOLED display
- 466 × 466 resolution
- Wi-Fi
- FT3168 touch controller
- QMI8658C motion sensor
- PSRAM for the larger rendering buffers

The motion sensor is more useful than I expected. When I turn the device, the screen can follow the movement and rotate automatically. That makes it feel more like a little standalone gadget and less like a development board with a screen attached to it.

The touch input is there as well, although this project is mainly about the information that is visible without touching anything. The round screen was one of the reasons I picked this hardware. It gives the monitor a different look from another small rectangular dashboard, but it also means that every label has to fit properly.

![Side view of the 3D-printed AI Usage Monitor enclosure and stand](https://storage.ghost.io/c/ad/39/ad3949f5-cc02-41f8-8fec-9fcb9606e5e4/content/images/2026/10/img_790550bd442e.jpeg)

*The current physical version is a simple white printed enclosure with a small stand and the USB cable running through the base.*

If you want to use the same display, I have added the hardware link below. It is an affiliate link, so I may receive a commission if you buy through it, at no extra cost to you.

## Home Assistant does the heavy lifting

The ESP32 does not log in to Claude or Codex. I did not want account credentials sitting on a tiny device on my desk. Home Assistant already has the relevant sensors, so it made sense to use that as the middle layer.

An automation reads the usage values, converts them into remaining percentages, and publishes a retained JSON message over MQTT. The topic is `ai-monitor/state`. Home Assistant sends an update every five minutes and also publishes the current state when it starts.

The retained message is handy. When the monitor reconnects to Wi-Fi, it can get the last known values straight away instead of waiting for the next scheduled update.

The payload is deliberately simple:

```json
{
  "claude": {
    "session_remaining": 72,
    "weekly_remaining": 57
  },
  "codex": {
    "session_remaining": 46,
    "weekly_remaining": 35
  }
}

```

The original integrations still provide the actual quota data. The monitor only receives it and displays it. That keeps the firmware easier to understand and means the device does not need any Claude or Codex authentication.

Before the first MQTT message arrives, the firmware shows demo values. That saves a lot of time while working on the interface because I can test the screen without starting the whole Home Assistant setup.

## A small screen still needs some work

The firmware is written with PlatformIO and Arduino. The interface uses LVGL 9\. MQTT is handled with PubSubClient and ArduinoJson takes care of the payload.

Drawing a nice-looking 466 × 466 display is a little more involved than putting a few labels on a screen. The project uses PSRAM for the LVGL image, the rotated frame, and the mascot layer. The ring backgrounds are cached there too. Switching between Claude and Codex does not need to rebuild all those pixels every time.

The rotation path runs at up to 30 FPS, while the QMI8658C is read in a separate sensor task. When I move the monitor, the mascot animation pauses for a moment so the rotation stays responsive. It is a tiny detail, but the whole thing feels better when the screen does not fight against the movement.

## Why the mascots?

A screen with two coloured rings and four percentages can look a bit too much like a monitoring dashboard. I wanted something with a little more character.

The Claude view has a small orange coding character. The Codex view uses a panda and dragon style character inspired by the Jadebyte look. Both have three small animation frames, including a blink.

They do not get in the way of the numbers. The provider name, 5-hour value, weekly value, reset information, and connection status are still the important parts. The mascots just make the device nicer to look at when it is sitting beside my keyboard all day.

![Claude view on the AI Usage Monitor](https://storage.ghost.io/c/ad/39/ad3949f5-cc02-41f8-8fec-9fcb9606e5e4/content/images/2026/10/img_1a77f1faa3b3.jpeg)

![Codex view on the AI Usage Monitor](https://storage.ghost.io/c/ad/39/ad3949f5-cc02-41f8-8fec-9fcb9606e5e4/content/images/2026/10/img_eb2ef830ce12.jpeg)

*The two live views on the hardware. The Claude screen uses the orange mascot, while the Codex view uses the small jade-coloured panda-dragon character.*

The animation frames are packed into the firmware rather than decoded from PNG files on the ESP32\. The active 120 × 120 ARGB8888 frame is stored in PSRAM and layered over the RGB565 display canvas through LVGL.

## The project is still in progress

Could I show the same data in a Home Assistant dashboard or a browser tab? Of course. I already have those options.

The point of this project is that I do not want to open another application just to answer one small question. A quick look at the desk tells me whether I have plenty of quota left, whether a longer task might be a bad idea, or whether a reset is coming soon.

It is also a nice excuse to play with a board that combines a round AMOLED display, touch, motion sensing, Wi-Fi, MQTT, LVGL, and PSRAM in a very small package.

This is still a work in progress, though. The firmware has not yet been fully flash-tested on the real hardware. The layout and code are built around the target display, but the final test still needs to check the display, touch, automatic rotation, Wi-Fi, and MQTT updates together. That is usually the point where the hardware finds one more surprise.

The enclosure is now available on MakerWorld: [Claude and Codex AI Usage Monitor](https://makerworld.com/de/models/3422571-claude-and-codex-ai-usage-monitor?ref=blog.bajonczak.com). I will keep refining the physical version and the firmware as I use it more.

The source code is available on [GitHub](https://github.com/SBajonczak/ai-usage-monitor-pio?ref=blog.bajonczak.com). It includes the PlatformIO configuration, LVGL interface, MQTT handling, Home Assistant example automation, mascot frames, and a demo payload.

The [Waveshare ESP32-S3 Touch AMOLED display is available here](https://link.amazon/B0iZ42iy?ref=blog.bajonczak.com). This is an affiliate link. I may receive a commission from qualifying purchases, without any additional cost for you.

For now, the monitor is doing what I wanted: it sits beside my keyboard, keeps Claude and Codex usage visible, and gives me another small hardware project to tinker with.

## Links

- [AI Usage Monitor on GitHub](https://github.com/SBajonczak/ai-usage-monitor-pio?ref=blog.bajonczak.com)
- [MakerWorld enclosure](https://makerworld.com/de/models/3422571-claude-and-codex-ai-usage-monitor?ref=blog.bajonczak.com)
- [Waveshare ESP32-S3 Touch AMOLED 1.43-inch display](https://link.amazon/B0iZ42iy?ref=blog.bajonczak.com) (affiliate link)