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

[Feature Request] Proposal: Configurable Strip Segments, Parametric Effects and more #121

Open IARI opened 3 years ago

IARI commented 3 years ago

Disclaimer

This proposal suggests some extensive changes which probably have already been suggested in one way or another and are certainly not on the plan in this fashion right now. However I hope, that this proposal still offers value to the process, and maybe could be a source of inspiration for the long term development. So in advance I want to make clear that

Maybe after reading it you're thinking "Who the fuck even is this guy and when does he even think anyone has the time for this, all of this is complete overkill" - and of course that's completely fine, throw it in the bin. However I hope this offers at least some thought-food ;) Anyways, as a software engineer I could offer support by evolving this idea into something that you see fit to be implemented in some more or less distant future.

Is your feature request related to a problem? Please describe. My problem is similar to what is described in #57 - however my setup is slightly different. Before I get into the details, let me explain my setup: 3dp-enclosure-led-config

I have installed a WS2812b strip within the enclosure I built for my printer, which is cut into 8 parts. The parts are mounted on the along the side- and top edges of the enclosure cube. They I wired them together like this:

The intention was, that:

It should be possible to control both segments independently from each other.

Proposal

Describe the solution you'd like I propose

I would strive to separate the concept of effects from the conditions and their input values as follows:

Terminology:

Why should this be implemented? I believe that there are many benefits and possible use-cases for a generic approach like this. This could

I like the idea of experimenting with my setup - maybe i want to change the led-wiring tomorrow. Maybe introduce another strip?

cp2004 commented 3 years ago

This is kind of one large proposal that covers a lot of comments I have had recently, and a few issues (segments: #116, custom triggers: kind of #120 #102). It's detailed - appreciate the thought that has gone in here!

We'll start with the easy bit: yes to something like this. I have had on my mind recently that I want to implement two big features in this plugin - segment control and custom effect triggers. There is currently zero guarantee of how or when either of those may happen, my hope is not too long but I have a ton of things on my 'ToDo' list that I think would be cool.

Custom triggers

Several different types of trigger here - OctoPrint events, Gcode commands, Host @ commands. For each one, there's the right configuration for an 'effect'. Each type has handlers in the plugin, I sort of thought out this implementation already.

Segment control

Something similar to how WLED does it, this manages segment control reasonably well. I haven't poked at how it does it but given it's on a completely different platform it may not be of much use. The idea here would that be for every event/trigger, any number of segments are assigned to it. Slightly different from what you were getting at, main difference is simplicity - I didn't think there is much need to separate triggers from the effects, so instead of 3 'configuration' sections you have just 2.

The approach I was thinking of taking with all of this was time - it was going to sit in my head for a while, and work through some problems before actually committing to anything. The second thing, is simplicity. The vast majority of users have just one LED strip, that should make some cool patterns above their printer. There's little need for them for such a complex configuration. Predefined effects must stay, I want an out of the box experience - I hate things that I have to configure for a while first to get it to work well.

That's the start, I might add some more comments later.

cp2004 commented 3 years ago

Ok, that didn't take long - more comments:

IARI commented 3 years ago

Yep, I suppose that getting into the project at the level, including the communication required would be a huge overhead. Just let me know, if there is anything you could use help with in a way that you feel would actually save you time.