REST API
Documentation for the plugin's API, which can be used to create custom controls etc. in other services.
Last updated
Documentation for the plugin's API, which can be used to create custom controls etc. in other services.
Last updated
The plugin implements a SimpleAPI as provided by OctoPrint, which enables external access to the plugin's functionality.
It has a single endpoint, supporting a get request and posting a command.
GET
http://octopi.local/api/plugin/ws281x:led:status
Get current state of the plugin, which includes the light status and the torch status.
Name | Type | Description |
---|---|---|
POST
http://octopi.local/api/plugin/ws281x:led:status
Send commands to the plugin, to make it do something.
See also the SimpleApi docs for details about how the request should be structured.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Command | Parameters | Explanation |
---|---|---|
X-Api-Key*
string
A valid OctoPrint API key.
X-Api-Key*
string
A valid OctoPrint API key
command*
string
The command to be sent to the plugin. See commands below.
lights_on
None
Turn the LEDs on
lights_off
None
Turn the LEDs off
torch_on
None
Turn the torch mode on
torch_off
None
Turn the torch mode off. Only available if torch mode is configured as toggle.
test_os_config
None
Begin an OS configuration test. Asynchronous, data is returned on the socket
test_led
color
Set the LEDs to the configured HTML RGB colour, color should be a full 7 character hex (eg. #ff00ff
)