Issue with events

What is the problem?

Hey all, just got started with Octoprint and I am LOVING it. Having an issue with events. I put an LED strip on the front of my build plate connected to my raspberry pi and then made 2 python scripts, one to turn the strip on and one to turn it off. I can run each of these from the command line and they work perfectly. When I put them in PrintStarted and PrintDone they do not execute. Im wondering if it is difficulty executing SUDO commands from the events? thats all I can figure but cant find any log information on the events. Is there a log?

What did you already try to solve it?

WRITE HERE

Have you tried running in safe mode?

WRITE HERE

Did running in safe mode solve the problem?

WRITE HERE

Systeminfo Bundle

You can download this in OctoPrint's System Information dialog ... no bundle, no support!)

WRITE HERE

Additional information about your setup

OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible
here is what it says in the log even though I do have debug enabled
2022-03-29 07:54:58,333 - octoprint.events - WARNING - Command failed with return code 1, enable debug logging on target 'octoprint.events' for details

here are how the events are configured
PrintStarted

sudo python3 /home/pi/led_on.py

PrintCancelled

sudo python3 /home/pi/led_off.py

PrintFailed

sudo python3 /home/pi/led_off.py

PrintDone

sudo python3 /home/pi/led_off.py

Can probably remove this, I just made sudo not require a password and it started working.

if the pi user is a member of the correct groups you may not need the sudo command in that. Another option is of course the ws281x plugin.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.