Skip to main content

Connect Applet to Device Using signageOS CLI

Speed up your development with instant deployment of your applet directly from the command line interface (CLI) to a device in your local network using signageOS.

Prerequisites

Before you begin, ensure you have the following:

  • A signageOS account.
  • signageOS CLI installed.
  • At least one organization set up in signageOS Box (create one here).
  • Node.js version 10.15.0 or later, including NPM (download here; previous versions here).
  • A terminal application (e.g., Shell, Gitbash, PowerShell, Windows Terminal, or Cmder).
tip
  • Consider using nvm to manage Node.js versions.
  • Windows Terminal and Cmder support multiple windows for efficiency.

Setup Instructions

  1. Navigate to your applet project directory: cd /path/to/your/project.
  2. Install dependencies: npm install.
  3. Build the project: npm run build (or use a custom command).
  4. Upload the applet to signageOS: sos applet upload.
  5. Create an applet bundle: sos applet build.

Device Connection

After completing the setup, connect your applet to a device in your local network:

Navigate to your applet's root directory and use:

Connect to device using signageOS CLI
sos device connect

You can pass these arguments after command, or the command will provide you with interactive selection

ArgumentDescriptionDefault value
--ip (required)Local network computer IP addressAuto-detected
--device-uid (required)Device UID from signageOS BoxSTDIN
--applet-dir (required)Applet project directoryCurrent directory ${PWD}
info

It may take a few seconds for the applet to appear on your device.

To exit development mode, press CTRL + C (or CMD + C on Mac) in the terminal. This will end the connection and revert the display to its previous state.

Debugging and Auto-Reload

warning

This functionality requires the signageOS webpack plugin, which is included with applets created using sos applet generate.

Enable hot-reload for efficient debugging:

  1. Follow the setup instructions to upload and build your applet.
  2. Start the applet in the first terminal window: sos applet start.
  3. Connect to the device in a second terminal window: sos device connect

Notes

The sos applet upload step is required only once to assign a unique UID to your applet.