lsc and lsd Reference

lsc controls and monitors Librescoot from the MDB via Redis. Use it for setup, diagnostics and automation; see the Handbook for display controls. Run vehicle-control commands such as lsc unlock and lsc alarm arm only when the scooter is safely parked.

lsd web interface

Development images include lsd on the MDB. With the dashboard on, connect your computer to the MDB's USB network and open http://192.168.7.1:8090. The manual installation guide describes USB access.

  • Dashboard: live vehicle and battery status, faults, alarm controls and Service Mode.
  • Settings: search and change settings; advanced mode reveals additional keys.
  • Keycards: add or remove physical cards and start teach-in.
  • Navigation: destinations, saved locations and the route plan.
  • Files and Updates: transfer files, select update channels and install firmware.
  • System and Services: download logs, inspect journals and manage services.
  • Cloud: connect the scooter to Sunshine or import a cloud-client configuration.

The setting keys shown in the lsc examples below are also searchable in lsd. Use lsc over SSH for command-line work and scripts.

Access
SSH into the MDB and run lsc directly, or prefix commands with ssh root@<mdb-ip> 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 vehicle battery:0 # One or more channels (at least one required)
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 hibernateRequest coordinated hibernation from parked or standby
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 the alarm until enabled again. --no-block skips confirmation.
alarm silenceTemporarily disarm without changing alarm.enabled. Ends after the next use-and-lock cycle, hibernation, eight hours or an alarm-service restart (alarm-service v0.13.0+).
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. For the maintenance overlay and its controls, see Service Mode.

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.backlight-modeDisplay backlight level (auto = ambient light sensor)auto / low / medium / high
dashboard.modeDefault screen modespeedometer / navigation / debug
dashboard.show-raw-speedShow raw uncorrected speed from ECUtrue / false
dashboard.show-clockClock format in the status bar. always is time only, kept under its old namealways / date-time / alternate / 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.show-temperatureAmbient temperature widget visibility (warning = frost band only, appearing below 5 °C and clearing at 7 °C)always / warning / never
dashboard.show-aux-battery12V battery icon visibility (warning = only below 11700 mV)always / warning / never
dashboard.show-cb-batteryCBB charge icon visibility (warning = only below 50% charge)always / warning / never
dashboard.battery-display-modeBattery display modepercentage / range / icon
dashboard.power-display-modePower display unitkw / amps
dashboard.map.typeMap tile sourceonline / offline
dashboard.map.render-modeMap rendering modevector / raster
dashboard.map.view-modeMap camera: 3D tilted perspective or 2D flat top-down3d / 2d
dashboard.map.north-orientedIn 2D, keep the map pointing north instead of following the headingtrue / false
dashboard.map.traffic-overlayLive traffic overlay on the map (requires online tiles)true / false
dashboard.maps.check-for-updatesCheck for map tile updates (at most weekly, once the modem is connected)true / false
dashboard.maps.auto-downloadDownload map updates automatically (uses mobile data)true / false
dashboard.valhalla-urlValhalla routing service endpointURL
dashboard.route-preferenceRoute costing. Shortest uses raw distance and ignores every other preference, cobblestone avoidance includedfastest / shortest
dashboard.avoid-cobblestoneDetour budget for keeping off sett and cobbles: low spends up to the travel time the rough stretch would have cost, medium four times that, high eight times. off sends an explicit zero and switches the avoidance off entirely. Needs routing tiles that classify the surfaceoff / low / medium / high
dashboard.blinker-styleBlinker indicator styleicon / overlay
dashboard.milestones.modeMilestones at 10 km and every 100 km, optionally including one-shot easter eggs (off by default)off / regular / all
dashboard.milestones.presentationBrief crossing notice, optional parked ticket and confettinotice / banner / banner-and-confetti
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-keep-active-on-seatbox-openKeep a running battery active when the seatbox opens instead of deactivating ittrue / 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
scooter.dbc-blinker-ledBlink the DBC boot LED with the blinkers (green single, red hazards)enabled / disabled
scooter.horn-when-seatbox-openAllow the horn button while the seatbox is open and the scooter unlocked (off by default, so the open lid resting on the button does not honk)true / false
pm.hibernation-timerDelay-based hibernation timeout (0 = disabled, minimum 300 s — values 1–299 are clamped up; default 259200 = 3 days)seconds
pm.default-stateIdle-time target power staterun / suspend
pm.scheduled-hibernate-enabledEnable the cron-based hibernation scheduletrue / false
pm.scheduled-hibernate-cron5-field cron expression (e.g. 0 22 * * *) controlling scheduled hibernation. Fires are rate-limited to one every 15 min.cron string
pm.scheduled-hibernate-durationHow long the scheduled hibernation lasts (wake at fire-time + duration)Go duration (e.g. 8h)
pm.wake-timer-max-secondsSafety cap on any hibernate-for wake-timer request (min 60, max 604800)seconds
pm.wake-timer-ack-timeoutHow long to wait for nRF52 wake-timer ACK before aborting hibernationGo duration (default 10s)

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 Update Mode (USB Mass Storage)
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

nav

Show navigation state and edit the ordered stop list the dashboard guides through.

SubcommandDescription
nav statusCurrent navigation status and destination
nav set <lat,lon | lat lon | saved-location>Set a single destination
nav clearEnd navigation and drop the route plan
nav plan listShow the current route plan
nav plan add <lat,lon | lat lon | saved-location>Append a stop to the plan
nav plan remove <index>Remove a stop
nav plan skipSkip the stop the scooter is guiding to

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

Provider enrollment CLI

The MDB also includes the separate connect administrative CLI. It does not start automatically or enable reporting. With a compatible installed client, run these commands explicitly:

connect register
connect code
connect wait
connect status

Use the code or pairing link to select a provider and approve the connection, then run connect wait to finish. Existing provider ownership and credentials are preserved. An existing working Sunshine connection does not require re-enrollment. The scooter needs HTTPS access to the rendezvous and provider and access to the provider's verified-TLS MQTT endpoint. Reachability depends on the network and APN. See the enrollment protocol.

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 →

Event-service rules

ext

Manage event-service rules through the event-service RPC API on the selected Redis endpoint. The rules live in the service: there is no local rule-file fallback, and the CLI does not restart the service for you. A change takes effect after the next explicit restart, and ext show reports the current revision and whether a restart is pending.

SubcommandDescription
ext listList desired and loaded rules
ext show <name>Rule summary, definition, revision and pending-restart flag
ext add <name> --on topic --do redis --list key --push valueAdd a single-step rule
ext enable <name> / ext disable <name>Enable or disable a rule
ext test <name> --event JSONDry-run conditions and action previews; never executes or publishes
ext statusAsk the service for live workers, queue and counters
ext tail [topic-glob]Follow ev: events (exact topic, * or prefix.*)

Hibernation and web interface

lsc hibernate and lsc hibernate-for 8h coordinate shutdown from parked and begin power preparation directly from standby. Other vehicle states reject the request without retaining it for later. A relative duration needs no synchronized clock. lsd also provides a web interface.