Commands, settings, SDK functions, anything in the docs.

Use the CLI

Firmware and logs

Update a display’s firmware, read its logs, and restart it.

On this page

The commands on this page talk to the display while it is online, through LEDABLE's servers; it does not need to be near you. The examples use $DEVICE for the display's id, as Set up a display explains.

Update the firmware

Terminal
ledable firmware page --device "$DEVICE" --update

firmware page runs the app's firmware page. With --update, it waits until the display answers, asks it to update, and ends when the display has the newest firmware. Asking checks and installs in one go: there is no separate check. The page prints a line each time the stage changes; here one is indented for reading:

JSON
{
  "state": {
    "kind": "idle",
    "can_ask": true,
    "online": "online",
    "firmware_version": "…"
  }
}

can_ask is true once the display has answered and no update is under way, online is online, offline or unknown, and firmware_version is the version the display last reported.

kind is the stage:

kindWhat the display is doing
idleNothing has been asked yet
checkingLooking for a newer version
upToDateIt already runs the newest version
downloadingWriting the new version; progress goes from 0 to 1
rebootingRestarting into the new version
installedIt runs the new version, named in version
failedIt stopped, for the reason in error

With --update, the command ends at upToDate or installed, and fails with the reason at failed. The display restarts to finish an update, so give the command time: its timeout is long by default, and --timeout sets another.

Without --update, the page only shows the version and whether the display is online, until its timeout; type update on stdin to ask for the update then. A display updates by itself when automatic updates are on.

Read the logs

A display reports what it does as log lines. There are three ways to read them:

Terminal
ledable devices logs --device "$DEVICE" --timeout 300
ledable devices log-history --device "$DEVICE" --limit 100
  • devices logs streams the lines the display sends from now on, one JSON object per line, and stops at its timeout.
  • devices log-history prints the lines LEDABLE's servers have kept. --module and --level narrow them to one part of the firmware or one severity, --after to the lines after a timestamp, and --limit caps how many come back.
  • devices logs-page runs the app's log page, which merges both with the lines already kept on this computer and prints how many it holds and the newest few.

Each line has the firmware's module, its level, the message and the display's timestamp. The timestamps count from the moment the display last started, not from a calendar date.

Restart a display

Terminal
ledable devices reboot --device "$DEVICE"

devices reboot sends the display the command to restart and ends once it is sent.

Have it fetch its configuration

The CLI tells the display to fetch every change you make. If a display seems to have missed one, ask it again:

Terminal
ledable devices pull all --device "$DEVICE"

devices pull takes app for the playlist, device for the settings and alarms, or all for both.