Appearance

Language

Build a personal website from 0

Turning a Divoom Times Gate into a Growth Dashboard: Traffic, SEO, Followers and Claude Code Usage (2026)

I turned the five screens of the Divoom Times Gate on my desk into a dashboard for my own numbers: site visits, search impressions and clicks, YouTube / Threads / X followers, and today's Claude Code usage. A Cloudflare cron collects the data, and my Mac renders once a minute and exits. The code is open source.

Kelvin Wang · · 6 min read

Key points

  1. Collection runs on Cloudflare, so it keeps going while my computer is off, and there is always a day to compare against for "a week ago".
  2. Nothing stays running on the Mac: launchd runs once a minute and exits, taking 0.2 s when cached.
  3. Site traffic and SEO come from a read-only JSON endpoint of my own, so GA4 and Search Console credentials stay out of the collector.
  4. Python started by launchd can't reach the lamp on the LAN, so pushing images goes through the system curl.

My site and my social accounts only started this month. What a new account needs most is to see whether the numbers are moving, but opening four or five dashboards every day gets old fast. I had a Divoom Times Gate on my desk, with five 128×128 screens that only showed clocks and animations, right where I look every day1.

What do the five screens show?

Screens 1 to 3 are fixed. Every 5 minutes, screens 4 and 5 show two tiles drawn at random from a pool, and the same pair never comes up twice in a row.

  • Website. It shows 7-day visits, search impressions with a % change and 8 weeks of visits as bars, with the date the data runs through.
  • All followers. It shows the total across every account, with per-platform subtotals and the change over a week.
  • Claude Code. It shows a clock, today’s sessions and output tokens. These are read from local transcripts and never uploaded.
  • The two rotating tiles. They show search clicks, YouTube subscribers, and Threads and X followers. Platforms that aren’t connected yet show a dotted frame.

For a site that is just starting, I only check three numbers a day:

  • Visits: whether anyone is coming.
  • Search impressions: whether Google has started to show me in results. These usually move weeks before clicks do.
  • Search clicks: whether rankings are turning into traffic.

How is the system split?

Cloudflare Worker (every 15 min)  ──GET /latest──▶  Mac: launchd runs run.sh every 60 s
  YouTube   public channel page                       1. curl the snapshot (every 5 min) → data/latest.json
  Threads/X headless browser on public pages          2. dash.py draws 5 images → the lamp
  JSON      my own traffic / SEO endpoint                          │
  KV: latest snapshot + one per day (60 days)          LAN POST with LocalToken
                                                                   ▼
                                                            Divoom Times Gate

It is split this way for three reasons:

  1. Collection runs in the cloud. Numbers keep coming in while the computer is off or asleep. KV keeps one snapshot per day, so there is always a day to compare against for “a week ago”. Threads and X only show their counts after JavaScript runs, and Cloudflare Browser Run (formerly Browser Rendering) on the free plan can run it.
  2. Rendering runs locally. The lamp only accepts requests from the same LAN, and my Claude Code transcripts exist only on my computer.
  3. Nothing stays resident. Each run does its work and exits. With a cache it takes 0.2 s and 47 MB. The Claude transcripts get a full rescan every 5 minutes, which takes about 5.7 s and 61 MB. Nothing uses memory between runs.

The collected data is just a file, data/latest.json, so anything else can read it directly.

How do site traffic and SEO get in?

The GA4 and Search Console APIs both need OAuth or a service account, and I didn’t want those credentials inside a desk lamp’s collector. So I put a read-only JSON endpoint in between. A small service pulls GA4 and Search Console on a schedule, stores the results, and returns only the few numbers the lamp needs. The collector reads it with a token every 15 minutes.

{
  "through": "11/18",
  "traffic": { "visits": 4820, "visits_prev": 4100, "weekly": [2100, 2600, 2450, 3100, 3500, 3900, 4100, 4820] },
  "search":  { "impressions": 18400, "impressions_prev": 14900, "clicks": 512, "clicks_prev": 431 }
}

(These are example numbers.) The config maps fields with dotted paths, such as "visits_7d": "traffic.visits", and a stats tile draws them. Any other data source works the same way, as long as it returns JSON to a GET with a Bearer token.

Search Console data runs two or three days behind, so the tile always shows the date the data runs through. That way, numbers that haven’t arrived yet don’t look like a drop.

Go deeper Why Is My Website Not Showing Up on Google? A 2026 Indexing and Launch Checklist When Google can't find your site, tell whether it hasn't been discovered or hasn't been indexed, plus a launch checklist.

How are follower counts collected?

No API keys are involved; the collector reads public pages:

  • YouTube: the channel page source already contains subscribers, views and video count, so a plain fetch gets them.
  • Threads, X: the numbers only appear after JavaScript runs. A Cloudflare headless browser opens the page, waits for the word “followers” and then reads the text.

On the free plan the headless browser gets only 10 minutes a day, and past that it is blocked until the next day2. So it has to be rationed:

LimitWhat I do
Browser Run free plan: 10 minutes a dayOne pass over a few accounts takes about 25 s, so it runs only on the first cron of every second hour; other runs reuse the last numbers
The pages never go network-idleWait for the word "followers" on the page instead
Threads "recent views" needs a loginNo logged-in session; followers only
A redesign can break scrapingOn failure, keep the last numbers and mark when they went stale, so the lamp never goes blank

Requests are spaced 1.5 to 4.5 seconds apart at random. Reading public pages is not an official API, and a platform’s terms may limit automated access, so I only use it for my own accounts.

How does the lamp’s local API work?

Divoom hasn’t published full documentation for the Times Gate. I use, and have tested, only two commands. Every request is a POST http://<lamp-ip>/post with a JSON body, and it must include LocalToken. Without it, the lamp answers DeviceToken is err.

  1. Get the current number. Send Draw/GetHttpGifId to get the lamp’s current image number, PicId.
  2. Send the image. Send Draw/SendHttpGif. LcdArray picks the screen ([0,0,1,0,0] is screen 3), PicID must be greater than that PicId, and PicData holds a base64 128×128 JPEG.
  3. Repeat for all five screens. One screen per request.

If PicID doesn’t go up, the lamp reports success but keeps the old image. This was one of the places I was stuck longest.

The other trap was the subnet. My Wi-Fi and wired network were served by two different devices, so the lamp was on 0.x and the computer on 1.x, and they couldn’t see each other. Once both got their addresses from the same device, it worked.

What do you need to set it up?

  • Lamp. A Divoom Times Gate, plus its IP and LocalToken.
  • Computer. macOS, Python 3.9+ and Pillow. Run python3 dash.py --demo first to see the five screens with example data, no lamp needed.
  • Cloudflare (optional). A Cloudflare account if you want site and follower numbers; the free plan is enough. If you only want the clock and Claude usage, you can skip it.

The full steps, config format and tests are in the README on GitHub1. The repo also includes a SKILL.md, so you can hand the repo to Claude Code and it can walk you through the setup.

GitHub kelvin-sl/divoom-times-gate-dashboard The full code for this desk dashboard: collector, renderer, example config and tests.

The Claude Code tile reads the local transcripts, and counts tokens from the same data as the article below.

Go deeper How to Check Claude Code Token Usage: Full Tutorial with ccusage and Python (2026) Use ccusage and Python to work out weekly tokens and their cost from the local transcripts.

Sources

  1. 1. divoom-times-gate-dashboard · GitHub · Checked 2026-11-19
  2. 2. Browser Run: Limits · Cloudflare Docs · Checked 2026-11-19

About the author

Kelvin Wang

Electrical engineer building tools with AI agents, sharing hands-on notes on engineering and investing.

More about me