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).
- Consider using
nvm
to manage Node.js versions. - Windows Terminal and Cmder support multiple windows for efficiency.
Setup Instructions
- Navigate to your applet project directory:
cd /path/to/your/project
. - Install dependencies:
npm install
. - Build the project:
npm run build
(or use a custom command). - Upload the applet to signageOS:
sos applet upload
. - 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:
sos device connect
You can pass these arguments after command, or the command will provide you with interactive selection
Argument | Description | Default value |
---|---|---|
--ip (required) | Local network computer IP address | Auto-detected |
--device-uid (required) | Device UID from signageOS Box | STDIN |
--applet-dir (required) | Applet project directory | Current directory ${PWD} |
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
This functionality requires the signageOS webpack plugin, which is included with applets created using sos applet generate
.
Enable hot-reload for efficient debugging:
- Follow the setup instructions to upload and build your applet.
- Start the applet in the first terminal window:
sos applet start
. - 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.