Skip to content

About

Read a basic bathroom scale's numbers with your phone camera and keep them as spreadsheet rows. A house build by the Somebody Build This AI steward.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

This app was 100% generated by AI (the Somebody Build This steward). It was designed, written and tested by Claude Opus 5.5 (Anthropic) working through Claude Code, from this idea on the board: A phone app that reads the numbers off a basic bathroom scale.

Built from an idea on Somebody Build This

Scale Reader

Point your phone at a basic (non-smart) bathroom scale, read each number off its screen as it flashes up, fix any that are wrong, and save them as one dated row you can paste into a spreadsheet.

What it does

  • Reads the scale's screen with your phone's camera. Drag the box over the numbers, then tap "Read Weight (kg)" (or whichever reading is next) as each one shows. The number goes into the form and the app moves on to the next reading.
  • You always check it. Every number it reads lands in a box you can edit before anything is saved, and you can type any number yourself instead. A small picture shows what the reader saw, so you can tell when the box needs moving.
  • Set up your scale once. List the readings in the order your scale shows them (for example Weight kg, BMI, Body fat %, Water %, Muscle %). It's saved on the phone. Each reading needs a name, and two readings can't share the same name and unit, so every column in your spreadsheet can be told apart.
  • One dated row per weigh-in. A history list, "Copy row" and "Copy all for a spreadsheet" (tab-separated, so it pastes into separate cells in Google Sheets, Excel or Numbers), a CSV download, delete a weigh-in, and delete all. "Copy row" uses the same columns as "Copy all", so a copied row lines up under a copied heading. A renamed reading keeps its column under its new name; a reading whose unit you change (say kg to lb) starts a new column, so old numbers keep their old unit and are never converted; and one you have removed keeps its own column, so no saved number is dropped.
  • The date keeps up. It starts as now, and if the app was left open (overnight, say) it catches up when you read or type the first number, unless you picked a date yourself.
  • Two tabs open. Changes made one after another in different tabs (or a tab and the home-screen app) are picked up: each change is made to the latest saved data, so an older tab won't undo a weigh-in saved, or bring back one deleted, in another. Other open tabs update to match. A number you're part-way through entering is never dropped; if another tab removed or changed that reading, the number is kept with its old name and a note says so. There's no lock between windows, so don't edit in two windows at the very same moment.
  • If the phone won't save. If the browser refuses a save (private browsing, or out of space), a warning stays up and the app keeps everything for as long as the page is open, so you can still copy or download it all.
  • Use a photo instead if the live camera isn't available: take or pick a photo, drag the box, read.
  • Works offline once it has loaded, and can be added to the home screen.
  • Private. Weigh-ins are saved on the phone only (browser storage) and the app never uploads them. Camera pictures are only looked at in memory while a number is read, and are never saved or sent. No account, no cookies, no analytics scripts, no third-party scripts, and no tracking by the app. Like any website's host, Vercel keeps request logs that can include IP addresses and referring sites. We only look at weekly totals of requests to load the app, grouped by referring site, to see whether people find it; these count requests, not people. We don't look at individual requests.
  • Only numbers. It records what the scale shows. No targets, ranges, interpretation or health advice. It isn't a medical device.

Works on phones from 375px wide, follows your system's light or dark mode, has visible keyboard focus (the reading box moves with the arrow keys and resizes with Shift and the arrow keys), and respects "reduce motion". Tested in Chrome at phone and desktop sizes, including with a simulated camera; it hasn't yet been tried against a real scale.

How the reading works

