REST API
Documentation for the plugin's API, which can be used to create custom controls etc. in other services.
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
SimpleAPI Get
post
http://octopi.local
/api/plugin/ws281x:led:status
SimpleAPI Command
See also the SimpleApi docs for details about how the request should be structured.

Commands

Command
Parameters
Explanation
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)
Last modified 2mo ago
Export as PDF
Copy link
Edit on GitHub