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.

Access
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
FlagDescription
--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.

FlagDescription
--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.

SubcommandDescription
vehicle lockLock the scooter (transition to stand-by)
vehicle unlockUnlock the scooter (transition to parked/ready)
vehicle hibernateLock and request hibernation
vehicle force-lockForce stand-by without waiting for physical locks
vehicle openOpen 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.

SubcommandDescription
alarm statusShow alarm status and settings
alarm armEnable alarm; arms when vehicle enters stand-by. --no-block to skip confirmation.
alarm disarmDisable alarm. --no-block to skip confirmation.
alarm trigger [duration]Manually trigger alarm for duration seconds

ota

OTA update management for MDB and DBC.

SubcommandDescription
ota statusShow 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.

SubcommandDescription
settings listList 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:

KeyDescriptionValues
Alarm
alarm.enabledEnable/disable alarm systemtrue / false
alarm.honkEnable horn during alarmtrue / false
alarm.durationAlarm sound durationseconds
alarm.seatbox-triggerTrigger alarm on unauthorized seatbox openingtrue / false
alarm.hairtriggerImmediate short alarm on first motiontrue / false
alarm.hairtrigger-durationHair trigger alarm durationseconds
OTA Updates
updates.mdb.methodUpdate method for MDBdelta / full
updates.mdb.channelRelease channel for MDBstable / testing / nightly
updates.mdb.check-intervalTime between update checks for MDBhours (0 = disabled)
updates.dbc.methodUpdate method for DBCdelta / full
updates.dbc.channelRelease channel for DBCstable / testing / nightly
updates.dbc.check-intervalTime between update checks for DBChours (0 = disabled)
Dashboard
dashboard.themeUI themelight / dark / auto
dashboard.modeDefault screen modespeedometer / navigation
dashboard.show-raw-speedShow raw uncorrected speed from ECUtrue / false
dashboard.show-clockClock visibilityalways / never
dashboard.show-gpsGPS indicator visibilityalways / active-or-error / error / never
dashboard.show-bluetoothBluetooth indicator visibilityalways / active-or-error / error / never
dashboard.show-cloudCloud indicator visibilityalways / active-or-error / error / never
dashboard.show-internetInternet indicator visibilityalways / active-or-error / error / never
dashboard.battery-display-modeBattery display modepercentage / range
dashboard.power-display-modePower display unitkw / amps
dashboard.map.typeMap tile sourceonline / offline
dashboard.map.render-modeMap rendering modevector / raster
dashboard.valhalla-urlValhalla routing service endpointURL
dashboard.blinker-styleBlinker indicator styleicon / overlay
dashboard.languageDashboard UI languagelanguage code
Motor
engine-ecu.boostEnable motor boost modetrue / false
engine-ecu.kersKinetic energy recovery systemenabled / disabled
engine-ecu.kers-powerKERS regeneration currentamps
Other
cellular.apnCellular APN stringstring
scooter.battery-ignores-seatboxKeep batteries active regardless of seatboxtrue / false
scooter.dual-batteryEnable dual battery modetrue / false
scooter.auto-standby-secondsAuto-lock timeout when parkedseconds (0 = disabled)
scooter.enable-hornHorn enable modetrue / false / in-drive
hibernation-timerHibernation timeoutseconds

gps

GPS tracking and position information.

SubcommandDescription
gps statusShow GPS state and current fix
gps watchStream GPS updates in real-time. --compact for one-line format.

keycard

Manage NFC keycard authentication.

SubcommandDescription
keycard listList 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.

SubcommandDescription
power statusShow power management state
power runSet power state to run
power suspendRequest suspend
power hibernateRequest hibernation. --manual or --timer to select mode.
power rebootReboot the system

service (alias: svc)

Inspect and manage LibreScoot systemd services.

SubcommandDescription
service listList 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).

SubcommandDescription
usb statusShow current USB mode
usb umsSwitch to USB Mass Storage mode
usb normalSwitch back to network mode

locations (alias: loc)

Manage saved locations used by navigation.

SubcommandDescription
locations listList 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
FlagDescription
--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.

SubcommandDescription
diag battery [id...]Detailed battery status (charge, voltage, temperature, health)
diag versionFirmware versions for MDB, DBC, ECU, and nRF52
diag faultsShow all active faults
diag eventsView fault event stream (see flags below)
diag dashboard [on|off]Control DBC power. -f to force off during updates.
diag dashboard statusShow DBC ready state and power
diag dashboard pingPing the DBC to check connectivity
diag dashboard on-waitTurn on DBC and wait until ready. -t <sec> for timeout (default 60).
diag dashboard off-waitTurn 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

FlagDescription
--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, --reverseShow newest events first
-f, --followFollow events in real-time (like tail -f)
--filter <regex>Filter events by regex pattern

Shortcuts

Common commands are available as top-level shortcuts:

ShortcutEquivalent
lsc locklsc vehicle lock
lsc unlocklsc vehicle unlock
lsc openlsc 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 / batlsc diag battery
lsc version / verlsc diag version
lsc faultslsc diag faults
lsc eventslsc diag events
lsc dashboard / dbc / dashlsc diag dashboard
lsc enginelsc diag engine
lsc blinkers / blinklsc 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

Source

github.com/librescoot/lsc →

← Services Contributing →