Scale screens use seven-segment digits, which general text recognition reads badly, so this app has its own small reader in src/logic/segments.ts. It runs entirely on the phone:

  1. Crop to the box, turn it grey and scale it to a fixed height.
  2. Adaptive threshold: each pixel counts as lit when it's closer to the nearby digit colour than to the nearby screen colour. This copes with shadows, uneven light and the faint unlit segments many LCDs show. Dark-on-light (most LCD scales) or bright-on-dark (LED) is worked out from the edges of the box, with a manual setting if it guesses wrong.
  3. Drop specks, plus anything that frames the box (the scale's bezel) or fills most of it.
  4. Find the band of rows holding the digits and undo slant (italic digits, or a phone held slightly crooked) by trying shears and keeping the ones where vertical segments line up best.
  5. Find decimal points (small dots at the bottom with nothing above them), split the rest into digit cells at empty columns, sample the seven segment positions in each cell with short scan lines, and decode. A pattern one segment away from a single digit is guessed and flagged for checking; anything else shows as ?.

Accuracy, honestly

src/logic/segments.test.ts draws seven-segment readings like 72.4, 105.8 or 8.81 (src/logic/synth.ts) and checks the reader gets every character right. 120 readings per condition:

Condition Read exactly
Clean, segment thickness 7–19% of digit height 100%
Digits 24–160 px tall 100%
Pixel noise (σ 8–24) 100%
Italic slant, slight rotation (±3°) 100%
Bright digits on a dark screen 100%
Faint unlit segments (10–30%) 100%
Uneven light, low contrast, slight blur 100%
Tight crops, narrow and wide digits, close spacing, a unit label beside the digits, dark bezel caught in the box 100%
Several of the above at once 93%
All of the above 99.6% (2032 of 2040)

Past what it's built for (reported, not required): very thick segments 97%, 6° rotation 90%, strongly visible unlit segments (45%) 80%, 16 px digits 64% (mostly the decimal point is lost), quite blurry 23%, digits nearly touching 16%.

These are generated images, drawn by the same project that wrote the reader, so they're kinder than real photos: no glare, reflections, perspective, LCD viewing-angle fade, or flicker. Expect lower accuracy on a real scale. That's why every reading is shown for you to check and edit before it counts.

Known limits: keep the box on the digits and inside the screen; a box that catches the bezel on only one side, glare across the digits, or a strong angle can misread. A display showing only dashes (----) reads as nothing. Letters (like Err or kg drawn in segments) aren't read. It doesn't read the live video by itself; you tap to read each number.

Develop

Needs Node 22+ and pnpm.

pnpm install
pnpm dev       # local dev server (the camera needs https or localhost)
pnpm test      # unit tests (vitest), including the accuracy table above
pnpm check     # typecheck + tests
pnpm build     # production build into dist/
  • src/logic/segments.ts: the seven-segment reader (pure functions, no DOM).
  • src/logic/synth.ts: draws test displays with slant, rotation, noise, blur, ghost segments, bezel and more.
  • src/logic/records.ts: saved data, number checking, setup checks, and the tab-separated and CSV exports. Each saved number keeps the id of the reading it came from, and repeated headings are numbered ("Reading", "Reading (2)"). Formula-like text is defused so it can't run in a spreadsheet.
  • src/storage.ts: saving on the phone. Every change is applied to the latest saved data, and after a refused save the page's own copy is kept for good (tested with two simulated windows and a full storage in storage.test.ts).
  • src/camera.ts: starting and stopping the camera. One start at a time; stopping, hiding the page, switching to a photo or saving cancels a start that's still waiting for permission or for the picture, stopping its stream at once, and a stream that turns up late is stopped too (camera.test.ts).
  • src/main.ts: the page: reading box, form, setup, history (app.ui.test.ts covers the date catching up, setup checks, and another window saving or changing the setup mid-weigh-in, in jsdom).
  • src/sw/worker.js: offline support; the build inlines it into /sw.js with the exact list of files to cache.

It is a static site (Vite + vanilla TypeScript) with no environment variables, secrets, backend or runtime dependencies. It's deployed on Vercel's free tier.

Maintenance

This app is looked after, not left behind. Dependabot proposes dependency updates. The Somebody Build This steward checks on the app each month and reviews security alerts in a weekly security check. Updates go through review and automated checks before they are merged.

Found a problem, or a scale it reads badly? Open an issue on this repository and describe what happened.

Build your own version

Want to build your own version? Ideas never lock: anyone can build this idea too. This is just one take on the idea, and you're welcome to ship yours there as well.

License

MIT. See LICENSE.

About

Read a basic bathroom scale's numbers with your phone camera and keep them as spreadsheet rows. A house build by the Somebody Build This AI steward.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages