💡
WS281x LED Status
Github RepositoryPlugin ListingSponsor
0.8.x
0.8.x
  • Home of the docs
  • Guides
    • Setup Guide
      • Supported Hardware
      • Wiring your LEDs
      • SPI Setup
      • Initial Configuration
    • Setup in Docker
    • OctoLapse Timelapse Flash
    • Get Help Guide
  • Configuration
    • LED Strip Configuration
    • Printing Effects
    • Progress Effects
    • Features
    • Custom Triggers
  • 3rd Party Apps and Integrations
  • Utilities
  • Troubleshooting Guide
  • Documentation
    • Host @ Commands
    • M150 Intercept
    • REST API
Powered by GitBook
On this page
  • SimpleAPI Get
  • SimpleAPI Command
  • Commands

Was this helpful?

Edit on GitHub
Export as PDF
  1. Documentation

REST API

Documentation for the plugin's API, which can be used to create custom controls etc. in other services.

PreviousM150 Intercept

Last updated 3 years ago

Was this helpful?

The plugin implements a , which enables external access to the plugin's functionality.

It has a single endpoint, supporting a get request and posting a command.

SimpleAPI Get

GET http://octopi.local/api/plugin/ws281x_led_status

Get current state of the plugin, which includes the light status and the torch status.

Headers

Name
Type
Description

X-Api-Key*

string

A valid OctoPrint API key.

{
  "lights_on": false,
  "torch_on": false
}

SimpleAPI Command

POST http://octopi.local/api/plugin/ws281x_led_status

Send commands to the plugin, to make it do something.

Headers

Name
Type
Description

X-Api-Key*

string

A valid OctoPrint API key

Request Body

Name
Type
Description

command*

string

The command to be sent to the plugin. See commands below.

{
  "lights_on": false,
  "torch_on": false
}

Commands

Command
Parameters
Explanation

lights_on

None

Turn the LEDs on

lights_off

None

Turn the LEDs off

lights_toggle

None

Toggle the LED state

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)

See also the OctoPrint for details about how the request should be structured.

SimpleAPI as provided by OctoPrint
SimpleApi docs