Use the CLI
Firmware and logs
Update a display’s firmware, read its logs, and restart it.
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
ledable firmware page --device "$DEVICE" --updatefirmware 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:
{
"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:
kind | What the display is doing |
|---|---|
idle | Nothing has been asked yet |
checking | Looking for a newer version |
upToDate | It already runs the newest version |
downloading | Writing the new version; progress goes from 0 to 1 |
rebooting | Restarting into the new version |
installed | It runs the new version, named in version |
failed | It 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:
ledable devices logs --device "$DEVICE" --timeout 300
ledable devices log-history --device "$DEVICE" --limit 100devices logsstreams the lines the display sends from now on, one JSON object per line, and stops at its timeout.devices log-historyprints the lines LEDABLE's servers have kept.--moduleand--levelnarrow them to one part of the firmware or one severity,--afterto the lines after a timestamp, and--limitcaps how many come back.devices logs-pageruns 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
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:
ledable devices pull all --device "$DEVICE"devices pull takes app for the playlist, device for
the settings and alarms, or all for both.