Constructor
new StreamduckClient()
Source:
Methods
add_component(serial_number, key, component_name) → {Promise.<("DeviceNotFound"|"FailedToAdd"|"Added")>}
Adds component onto a button, commit the change later with commit_changes in order for this to get saved
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
key
number
|
string
Index of the key (0-255)
component_name
string
Component name
Returns:
Type
Description
Promise.<("DeviceNotFound"|"FailedToAdd"|"Added")>
Result of the operation
Source:
add_component(serial_number, key, component_name) → {Promise.<("DeviceNotFound"|"FailedToAdd"|"Added")>}
Adds component onto a button, commit the change later with commit_changes in order for this to get saved
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
key
number
|
string
Index of the key (0-255)
component_name
string
Component name
Returns:
Type
Description
Promise.<("DeviceNotFound"|"FailedToAdd"|"Added")>
Result of the operation
Source:
add_component_value(serial_number, key, component_name, path) → {Promise.<("DeviceNotFound"|"FailedToAdd"|"Added")>}
Adds element to component value, commit the change later with commit_changes in order for this to get saved
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
key
number
|
string
Index of the key (0-255)
component_name
string
Component name
path
string
Path to value
Returns:
Type
Description
Promise.<("DeviceNotFound"|"FailedToAdd"|"Added")>
Result of the operation
Source:
add_component_value(serial_number, key, component_name, path) → {Promise.<("DeviceNotFound"|"FailedToAdd"|"Added")>}
Adds element to component value, commit the change later with commit_changes in order for this to get saved
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
key
number
|
string
Index of the key (0-255)
component_name
string
Component name
path
string
Path to value
Returns:
Type
Description
Promise.<("DeviceNotFound"|"FailedToAdd"|"Added")>
Result of the operation
Source:
add_device(serial_number) → {Promise.<("NotFound"|"AlreadyRegistered"|"Added")>}
Adds device into managed list
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<("NotFound"|"AlreadyRegistered"|"Added")>
Result of the operation
Source:
add_device(serial_number) → {Promise.<("NotFound"|"AlreadyRegistered"|"Added")>}
Adds device into managed list
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<("NotFound"|"AlreadyRegistered"|"Added")>
Result of the operation
Source:
add_event_listener(listener)
Adds event listener
Parameters:
Source:
add_event_listener(listener)
Adds event listener
Parameters:
Source:
add_image(serial_number, image_data) → {Promise.<?string>}
Adds images of specified device
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
image_data
string
Image encoded in Base64
Returns:
Type
Description
Promise.<?string>
Image identifier, null if invalid image or device wasn't found
Source:
add_image(serial_number, image_data) → {Promise.<?string>}
Adds images of specified device
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
image_data
string
Image encoded in Base64
Returns:
Type
Description
Promise.<?string>
Image identifier, null if invalid image or device wasn't found
Source:
add_module_value(module_name, path) → {Promise.<("ModuleNotFound"|"FailedToAdd"|"Added")>}
Adds element to module setting for specified module
Parameters:
Name
Type
Description
module_name
string
Module name
path
string
Path to setting
Returns:
Type
Description
Promise.<("ModuleNotFound"|"FailedToAdd"|"Added")>
Result of the operation
Source:
add_module_value(module_name, path) → {Promise.<("ModuleNotFound"|"FailedToAdd"|"Added")>}
Adds element to module setting for specified module
Parameters:
Name
Type
Description
module_name
string
Module name
path
string
Path to setting
Returns:
Type
Description
Promise.<("ModuleNotFound"|"FailedToAdd"|"Added")>
Result of the operation
Source:
Clears button from current screen for specified device, commit the change later with commit_changes in order for this to get saved
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
key
number
|
string
Index of the key (0-255)
Returns:
Type
Description
Promise.<("DeviceNotFound"|"FailedToClear"|"Cleared")>
Result of the operation
Source:
Clears button from current screen for specified device, commit the change later with commit_changes in order for this to get saved
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
key
number
|
string
Index of the key (0-255)
Returns:
Type
Description
Promise.<("DeviceNotFound"|"FailedToClear"|"Cleared")>
Result of the operation
Source:
clipboard_status() → {Promise.<("Empty"|"Full")>}
Retrieves clipboard status of daemon
Returns:
Type
Description
Promise.<("Empty"|"Full")>
Clipboard status, it's either empty or full
Source:
clipboard_status() → {Promise.<("Empty"|"Full")>}
Retrieves clipboard status of daemon
Returns:
Type
Description
Promise.<("Empty"|"Full")>
Clipboard status, it's either empty or full
Source:
commit_changes(serial_number) → {Promise.<("DeviceNotFound"|"Committed")>}
Commits changes made with screen related functions to device config, so they can be saved by save_device_config. Must be either called after each change, or sequence of changes
Parameters:
Name
Type
Description
serial_number
serial
Returns:
Type
Description
Promise.<("DeviceNotFound"|"Committed")>
Result of the operation
Source:
commit_changes(serial_number) → {Promise.<("DeviceNotFound"|"Committed")>}
Commits changes made with screen related functions to device config, so they can be saved by save_device_config. Must be either called after each change, or sequence of changes
Parameters:
Name
Type
Description
serial_number
serial
Returns:
Type
Description
Promise.<("DeviceNotFound"|"Committed")>
Result of the operation
Source:
Copies button into daemon's clipboard
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
key
number
|
string
Index of the key (0-255)
Returns:
Type
Description
Promise.<("DeviceNotFound"|"NoButton"|"Copied")>
Result of the operation
Source:
Copies button into daemon's clipboard
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
key
number
|
string
Index of the key (0-255)
Returns:
Type
Description
Promise.<("DeviceNotFound"|"NoButton"|"Copied")>
Result of the operation
Source:
destroy()
Destroys the client
Source:
destroy()
Destroys the client
Source:
device_list() → {Promise.<Array.<{device_type: ("Unknown"|"Mini"|"Original"|"OriginalV2"|"XL"|"MK2"), serial_number: string, managed: boolean, online: boolean}>>}
Retrieves device list currently recognized by daemon
Returns:
Type
Description
Promise.<Array.<{device_type: ("Unknown"|"Mini"|"Original"|"OriginalV2"|"XL"|"MK2"), serial_number: string, managed: boolean, online: boolean}>>
Device list
Source:
device_list() → {Promise.<Array.<{device_type: ("Unknown"|"Mini"|"Original"|"OriginalV2"|"XL"|"MK2"), serial_number: string, managed: boolean, online: boolean}>>}
Retrieves device list currently recognized by daemon
Returns:
Type
Description
Promise.<Array.<{device_type: ("Unknown"|"Mini"|"Original"|"OriginalV2"|"XL"|"MK2"), serial_number: string, managed: boolean, online: boolean}>>
Device list
Source:
Simulates a key press on the device
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
key
number
|
string
Index of the key (0-255)
Returns:
Type
Description
Promise.<("DeviceNotFound"|"Activated")>
Result of the operation
Source:
Simulates a key press on the device
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
key
number
|
string
Index of the key (0-255)
Returns:
Type
Description
Promise.<("DeviceNotFound"|"Activated")>
Result of the operation
Source:
drop_stack_to_root(serial_number) → {Promise.<("DeviceNotFound"|"Dropped")>}
Resets stack and pushes a screen
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<("DeviceNotFound"|"Dropped")>
Result of the operation
Source:
drop_stack_to_root(serial_number) → {Promise.<("DeviceNotFound"|"Dropped")>}
Resets stack and pushes a screen
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<("DeviceNotFound"|"Dropped")>
Result of the operation
Source:
export_device_config(serial_number) → {Promise.<?string>}
Exports device config from daemon
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<?string>
String that represents device config, null if device wasn't found
Source:
export_device_config(serial_number) → {Promise.<?string>}
Exports device config from daemon
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<?string>
String that represents device config, null if device wasn't found
Source:
force_pop_screen(serial_number) → {Promise.<("DeviceNotFound"|"Popped")>}
Pops a screen from device's screen stack, bypassing limit of pop_screen, use this only if you know what you're doing
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<("DeviceNotFound"|"Popped")>
Result of the operation
Source:
force_pop_screen(serial_number) → {Promise.<("DeviceNotFound"|"Popped")>}
Pops a screen from device's screen stack, bypassing limit of pop_screen, use this only if you know what you're doing
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<("DeviceNotFound"|"Popped")>
Result of the operation
Source:
get_brightness(serial_number) → {Promise.<?number>}
Gets current brightness of specified device
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<?number>
Brightness value, or null if device wasn't found
Source:
get_brightness(serial_number) → {Promise.<?number>}
Gets current brightness of specified device
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<?number>
Brightness value, or null if device wasn't found
Source:
Retrieves button from current screen of specified device
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
key
number
|
string
Index of the key (0-255)
Returns:
Type
Description
Promise.<?Button >
Button object, null if device or button wasn't found
Source:
Retrieves button from current screen of specified device
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
key
number
|
string
Index of the key (0-255)
Returns:
Type
Description
Promise.<?Button >
Button object, null if device or button wasn't found
Source:
Gets current image rendered on specified device
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
key
number
|
string
Index of the key (0-255)
Returns:
Type
Description
Promise.<?string>
Base64 png image data, null if device or button wasn't found
Source:
Gets current image rendered on specified device
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
key
number
|
string
Index of the key (0-255)
Returns:
Type
Description
Promise.<?string>
Base64 png image data, null if device or button wasn't found
Source:
Gets current images rendered on specified device
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<?Object.<string, string>>
Map consisting of key indices and base64 png image data, null if device wasn't found
Source:
Gets current images rendered on specified device
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<?Object.<string, string>>
Map consisting of key indices and base64 png image data, null if device wasn't found
Source:
get_component_values(serial_number, key, component_name) → {Promise.<?Array.<Value >>}
Gets component values for component from a button
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
key
number
|
string
Index of the key (0-255)
component_name
string
Component name
Returns:
Type
Description
Promise.<?Array.<Value >>
Component values, null if component or device wasn't found
Source:
get_component_values(serial_number, key, component_name) → {Promise.<?Array.<Value >>}
Gets component values for component from a button
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
key
number
|
string
Index of the key (0-255)
component_name
string
Component name
Returns:
Type
Description
Promise.<?Array.<Value >>
Component values, null if component or device wasn't found
Source:
get_current_screen(serial_number) → {Promise.<?Panel >}
Gets current screen of specified device
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<?Panel >
Screen consisting of key indices and button objects, null if device wasn't found
Source:
get_current_screen(serial_number) → {Promise.<?Panel >}
Gets current screen of specified device
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<?Panel >
Screen consisting of key indices and button objects, null if device wasn't found
Source:
get_device(serial_number) → {Promise.<?{device_type: ("Unknown"|"Mini"|"Original"|"OriginalV2"|"XL"|"MK2"), serial_number: string, managed: boolean, online: boolean}>}
Retrieves data of specific device
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<?{device_type: ("Unknown"|"Mini"|"Original"|"OriginalV2"|"XL"|"MK2"), serial_number: string, managed: boolean, online: boolean}>
Device Data, null if device wasn't found
Source:
get_device(serial_number) → {Promise.<?{device_type: ("Unknown"|"Mini"|"Original"|"OriginalV2"|"XL"|"MK2"), serial_number: string, managed: boolean, online: boolean}>}
Retrieves data of specific device
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<?{device_type: ("Unknown"|"Mini"|"Original"|"OriginalV2"|"XL"|"MK2"), serial_number: string, managed: boolean, online: boolean}>
Device Data, null if device wasn't found
Source:
get_device_config(serial_number) → {Promise.<?DeviceConfig >}
Gets device config of specified device
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<?DeviceConfig >
Device config, null if device wasn't found
Source:
get_device_config(serial_number) → {Promise.<?DeviceConfig >}
Gets device config of specified device
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<?DeviceConfig >
Device config, null if device wasn't found
Source:
get_module_values(module_name) → {Promise.<?Array.<Value >>}
Retrieves module values of specified module
Parameters:
Name
Type
Description
module_name
string
Module name
Returns:
Type
Description
Promise.<?Array.<Value >>
Module values, null if module wasn't found
Source:
get_module_values(module_name) → {Promise.<?Array.<Value >>}
Retrieves module values of specified module
Parameters:
Name
Type
Description
module_name
string
Module name
Returns:
Type
Description
Promise.<?Array.<Value >>
Module values, null if module wasn't found
Source:
get_stack(serial_number) → {Promise.<?Array.<Panel >>}
Gets screen stack of specified device
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<?Array.<Panel >>
Screen stack array, null if device wasn't found
Source:
get_stack(serial_number) → {Promise.<?Array.<Panel >>}
Gets screen stack of specified device
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<?Array.<Panel >>
Screen stack array, null if device wasn't found
Source:
get_stack_names(serial_number) → {Promise.<?Array.<string>>}
Gets screen stack names of specified device
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<?Array.<string>>
Screen stack name array, null if device wasn't found
Source:
get_stack_names(serial_number) → {Promise.<?Array.<string>>}
Gets screen stack names of specified device
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<?Array.<string>>
Screen stack name array, null if device wasn't found
Source:
import_device_config(serial_number, config) → {Promise.<("DeviceNotFound"|"InvalidConfig"|"FailedToSave"|"Imported")>}
Imports device config from string into daemon
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
config
string
String that represents device config
Returns:
Type
Description
Promise.<("DeviceNotFound"|"InvalidConfig"|"FailedToSave"|"Imported")>
Result of the operation. "FailedToSave" if error happened while saving config on daemon's end
Source:
import_device_config(serial_number, config) → {Promise.<("DeviceNotFound"|"InvalidConfig"|"FailedToSave"|"Imported")>}
Imports device config from string into daemon
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
config
string
String that represents device config
Returns:
Type
Description
Promise.<("DeviceNotFound"|"InvalidConfig"|"FailedToSave"|"Imported")>
Result of the operation. "FailedToSave" if error happened while saving config on daemon's end
Source:
is_connected() → {boolean}
Checks if protocol is currently connected to daemon
Returns:
Type
Description
boolean
Connection status
Source:
is_connected() → {boolean}
Checks if protocol is currently connected to daemon
Returns:
Type
Description
boolean
Connection status
Source:
list_components() → {Promise.<Object.<string, Object.<string, {default_looks: Object, description: string, display_name: string}>>>}
Lists components provided by loaded modules
Returns:
Type
Description
Promise.<Object.<string, Object.<string, {default_looks: Object, description: string, display_name: string}>>>
Map of modules to maps of component names to component definitions
Source:
list_components() → {Promise.<Object.<string, Object.<string, {default_looks: Object, description: string, display_name: string}>>>}
Lists components provided by loaded modules
Returns:
Type
Description
Promise.<Object.<string, Object.<string, {default_looks: Object, description: string, display_name: string}>>>
Map of modules to maps of component names to component definitions
Source:
list_fonts() → {Promise.<Array.<string>>}
Lists names of fonts loaded by daemon
Returns:
Type
Description
Promise.<Array.<string>>
Font name list
Source:
list_fonts() → {Promise.<Array.<string>>}
Lists names of fonts loaded by daemon
Returns:
Type
Description
Promise.<Array.<string>>
Font name list
Source:
list_images(serial_number) → {Promise.<?Object.<string, string>>}
Lists images of specified device
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<?Object.<string, string>>
Image map, null if device wasn't found
Source:
list_images(serial_number) → {Promise.<?Object.<string, string>>}
Lists images of specified device
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<?Object.<string, string>>
Image map, null if device wasn't found
Source:
list_modules() → {Promise.<Array.<{name: string, author: string, description: string, version: string, used_features: Array.<Array.<string>>}>>}
Lists modules daemon has loaded
Returns:
Type
Description
Promise.<Array.<{name: string, author: string, description: string, version: string, used_features: Array.<Array.<string>>}>>
Module list
Source:
list_modules() → {Promise.<Array.<{name: string, author: string, description: string, version: string, used_features: Array.<Array.<string>>}>>}
Lists modules daemon has loaded
Returns:
Type
Description
Promise.<Array.<{name: string, author: string, description: string, version: string, used_features: Array.<Array.<string>>}>>
Module list
Source:
Creates a new empty button, commit the change later with commit_changes in order for this to get saved
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
key
number
|
string
Index of the key (0-255)
Returns:
Type
Description
Promise.<("DeviceNotFound"|"FailedToCreate"|"Created")>
Result of the operation
Source:
Creates a new empty button, commit the change later with commit_changes in order for this to get saved
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
key
number
|
string
Index of the key (0-255)
Returns:
Type
Description
Promise.<("DeviceNotFound"|"FailedToCreate"|"Created")>
Result of the operation
Source:
Creates a new button from component, commit the change later with commit_changes in order for this to get saved
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
key
number
|
string
Index of the key (0-255)
component_name
string
Component name
Returns:
Type
Description
Promise.<("DeviceNotFound"|"ComponentNotFound"|"FailedToCreate"|"Created")>
Result of the operation
Source:
Creates a new button from component, commit the change later with commit_changes in order for this to get saved
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
key
number
|
string
Index of the key (0-255)
component_name
string
Component name
Returns:
Type
Description
Promise.<("DeviceNotFound"|"ComponentNotFound"|"FailedToCreate"|"Created")>
Result of the operation
Source:
Pastes button from daemon's clipboard
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
key
number
|
string
Index of the key (0-255)
Returns:
Type
Description
Promise.<("DeviceNotFound"|"FailedToPaste"|"Pasted")>
Result of the operation
Source:
Pastes button from daemon's clipboard
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
key
number
|
string
Index of the key (0-255)
Returns:
Type
Description
Promise.<("DeviceNotFound"|"FailedToPaste"|"Pasted")>
Result of the operation
Source:
pop_screen(serial_number) → {Promise.<("DeviceNotFound"|"OnlyOneRemaining"|"Popped")>}
Pops a screen from device's screen stack, unless only one screen remaining
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<("DeviceNotFound"|"OnlyOneRemaining"|"Popped")>
Result of the operation
Source:
pop_screen(serial_number) → {Promise.<("DeviceNotFound"|"OnlyOneRemaining"|"Popped")>}
Pops a screen from device's screen stack, unless only one screen remaining
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<("DeviceNotFound"|"OnlyOneRemaining"|"Popped")>
Result of the operation
Source:
push_screen(serial_number, screen) → {Promise.<("DeviceNotFound"|"Pushed")>}
Pushes a new screen into device's screen stack
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
screen
Panel
Screen object consisting of key indices and button objects
Returns:
Type
Description
Promise.<("DeviceNotFound"|"Pushed")>
Result of the operation
Source:
push_screen(serial_number, screen) → {Promise.<("DeviceNotFound"|"Pushed")>}
Pushes a new screen into device's screen stack
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
screen
Panel
Screen object consisting of key indices and button objects
Returns:
Type
Description
Promise.<("DeviceNotFound"|"Pushed")>
Result of the operation
Source:
reload_device_config(serial_number) → {Promise.<("ConfigError"|"DeviceNotFound"|"Reloaded")>}
Reloads device config of specified device, all unsaved changes will be lost doing this
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<("ConfigError"|"DeviceNotFound"|"Reloaded")>
Result of the operation
Source:
reload_device_config(serial_number) → {Promise.<("ConfigError"|"DeviceNotFound"|"Reloaded")>}
Reloads device config of specified device, all unsaved changes will be lost doing this
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<("ConfigError"|"DeviceNotFound"|"Reloaded")>
Result of the operation
Source:
reload_device_configs() → {Promise.<("ConfigError"|"Reloaded")>}
Reloads all device configs, all unsaved changes will be lost doing this
Returns:
Type
Description
Promise.<("ConfigError"|"Reloaded")>
Result of the operation
Source:
reload_device_configs() → {Promise.<("ConfigError"|"Reloaded")>}
Reloads all device configs, all unsaved changes will be lost doing this
Returns:
Type
Description
Promise.<("ConfigError"|"Reloaded")>
Result of the operation
Source:
remove_component(serial_number, key, component_name) → {Promise.<("DeviceNotFound"|"FailedToRemove"|"Removed")>}
Removes component from a button, commit the change later with commit_changes in order for this to get saved
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
key
number
|
string
Index of the key (0-255)
component_name
string
Component name
Returns:
Type
Description
Promise.<("DeviceNotFound"|"FailedToRemove"|"Removed")>
Result of the operation
Source:
remove_component(serial_number, key, component_name) → {Promise.<("DeviceNotFound"|"FailedToRemove"|"Removed")>}
Removes component from a button, commit the change later with commit_changes in order for this to get saved
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
key
number
|
string
Index of the key (0-255)
component_name
string
Component name
Returns:
Type
Description
Promise.<("DeviceNotFound"|"FailedToRemove"|"Removed")>
Result of the operation
Source:
remove_component_value(serial_number, key, component_name, path, index) → {Promise.<("DeviceNotFound"|"FailedToRemove"|"Removed")>}
Removes element from component value, commit the change later with commit_changes in order for this to get saved
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
key
number
|
string
Index of the key (0-255)
component_name
string
Component name
path
string
Path to value
index
number
|
string
Index of element
Returns:
Type
Description
Promise.<("DeviceNotFound"|"FailedToRemove"|"Removed")>
Result of the operation
Source:
remove_component_value(serial_number, key, component_name, path, index) → {Promise.<("DeviceNotFound"|"FailedToRemove"|"Removed")>}
Removes element from component value, commit the change later with commit_changes in order for this to get saved
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
key
number
|
string
Index of the key (0-255)
component_name
string
Component name
path
string
Path to value
index
number
|
string
Index of element
Returns:
Type
Description
Promise.<("DeviceNotFound"|"FailedToRemove"|"Removed")>
Result of the operation
Source:
remove_device(serial_number) → {Promise.<("NotRegistered"|"Removed")>}
Removes device from managed list
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<("NotRegistered"|"Removed")>
Result of the operation
Source:
remove_device(serial_number) → {Promise.<("NotRegistered"|"Removed")>}
Removes device from managed list
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<("NotRegistered"|"Removed")>
Result of the operation
Source:
remove_image(serial_number, image_identifier) → {Promise.<("NotFound"|"Removed")>}
Removes images from specified device
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
image_identifier
string
Image identifier
Returns:
Type
Description
Promise.<("NotFound"|"Removed")>
Result of the operation
Source:
remove_image(serial_number, image_identifier) → {Promise.<("NotFound"|"Removed")>}
Removes images from specified device
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
image_identifier
string
Image identifier
Returns:
Type
Description
Promise.<("NotFound"|"Removed")>
Result of the operation
Source:
remove_module_value(module_name, path, index) → {Promise.<("ModuleNotFound"|"FailedToRemove"|"Removed")>}
Removes element from module setting for specified module
Parameters:
Name
Type
Description
module_name
string
Module name
path
string
Path to setting
index
number
|
string
Index of element
Returns:
Type
Description
Promise.<("ModuleNotFound"|"FailedToRemove"|"Removed")>
Result of the operation
Source:
remove_module_value(module_name, path, index) → {Promise.<("ModuleNotFound"|"FailedToRemove"|"Removed")>}
Removes element from module setting for specified module
Parameters:
Name
Type
Description
module_name
string
Module name
path
string
Path to setting
index
number
|
string
Index of element
Returns:
Type
Description
Promise.<("ModuleNotFound"|"FailedToRemove"|"Removed")>
Result of the operation
Source:
replace_screen(serial_number, screen) → {Promise.<("DeviceNotFound"|"Replaced")>}
Replaces current screen with new one
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
screen
Panel
Screen object consisting of key indices and button objects
Returns:
Type
Description
Promise.<("DeviceNotFound"|"Replaced")>
Result of the operation
Source:
replace_screen(serial_number, screen) → {Promise.<("DeviceNotFound"|"Replaced")>}
Replaces current screen with new one
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
screen
Panel
Screen object consisting of key indices and button objects
Returns:
Type
Description
Promise.<("DeviceNotFound"|"Replaced")>
Result of the operation
Source:
reset_stack(serial_number, screen) → {Promise.<("DeviceNotFound"|"Reset")>}
Resets stack and pushes a screen
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
screen
Panel
Screen object consisting of key indices and button objects
Returns:
Type
Description
Promise.<("DeviceNotFound"|"Reset")>
Result of the operation
Source:
reset_stack(serial_number, screen) → {Promise.<("DeviceNotFound"|"Reset")>}
Resets stack and pushes a screen
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
screen
Panel
Screen object consisting of key indices and button objects
Returns:
Type
Description
Promise.<("DeviceNotFound"|"Reset")>
Result of the operation
Source:
save_device_config(serial_number) → {Promise.<("ConfigError"|"DeviceNotFound"|"Saved")>}
Saves device config of specified device
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<("ConfigError"|"DeviceNotFound"|"Saved")>
Return of the operation
Source:
save_device_config(serial_number) → {Promise.<("ConfigError"|"DeviceNotFound"|"Saved")>}
Saves device config of specified device
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
Returns:
Type
Description
Promise.<("ConfigError"|"DeviceNotFound"|"Saved")>
Return of the operation
Source:
save_device_configs() → {Promise.<("ConfigError"|"Saved")>}
Saves all device configs
Returns:
Type
Description
Promise.<("ConfigError"|"Saved")>
Result of the operation
Source:
save_device_configs() → {Promise.<("ConfigError"|"Saved")>}
Saves all device configs
Returns:
Type
Description
Promise.<("ConfigError"|"Saved")>
Result of the operation
Source:
set_brightness(serial_number, brightness) → {Promise.<("DeviceNotFound"|"Set")>}
Sets brightness of specified device
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
brightness
number
|
string
Brightness value (integer 0-100 or higher)
Returns:
Type
Description
Promise.<("DeviceNotFound"|"Set")>
Result of the operation
Source:
set_brightness(serial_number, brightness) → {Promise.<("DeviceNotFound"|"Set")>}
Sets brightness of specified device
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
brightness
number
|
string
Brightness value (integer 0-100 or higher)
Returns:
Type
Description
Promise.<("DeviceNotFound"|"Set")>
Result of the operation
Source:
Sets button on current screen for specified device, commit the change later with commit_changes in order for this to get saved
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
key
number
|
string
Index of the key (0-255)
button
Button
Button object
Returns:
Type
Description
Promise.<("NoScreen"|"DeviceNotFound"|"Set")>
Result of the operation
Source:
Sets button on current screen for specified device, commit the change later with commit_changes in order for this to get saved
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
key
number
|
string
Index of the key (0-255)
button
Button
Button object
Returns:
Type
Description
Promise.<("NoScreen"|"DeviceNotFound"|"Set")>
Result of the operation
Source:
set_component_value(serial_number, key, component_name, value) → {Promise.<("DeviceNotFound"|"FailedToSet"|"Set")>}
Sets component values for a component on a button, commit the change later with commit_changes in order for this to get saved
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
key
number
|
string
Index of the key (0-255)
component_name
string
Component name
value
Value
Value to set
Returns:
Type
Description
Promise.<("DeviceNotFound"|"FailedToSet"|"Set")>
Result of the operation
Source:
set_component_value(serial_number, key, component_name, value) → {Promise.<("DeviceNotFound"|"FailedToSet"|"Set")>}
Sets component values for a component on a button, commit the change later with commit_changes in order for this to get saved
Parameters:
Name
Type
Description
serial_number
string
Serial number of the device
key
number
|
string
Index of the key (0-255)
component_name
string
Component name
value
Value
Value to set
Returns:
Type
Description
Promise.<("DeviceNotFound"|"FailedToSet"|"Set")>
Result of the operation
Source:
set_module_value(module_name, value) → {Promise.<("ModuleNotFound"|"FailedToSet"|"Set")>}
Sets module values for specified module
Parameters:
Name
Type
Description
module_name
string
Module name
value
Value
Value to set
Returns:
Type
Description
Promise.<("ModuleNotFound"|"FailedToSet"|"Set")>
Result of the operation
Source:
set_module_value(module_name, value) → {Promise.<("ModuleNotFound"|"FailedToSet"|"Set")>}
Sets module values for specified module
Parameters:
Name
Type
Description
module_name
string
Module name
value
Value
Value to set
Returns:
Type
Description
Promise.<("ModuleNotFound"|"FailedToSet"|"Set")>
Result of the operation
Source:
version() → {Promise.<string>}
Retrieves version of socket API that daemon is using
Returns:
Type
Description
Promise.<string>
Version of the daemon
Source:
version() → {Promise.<string>}
Retrieves version of socket API that daemon is using
Returns:
Type
Description
Promise.<string>
Version of the daemon
Source: