cp2004 / OctoPrint-WS281x_LED_Status

Add some RGB LEDs to your printer for a quick status update!
https://plugins.octoprint.org/plugins/ws281x_led_status
GNU Affero General Public License v3.0
111 stars 26 forks source link

Advanced options: Custom triggers for effects. #125

Closed cp2004 closed 2 years ago

cp2004 commented 3 years ago

This ticket intends to track the sole idea of custom effects, which will be on the cards for 0.8.0

Please do not open a new issue requesting a specific event/trigger to be added to the plugin


The predefined, hard coded events that the plugin reacts to clearly do not do everything. The proposed solution is user-configurable 'triggers', that can be used to customise any effects.#102

What will this involve?

What will not be covered by this issue


Listing registered events

events = [x for x in octoprint.events.Events.__dict__ if x.isupper()]

Custom Triggers

Settings Structure

{
    "custom":[
        {
            "type": "atcommand",
            "command": "party",
            "effect": "Solid Colour",
            "color": "#ff0000",
            "delay": "1"
        },
        {
            "type": "gcode",
            "match_type": "gcode/exact/regex",
            "pattern": "G28",
            "effect": "Solid Colour",
            "color": "#ff0000",
            "delay": "1"
        },
        {
            "type": "event",
            "event": "PrintDone",
            "effect": "Solid Colour",
            "color": "#ff0000",
            "delay": "1"
        }
    ]

}
cp2004 commented 2 years ago

Custom triggers are go! Implemented ready for 0.8.0.

image

cp2004 commented 2 years ago

0.8.0 has been released (finally...!)