thomst08 / OctoLight

OctoLight with auto turn off and on
7 stars 3 forks source link

OctoLight

A simple plugin that allows for the toggling of a GPIO pin on the Raspberry Pi. The user can toggle the pin through a button in the navigation bar, an external button, OctoPrint events and through custom GCODE commands. Printer events also allow the pin to be toggled on then off after a period of time.

WebUI interface

Setup

Install via the bundled Plugin Manager or manually using this URL:

https://github.com/thomst08/OctoLight/archive/master.zip

Configuration

Settings panel

Main Light Settings

Currently, you can configure settings:


Settings panel

External Button Settings


Settings panel

Event Settings


Settings panel

Custom GCODE Settings

API

Note: As of version 1.0.1, the API has been updated to be more in line with a RESTFUL standard, instead of functions being changed with a GET request, the new setup requires a POST request and the command to be sent in the body. To keep backwards compatibility with previous API calls, the previous GET commands can still be used, however, it is recommended to update as these commands will be removed around the end of 2024. Please reach out if this is an issue or if you need help. Please have a look at the new API calls below to update.

Base API URL: http://YOUR_OCTOPRINT_SERVER/api/plugin/octolight

This API returns light state in JSON for both GET and POST requests: {state: true}

Actions

Examples

GET Request
POST Requests

Thank you list

Thank you goes out to the following people: