npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@brightsign/actions-cdk

v4.3.2

Published

BrightSign Actions CDK

Readme

BrightSign Actions CDK

Node.js PNPM TypeScript License

The BrightSign Actions Cloud Development Kit (CDK) is a powerful toolkit that enables seamless interaction with BrightSign digital signage players through both local and remote interfaces. It provides a unified API for device management, content deployment, and monitoring capabilities.

Features

  • Local Diagnostics Web Server (DWS) interaction
  • Remote device management through BSN.cloud
  • File management operations
  • Device monitoring and control
  • Registry management
  • Power management
  • Screenshot capabilities
  • Logging functionality

Getting Started

Follow these simple steps to start using the BrightSign Actions CDK in your project:

Installation

npm install @brightsign/actions-cdk

Environment Variables

Set up your environment variables in a .env file:

BRIGHTSIGN_CLIENT_ID=your-client-id
BRIGHTSIGN_CLIENT_SECRET=your-client-secret
BRIGHTSIGN_NETWORK_NAME=your-network-name # Optional, for remote management

Note: You must obtain a BrightSign client ID and client secret to use this application. These credentials can be generated at https://adminpanel.bsn.cloud/.

Note: The environment variable names must match those above for the examples to work as shown.

Usage Examples

Remote Device Management

import BrightsignActions from '@brightsign/actions-cdk';

const actions = new BrightsignActions({
	clientId: process.env.BRIGHTSIGN_CLIENT_ID!,
	clientSecret: process.env.BRIGHTSIGN_CLIENT_SECRET!,
	network: { name: process.env.BRIGHTSIGN_NETWORK_NAME },
});

const { Players } = actions;

const remoteDeviceInfo = await Players.get({
	deviceSerial: 'SERIAL1234',
});

Local Device Management

import BrightsignActions from '@brightsign/actions-cdk';

const actions = new BrightsignActions({
	clientId: process.env.BRIGHTSIGN_CLIENT_ID!,
	clientSecret: process.env.BRIGHTSIGN_CLIENT_SECRET!,
});

const { Players } = actions;

const localDeviceInfo = await Players.get({
	connectionType: 'local',
	ipAddress: '192.168.1.100',
	username: 'admin',
	password: 'password',
});

Upload and Reboot All Players

import BrightsignActions from '@brightsign/actions-cdk';

const actions = new BrightsignActions({
	clientId: process.env.BRIGHTSIGN_CLIENT_ID!,
	clientSecret: process.env.BRIGHTSIGN_CLIENT_SECRET!,
	network: { name: process.env.BRIGHTSIGN_NETWORK_NAME },
});

const { Players } = actions;

async function uploadAndRebootAllPlayers(
	localFilePath: string,
	destinationPath: string,
) {
	const players = await Players.list();

	await Promise.all(
		players.map(async (player) => {
			await player.upload(localFilePath, destinationPath);
			await player.reboot();
			console.log(`Uploaded and rebooted player: ${player.serial}`);
		}),
	);
}

uploadAndRebootAllPlayers('./autorun.brs', 'sd').catch(console.error);

API Documentation

Key Classes

  • BrightsignActions: The main entry point for interacting with both local and remote devices.
  • Players: For device management (local and remote), accessible via the Players property of BrightsignActions.
  • Networks: For network management, accessible via the Networks property of BrightsignActions.

Each class provides methods for:

  • Device information retrieval
  • File management
  • Registry operations
  • Power management
  • System controls
  • Monitoring capabilities

Troubleshooting

Common Issues

  1. Connection Failures

    • Verify network connectivity.
    • Check device IP address.
    • Ensure correct credentials.
  2. Authentication Errors

    • Validate credentials.
    • Check token expiration.
    • Verify API permissions.
  3. File Operations Issues

    • Confirm file paths.
    • Check storage permissions.
    • Verify file size limits.

Logging

The CDK includes a built-in logging system with multiple levels:

  • DEBUG (2)
  • INFO (3)
  • WARN (4)
  • ERROR (5)
  • FATAL (6)

Contributing

We welcome contributions! Please see the CONTRIBUTING.md file for guidelines on how to get started.

License

ISC License - See LICENSE file for details.