Swap Station Inventory
A swap station is a physical location — warehouse, garage, charging closet — where you store and charge battery packs. Each station has a fixed slot count, and each slot is in one of four states at any time.
Slot States
| State | What It Means | Color |
|---|---|---|
| empty | Slot has no pack in it | Gray |
| charging | Pack in slot, plugged in, not yet at full charge | Blue |
| charged | Pack in slot at ≥95%; ready to install on a vehicle | Green |
| maintenance | Pack pulled from rotation — defect, warranty, awaiting inspection | Yellow |
The station detail page shows the slot grid color-coded by these states. The station list page (Dashboard → Swap → Stations) shows a roll-up — how many of each state per station — so you can tell at a glance which warehouse has fresh packs ready and which needs attention.
Creating a Station
- Go to Dashboard → Swap → Stations
- Click Add Station
- Fill in:
- Name (required) — what your techs will see in operator-app
- Location — pin on the map; PostGIS-indexed for proximity routing later
- Capacity — how many slots
- Charger count — informational; useful when capacity is higher than what you can actually charge concurrently
- Notes — anything ops needs to know (access hours, who has the key)
- Save — slots are auto-created in
emptystate, numbered sequentially
You can edit the name, capacity, and charger count later; resizing capacity downward will warn you if any slots have packs in them.
One Station vs. Many
Most operators start with a single station and split into multiple as they grow. The data model has no problem with one station or one hundred — the question is whether your techs benefit from filtering inventory by location.
Managing Slot State
From a station's detail page (Stations → click a station), each slot has a state toggle and a pack pointer.
Loading a Pack Into a Slot
- Click the slot you want to load
- Scan the pack's QR (or type the QR code in)
- Set the slot state — usually
chargingif you just plugged it in, orchargedif it came in already topped up - Save
This writes the pack's station_id and slot_index and moves the pack's own lifecycle state to match (charging or charged).
Moving a Pack to Maintenance
When a tech notices a defect — a swollen cell, a damaged connector, a pack that won't take a full charge:
- Find the slot
- Switch the slot state to
maintenance - Optionally add a note about the defect
The pack stays in the slot but is excluded from the install pool. When you're ready to resolve it — warranty replacement, recycling, or re-test — move it back to charging, returned, or recycled as appropriate.
Marking a Pack as Charged
Most operations don't have smart-charger integration yet (that's a v2.5 add-on). For now, the slot state is manual:
- A pack at full charge — flip slot to
charged - A pack that was charged but lost charge — flip back to
charging - A pack that hit ≥95% via a smart charger — that's auto-detected on integrations that support it
Reading the Station List
The Stations page shows each station as a card:
Main Garage
12 charged · 4 charging · 2 maintenance · 2 empty
Click a card to see the slot grid. The grid is live — multiple techs can work the same station and you'll see slot updates within seconds.
Why This Matters for the Swap Workflow
When a tech runs the in-house swap workflow (In-House Swap Workflow), the second QR scan — for the new pack — checks that the pack is in charged state. A pack in charging cannot be installed. A pack in maintenance cannot be installed. This stops a tech from grabbing the wrong pack off the wall.
It also protects against double-install — a charged pack that someone else scans out at the same time will fail the second scan, and the swap rolls back cleanly.
Vendor Warranty Export
When a station holds a pack flagged for warranty (maintenance + vendor-warranty note), the Packs page has an export action that bundles the warranty payload for the manufacturer: serial number, install date, cycle count at failure, voltage curve, temperature exposure, and the full state history.
CSV today; a vendor-facing API is on the roadmap for OKAI and Segway specifically.
Common Issues
- Slot won't accept a scan — the pack you scanned may already be assigned to another slot (only one slot can hold a given pack). The error message names the conflicting slot.
- Counts don't match what I see — refresh the page; if the discrepancy persists, check whether someone flipped a slot to
maintenancewithout telling you (the audit log on the pack's detail page tells you who). - All slots show
emptybut packs are physically there — the slots were created on station setup, but no one scanned packs into them. Each pack needs to be loaded into a specific slot.