I have created some python scripts for my octopi that control different things around my printer, but I wanted to add buttons to the control view to trigger those scripts. When I look at the custom control docs page for octoprint, it shows how to add the buttons but it looks like it's just for gcode commands.
I have created a custom plugin to test, but I can't find a way to add the button in the control page. Does anyone know what I may be missing?
If doing it from a plugin you can use getAdditionalControls() callback in the js side to add the buttons for you, or simply update the config.yaml file directly.
Another way is sending customized messages back to Python. The common way in octoprint ist using REST. Octoprint itself do the same. Attached is my small pluging which switches my chamber led stripe with using the common mqtt plugin after the messages are back in python.OctoPrint-Chamberlight.zip (10,3 KB)