Automatic light when watching stream

Hi there,

I'm new with octoprint, just installed it and looking the available plugins. I see there is a plugin to manually turn lights on and off manually (light controlled by a GPIO), but i was wondering if it could be possible to create a plugin that opens the light if you are "consuming" the video stream/ you are in the control tab.

As i'm not sure about the extension capabilities of the plugins, i wanted to know it that would be even possible, that's my main doubt for this question. If something like that may be possible, i may want to try to do it.

It is possible, and it is something I have implemented in the upcoming release (still in development, not that soon) of WS281x LED Status, using the on tab change callbacks in the UI.

Reference, commit where I implemented this:

Fantastic, just what i was looking for! I'll keep an eye on it


Have a look here. It's a script I found and modified it to turn on/off lights when someone's watching the stream Webcam activates LEDs?