lsc CLI Reference
lsc is the command-line interface for controlling and monitoring LibreScoot. It runs on the scooter (MDB) and communicates with services via Redis.
SSH into the MDB and run
lsc directly, or prefix commands with ssh deep-blue from your workstation.
ssh root@<mdb-ip> lsc status
Quick Reference
lsc status # Overall vehicle dashboard lsc unlock # Unlock the scooter lsc lock # Lock the scooter lsc open # Open the seatbox lsc battery # Battery diagnostics lsc faults # Show active faults lsc ota status # OTA update status lsc settings list # View all settings lsc set <key> <val> # Change a setting lsc alarm arm # Arm the motion alarm lsc alarm disarm # Disarm the alarm lsc service list # List running services lsc logs # Extract log bundle
Commands
status
Show a dashboard of key metrics: vehicle state, speed, odometer, battery levels, connectivity, and GPS.
lsc status
watch
Monitor Redis pub/sub channels. Shows state changes in real-time.
lsc watch # Watch all channels lsc watch vehicle battery:0 # Watch specific channels
| Flag | Description |
|---|---|
--format <fmt> | Output format: pretty (default), json, raw |
--filter <regex> | Filter messages by regex |
monitor
Record metrics over time for one or more subsystems. Writes timestamped data to files and produces a compressed archive.
lsc monitor gps battery # Record GPS and battery data lsc monitor all # Record everything lsc monitor --duration 5m motor # Record motor data for 5 minutes
Subsystems: gps, battery, vehicle, motor, power, modem, events, all.
| Flag | Description |
|---|---|
--duration <time> | Recording duration (default: 1h). Examples: 1m, 5m, 1h, 24h |
--interval <time> | Polling interval (default: 1s). Examples: 100ms, 1s, 5s |
--format <fmt> | Output format: jsonl (default), csv |
--output <dir> | Output directory (auto-generated if not specified) |
vehicle
Control vehicle lock/unlock state, hibernation, and seatbox.
| Subcommand | Description |
|---|---|
vehicle lock | Lock the scooter (transition to stand-by) |
vehicle unlock | Unlock the scooter (transition to parked/ready) |
vehicle hibernate | Lock and request hibernation |
vehicle force-lock | Force stand-by without waiting for physical locks |
vehicle open | Open the seatbox lock |
All vehicle subcommands accept --no-block to return immediately without waiting for state change confirmation.
Shortcuts at the top level: lsc lock, lsc unlock, lsc open.
alarm
Control the motion-based alarm system.
| Subcommand | Description |
|---|---|
alarm status | Show alarm status and settings |
alarm arm | Enable alarm; arms when vehicle enters stand-by. --no-block to skip confirmation. |
alarm disarm | Disable alarm. --no-block to skip confirmation. |
alarm trigger [duration] | Manually trigger alarm for duration seconds |
ota
OTA update management for MDB and DBC.
| Subcommand | Description |
|---|---|
ota status | Show update status for MDB and DBC |
ota check [mdb|dbc] | Trigger immediate update check (defaults to both) |
ota channel [channel] | Show current channels, or set both MDB and DBC to stable, testing, or nightly |
ota install <file-or-url> | Install an OTA update manually |
settings
View and modify persistent scooter settings stored in Redis.
| Subcommand | Description |
|---|---|
settings list | List all settings with current values |
settings get <key> | Get one or more setting values |
settings set <key> <value> | Set a setting and publish the change. Use --force to skip validation. |
settings del <key> | Delete a setting key |
Shortcuts at the top level: lsc get <key>, lsc set <key> <value>, lsc del <key>.
You can set multiple key-value pairs in a single command: lsc set alarm.enabled true alarm.honk false.
Common settings:
| Key | Description | Values |
|---|---|---|
| Alarm | ||
alarm.enabled | Enable/disable alarm system | true / false |
alarm.honk | Enable horn during alarm | true / false |
alarm.duration | Alarm sound duration | seconds |
alarm.seatbox-trigger | Trigger alarm on unauthorized seatbox opening | true / false |
alarm.hairtrigger | Immediate short alarm on first motion | true / false |
alarm.hairtrigger-duration | Hair trigger alarm duration | seconds |
| OTA Updates | ||
updates.mdb.method | Update method for MDB | delta / full |
updates.mdb.channel | Release channel for MDB | stable / testing / nightly |
updates.mdb.check-interval | Time between update checks for MDB | hours (0 = disabled) |
updates.dbc.method | Update method for DBC | delta / full |
updates.dbc.channel | Release channel for DBC | stable / testing / nightly |
updates.dbc.check-interval | Time between update checks for DBC | hours (0 = disabled) |
| Dashboard | ||
dashboard.theme | UI theme | light / dark / auto |
dashboard.mode | Default screen mode | speedometer / navigation |
dashboard.show-raw-speed | Show raw uncorrected speed from ECU | true / false |
dashboard.show-clock | Clock visibility | always / never |
dashboard.show-gps | GPS indicator visibility | always / active-or-error / error / never |
dashboard.show-bluetooth | Bluetooth indicator visibility | always / active-or-error / error / never |
dashboard.show-cloud | Cloud indicator visibility | always / active-or-error / error / never |
dashboard.show-internet | Internet indicator visibility | always / active-or-error / error / never |
dashboard.battery-display-mode | Battery display mode | percentage / range |
dashboard.power-display-mode | Power display unit | kw / amps |
dashboard.map.type | Map tile source | online / offline |
dashboard.map.render-mode | Map rendering mode | vector / raster |
dashboard.valhalla-url | Valhalla routing service endpoint | URL |
dashboard.blinker-style | Blinker indicator style | icon / overlay |
dashboard.language | Dashboard UI language | language code |
| Motor | ||
engine-ecu.boost | Enable motor boost mode | true / false |
engine-ecu.kers | Kinetic energy recovery system | enabled / disabled |
engine-ecu.kers-power | KERS regeneration current | amps |
| Other | ||
cellular.apn | Cellular APN string | string |
scooter.battery-ignores-seatbox | Keep batteries active regardless of seatbox | true / false |
scooter.dual-battery | Enable dual battery mode | true / false |
scooter.auto-standby-seconds | Auto-lock timeout when parked | seconds (0 = disabled) |
scooter.enable-horn | Horn enable mode | true / false / in-drive |
hibernation-timer | Hibernation timeout | seconds |
gps
GPS tracking and position information.
| Subcommand | Description |
|---|---|
gps status | Show GPS state and current fix |
gps watch | Stream GPS updates in real-time. --compact for one-line format. |
keycard
Manage NFC keycard authentication.
| Subcommand | Description |
|---|---|
keycard list | List authorized keycard UIDs |
keycard add <uid> | Add a keycard to the authorized list |
keycard remove <uid> | Remove a keycard |
keycard add-master <uid>... | Add one or more master keycards |
keycard remove-master <uid>... | Remove one or more master keycards |
keycard export <file> | Export keycard list to file |
keycard import <file> | Import keycard list from file |
UIDs can be in any hex format: 042A3D6A0D6580, 04:2A:3D:6A:0D:65:80, or 04 2A 3D 6A 0D 65 80.
power
Power management commands.
| Subcommand | Description |
|---|---|
power status | Show power management state |
power run | Set power state to run |
power suspend | Request suspend |
power hibernate | Request hibernation. --manual or --timer to select mode. |
power reboot | Reboot the system |
service (alias: svc)
Inspect and manage LibreScoot systemd services.
| Subcommand | Description |
|---|---|
service list | List LibreScoot services and their status |
service status <name> | Show detailed status of a service |
service start <name> | Start a service |
service stop <name> | Stop a service |
service restart <name> | Restart a service |
service enable <name> | Enable a service at boot |
service disable <name> | Disable a service at boot |
service logs <name> | Show recent logs. -f to follow, -n <N> for line count (default 50). |
usb
Control USB port mode (network vs. mass storage).
| Subcommand | Description |
|---|---|
usb status | Show current USB mode |
usb ums | Switch to USB Mass Storage mode |
usb normal | Switch back to network mode |
locations (alias: loc)
Manage saved locations used by navigation.
| Subcommand | Description |
|---|---|
locations list | List saved locations |
locations show <id> | Show details of a saved location |
locations add <lat> <lon> <label> | Add a new saved location |
locations edit <id> <field> <value> | Edit a saved location |
locations delete <id> | Delete a saved location |
locations touch <id> | Update last-used timestamp |
led
Control LED indicators (for development/testing).
lsc led cue <index|name> # Trigger cue sequence lsc led fade <channel> <index|name> # Trigger fade animation
Cue names: all-off, standby-to-parked-brake-off, parked-to-drive, brake-off-to-brake-on, brake-on-to-brake-off, drive-to-parked, blink-left, blink-right, blink-both, blink-none.
Channels: headlight, front-ring, brake, blinker-front-left, blinker-front-right, number-plates, blinker-rear-left, blinker-rear-right (or numeric 0–7).
logs
Extract service logs and Redis state snapshots as a compressed bundle (useful for bug reports).
lsc logs # All services, last 24h lsc logs vehicle battery # Specific services only lsc logs --since 1h # Last hour only lsc logs --priority err # Errors only
| Flag | Description |
|---|---|
--since <time> | Start time (default: 24h). Examples: 1h, 24h, 1d, "2025-10-25 10:00" |
--until <time> | End time (default: now) |
--priority <level> | Log level filter: err, warning, info, debug |
--output <dir> | Output directory (auto-generated if not specified) |
diag
Diagnostic commands for hardware inspection and control.
| Subcommand | Description |
|---|---|
diag battery [id...] | Detailed battery status (charge, voltage, temperature, health) |
diag version | Firmware versions for MDB, DBC, ECU, and nRF52 |
diag faults | Show all active faults |
diag events | View fault event stream (see flags below) |
diag dashboard [on|off] | Control DBC power. -f to force off during updates. |
diag dashboard status | Show DBC ready state and power |
diag dashboard ping | Ping the DBC to check connectivity |
diag dashboard on-wait | Turn on DBC and wait until ready. -t <sec> for timeout (default 60). |
diag dashboard off-wait | Turn off DBC and wait until unreachable. -t <sec> for timeout (default 60). |
diag engine [on|off] | Control engine power |
diag blinkers [off|left|right|both] | Control blinker state |
diag horn [on|off] | Control horn |
diag handlebar [lock|unlock] | Control handlebar lock |
diag events flags
| Flag | Description |
|---|---|
--since <duration> | Show events from duration ago (e.g. 1h, 24h, 7d, 1w) |
--until <duration> | Show events until duration ago |
-n, --lines <N> | Maximum events to show (default 50) |
-r, --reverse | Show newest events first |
-f, --follow | Follow events in real-time (like tail -f) |
--filter <regex> | Filter events by regex pattern |
Shortcuts
Common commands are available as top-level shortcuts:
| Shortcut | Equivalent |
|---|---|
lsc lock | lsc vehicle lock |
lsc unlock | lsc vehicle unlock |
lsc open | lsc vehicle open |
lsc get <key> | lsc settings get <key> |
lsc set <key> <val> | lsc settings set <key> <val> |
lsc del <key> | lsc settings del <key> |
lsc battery / bat | lsc diag battery |
lsc version / ver | lsc diag version |
lsc faults | lsc diag faults |
lsc events | lsc diag events |
lsc dashboard / dbc / dash | lsc diag dashboard |
lsc engine | lsc diag engine |
lsc blinkers / blink | lsc diag blinkers |
Global Flags
--json Output in JSON format (for scripting) --redis-addr Redis server address (default: 192.168.7.1:6379) -v, --verbose Enable verbose logging