The IP or hostname of the device.
Client options object.
Options that are set on the device.
List of effects available for this device.
Information about the device.
Promise that is resolved when a successful connection has been made and the state has been retrieved.
Lighting capabilities of the device.
Live streaming data sources currently sending data.
Methods relating to the nightlight feature.
State object of the nightlight feature
Deactivate the nightlight.
Activate the nightlight. Depending on the set mode, the device will fade towards the target brightness over the set duration.
Optional. Duration if number is passed, otherwise nightlight state object containing other properties to set while activating the nightlight
Set the length of time the nightlight feature will remain active for.
Time in minutes, 1 to 255
Set the mode the nightlight will operate by.
Set the target brightness of the nightlight feature.
0 to 255
Change the nightlight state to the opposite of what it currently is.
List of color palettes available for this device.
List of presets save on this device.
Device's current state.
The ready state of the WebSocket instance.
Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in ยง 2.8 Observing event listeners.
When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
Allow live data to be displayed by the device.
Constructs a state update request that applies new state to all segments passed, or to the main state object if no segments are passed.
The state to update, or a function that is called optionally per-segment and returns the state to update
One or more segment IDs
Clear the segment array completely.
Connect to the device's WebSocket API.
Create a new segment and adds it to the segment array.
Every updatable parameter on the segment object except id
Delete a preset by its ID.
ID of the preset to delete
Delete a specific segment by id
.
ID of the segment to be removed
Disconnect from the device's WebSocket API.
Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
Get a preset by its ID.
ID of the desired preset
Get a segment by its id
.
ID of the desired segment
Ignore any live data if the device is currently being used to display the live data.
If false
or undefined
, the live data will be ignored until the live data stream ends. If true
the device will ignore live data until it reboots.
Hard reboot the device.
Get the latest config from the device.
Get the latest context from the device.
Get the latest effects from the device.
Get the latest info from the device.
Get the latest palettes from the device.
Get the latest presets from the device.
Get the latest state from the device.
Removes the event listener in target's event listener list with the same type, callback, and options.
Save a preset.
Save a preset using the device's current state.
Set the device's master brightness.
Any integer between 0 and 255
Set the correlated color temperature of the device's main segment.
The desired temperature in Kevlin
Set the primary color of the device's main segment.
RGB or RGBW color array
Set the effect applied to the device's main segment.
ID of the desired effect, as found in effects
Set which segment should be considered the main one.
ID of the main segment
Set the palette applied to the device's main segment.
ID of the desired palette, as found in palettes
Set a playlist for the device.
A playlist object
Activate a new preset.
ID of the desired preset
Set the primary color of the device's main segment.
RGB or RGBW color array
Set the secondary color of the device's main segment.
RGB or RGBW color array
Set the entire segment array.
Array of segment objects to replace the current array of segment objects
Set the tertiary color of the device's main segment.
RGB or RGBW color array
Duration of the crossfade between different colors/brightness levels.
Time in 100ms intervals (eg. 4 is 400ms), 0 to 255
Start a live stream of LED values from the device via the WebSocket API. Listen to the update:leds
event (e.g. wled.addEventListener('update:leds', cb)
).
Stop the live stream of LED values from the device.
Change the device or segment power state to the opposite of what it currently is.
Start the live stream if it is stopped, or stop the live stream if it is started
Set the device or segment power state to off.
Set the device or segment power state to on.
Make an update to the config object with multiple values.
Partial config object of values to update
Update a specific segment by id
.
ID of the segment to be updated
Every updatable parameter on the segment object except id
Make an update to the state object with multiple values.
Partial state object of values to update
Generated using TypeDoc
Client interface for WLED devices.