Library / SDK
FossPrime/Steam-Controller-Auto-Charge avatar
FossPrime/Steam-Controller-Auto-Charge

Steam Controller Auto-Charge: haptic pulses steer a controller onto its charger

Slam the controller into the magnetic puck until it charges

354 stars9 forksVueMIT

At a glance

What is it?
A gloriously over-engineered web app that pilots a Steam Controller into its magnetic charging puck with optical flow, WebHID telemetry and 70 Hz haptic pulses, entirely in the browser.
Who is it for?
Steam Controller Auto-Charge fits tinkerers who own the hardware, run Nix and a Chromium browser, and want a working example of browser-controlled physical devices, or who simply want the delight of a self-docking controller. Skip it if you lack the overhead webcam setup, use Firefox or Safari, or expect a polished product rather than a brilliant demo.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 144 days ago.
What is it written in?
Mainly Vue, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 23, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • FossPrime/Steam-Controller-Auto-Charge354 ★ · +6
Star history
Repository2026-10-012026-11-23
FossPrime/Steam-Controller-Auto-Charge348354

6 Stars in the last 53 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The problem nobody needed to solve this way

The Steam Controller charges on a magnetic puck, and getting it onto that puck is a two-second manual job. Steam Controller Auto-Charge, by fossprime, solves it anyway, with the full modern stack: an overhead webcam, optical flow computer vision, WebHID telemetry, a Rust-to-WebAssembly neural network, and haptic pulses fired through the controller's internal actuators to steer it across the desk into the puck, unattended. The description line delivers the joke and the architecture in one breath: slam the controller into the magnetic puck until it charges.

Under the humor is a genuinely instructive build. The project demonstrates browser-native hardware control through WebHID, OpenCV.js sparse optical flow running against a live camera stream, and a Rust CNN compiled to WebAssembly running detection in a Web Worker, all in a Vue 3 application with no server involved.

How the controller drives itself

The loop works like this. You pick points on the controller and the puck in the camera view; OpenCV.js runs Lucas-Kanade optical flow to track them frame to frame; and the app steers the controller toward the puck with asymmetric haptic pulses at 70 Hz through its dual linear resonant actuators, which skitters it across a smooth desk like a tiny vibration-driven robot.

Details show real hardware attention. When the controller comes within 150 pixels of the puck, pulse frequency halves for a gentle magnetic dock instead of a crash. Battery confirmation is honest telemetry rather than assumption: the app intercepts Report ID 121, the charging signal, to confirm magnetic contact, and parses Report 67 for live battery percentage and cell voltage in millivolts. A Rust-WASM object detector runs in a Web Worker so detection never stalls the tracking loop.

Setup: one camera, one command

Requirements are specific: Nix as the only build dependency, working on Windows, macOS and Linux; a Chromium-based browser with WebHID; and a webcam mounted directly overhead, pointing down at the desk. The project starts with a single command that fetches dependencies and builds the WASM module:

bash
nix-shell --run "npm install && npm run dev"

From there the README's sequence is six steps: mount the camera, place the puck, stand the controller upright on the desk, click Connect Steam Controller to pair over WebHID, click Auto-Track to engage the loop, and watch it make its way across the desk. The button re-engages automatically on page reload, and clicking it again disengages. Manual tracking remains available for purists, clicking the puck, then the top and bottom of the controller, which is the sort of fallback that separates toys from tools.

The code map

The architecture section maps features to files cleanly. App.vue handles camera streams, UI reactivity, the PID tracking loop and the OpenCV.js Lucas-Kanade flow. steamController.ts is the WebHID abstraction, translating ordinary API calls into the Steam Controller's specific byte payloads for LRA pulses and battery polls. objectDetector.ts and objectWorker.ts push detection off the main thread, and wasm-object-detect holds the Rust implementation compiled to WebAssembly.

For a developer curious about any of these pieces, the repository doubles as a reference implementation: WebHID byte-level device control, OpenCV in the browser, Rust-WASM workers, and Vue wiring, each in its own file. The project is MIT licensed, ships one release, and its last push was on 2026-07-02, which fits a build-it-once showpiece.

Limits, physical and practical

The constraints are mostly physics. The optical flow approach wants a smooth desk, a stable overhead camera, and lighting that does not confuse Lucas-Kanade; haptic locomotion needs a low-friction surface to work at all. WebHID restricts the browser to Chromium family, and the whole scheme is bound to Steam Controller hardware with its particular reports and actuators. The Nix requirement, pitched as the only dependency, is itself a hurdle for developers who have never touched Nix, though it does make the build reproducible across platforms.

Project age matters little here, but honesty does: one release, last push on 2026-07-02. This is a demo of techniques, presented with a wink, and its README, requirements and failure expectations are all stated clearly. Build it for the joy of watching a controller vibrate its way onto a charger, or read it to learn the stack; either is a valid return.

Against plugging in the cable

The obvious alternative is the USB cable, or placing the controller on the puck by hand, and the README never pretends otherwise; the fun is the point, and the inspiration credit to a YouTube video makes that lineage clear. The more serious comparison is as a template: the same pieces, camera, WebHID, WASM detection, haptic or motor output, compose into desk robots, camera-driven drawing machines, or physical dashboards.

For anyone who has wanted to drive hardware from a browser tab with no server and no installed toolchain beyond a browser, this repository is a compact, working example with a sense of humor. It will not change how you charge a controller, and it might change how you think about what a web page can touch.

Editorial conclusion

Steam Controller Auto-Charge fits tinkerers who own the hardware, run Nix and a Chromium browser, and want a working example of browser-controlled physical devices, or who simply want the delight of a self-docking controller. Skip it if you lack the overhead webcam setup, use Firefox or Safari, or expect a polished product rather than a brilliant demo. Verify the fun cheaply: run the single nix-shell command, connect over WebHID, and watch the first haptic-guided approach; if the controller reaches the puck on your desk surface, the rest is repeated joy.

Frequently asked questions

How do I know if my Steam Controller is charging?

This app confirms it by intercepting the controller's Report ID 121, the magnetic-charging signal, and it also parses Report 67 to show live battery percentage and cell voltage in millivolts.

My Steam Controller battery is low. How can I fix this?

Put it on the magnetic charging puck; this project automates exactly that step, steering the controller to the puck with haptic pulses and confirming charge contact via the battery reports before you walk away.

Is the Steam Controller rechargeable?

Yes, it charges through its magnetic charging puck, which is what this project automates. The app reads live battery percentage and cell voltage from Report 67 so you can watch the charge level rise.

Official sources

  1. FossPrime/Steam-Controller-Auto-Charge on GitHub
  2. License: MIT
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/fossprime-steam-controller-auto-charge.svg)](https://hysenlabs.com/projects/fossprime-steam-controller-auto-charge)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/fossprime-steam-controller-auto-charge.svg)](https://hysenlabs.com/projects/fossprime-steam-controller-auto-charge)

Was this useful?