Skip to main content
FreedeckRPC provides a simple interface to connect external applications to Freedeck, allowing you to send notifications, edit tiles in real-time, manage plugins, configure settings, and authenticate with the Freedeck server.
This documentation is for usage of the freedeck/rpc module, it’s not available as a npm module, but you can clone the repo to get it.

Features

  • 🔔 Send notifications to Freedeck
  • 🎛️ Edit tiles in real-time
  • 🔌 Manage plugins
  • ⚙️ Configure settings
  • 🔐 Secure authentication with Freedeck server

Installation

Quick Start

1

Import the module

2

Identify your application

3

Connect to Freedeck

4

Listen for events and send notifications

API Reference

RPCClient

The main client object for interacting with Freedeck. All methods and properties are accessed through this object.

Methods

Identifies your application to the Freedeck server.Parameters:
  • appInfo (Object):
    • id (string): Unique application ID (use generateID())
    • title (string): Display name of your application
    • author (string): Your name or organization
    • version (string): Application version
    • authorizationMessage (string): Message shown to user during authorization
Connects to a Freedeck server.Parameters:
  • url (string): Server URL (supports freedeck:// protocol or standard HTTP)
  • scopes (Array): Array of permission scopes (default: [RPCScopes.sendNotifications])
Sends a notification to Freedeck.Parameters:
  • ...messages: Messages to send (will be joined with spaces)
Listens for events from the RPC client.Parameters:
  • event (string): Event name
  • callback (function): Event handler
Available Events:

status-update

Connection status changes

connection

Connection state updates

authorization

User authorization granted

reply

Server responses
Generates a unique application ID.Parameters:
  • appName (string): Name of your application
  • author (string): Author name
Returns: Base64-encoded unique ID
Generates an authentication token for an application.Parameters:
  • appID (string): Application ID
Returns: Base64-encoded authentication token
Validates an authentication token format.Parameters:
  • token (string): Token to validate
Returns: Boolean indicating if token is valid

Properties

RPCScopes

Permission scopes that define what your application can do with Freedeck.
number
default:1
Send notifications to Freedeck
number
default:10
Edit tiles without reloading
number
default:11
Edit tiles with reload
number
default:400
Edit Freedeck configuration
number
default:200
Add new plugins
number
default:201
Reload existing plugins
number
default:202
Disable plugins
number
default:203
Enable plugins

Connection States

The client goes through several states during connection. Monitor these states to handle the connection lifecycle properly.
1

disconnected

Initial state - not connected to any server
2

preflight

Preparing connection parameters and validation
3

initializing

Setting up Socket.IO connection to server
4

requesting-auth

Sending authorization request to server
5

prompting-user

User sees authorization dialog in Freedeck
6

connected@{url}

Successfully connected and authorized
7

denied

User rejected authorization (app exits automatically)

Error Handling

Advanced Usage

Custom Logging

Handoff API

For alternative communication when direct RPC isn’t available:

Examples

Simple Notification App

Status Monitor

Troubleshooting

Common Issues

  1. Connection fails: Ensure Freedeck is running on the specified URL
  2. Authorization denied: User must click “Allow” in the Freedeck authorization dialog
  3. Notifications not appearing: Make sure you have sendNotifications scope and are authorized

Debug Mode

Requirements

  • Node.js
  • socket.io-client package
  • Running Freedeck application
  • Network access to Freedeck server