Does octoprint send data to another script in Raspberry Pi?

What is the problem?

I am looking to automate my 3D printing room. And one way of doing that is by using Octoprint on Raspberry Pi and then use the Octoprint software to control LEDs above that respective printer. I want to know if Octoprint can send data to a python script running on the Raspberry Pi.

For example, I have 4 printer for one Pi, now I want the software to send a specific value to the python script when a certain printer is running. When the data is sent it turns on and when the print is finished, a specific value is sent to turn the light off.

Is something like this possible?

that is built in to octoprint, check out the event manager settings.

also, dependent on your led setup, there are a couple of plugins too like WLED and ws281x plugins.

On a similar note to plugins - OctoPrint plugins are written in Python, so if what you want doesn't exactly exist, then it should not be too difficult to adapt your existing Python script to a plugin.

Thanks, I just wanted to hear this. I think I will head on to the plugins section to do my research, If not available then just make one.