I was hoping plugin "Custom Control Editor" would be what I was looking for But it did not work the way I thought it would. Instead I have found "System Command Editor", that does what I need partially.
So I am looking for a way to put a button on the control tab to execute a system command. I have that working in the "System" drop down menu but that's an inconvenient location for my needs. Is there some way to either have a copy of my customized "System" commands on the control tab or can I add a button to the control tab somehow manual ?
In the config.yaml the System Buttons show up ad follows:
system:
actions:
- action: Turn on the LED Light
command: /usr/bin/wget -q -O /dev/null http://A.B.C.D/set.cmd?user=user+pass=pass+cmd=setpower+p61=1
name: LED On
- action: Turn off the LED light
command: /usr/bin/wget -q -O /dev/null http://A.B.C.D/set.cmd?user=user+pass=pass+cmd=setpower+p61=0
name: LED Off
So I would like to add the buttons "LED On" and "LED Off" with the system command called to the control tab. This is controlling a simple Network controlled power switch to switch the LED flood light above the printer on and off.
I know that the System pull-down menu at the top is what foosel would probably suggest but I like to put my buttons on the Control tab and then to style them so that they're on the same line.
I use the Gcode System Commands plugin to first create a pair of pseudo Gcode commands for things like you're doing above. For example, I might issue 900 and 901 to turn OFF/ON something.
Next, I'll manually edit the ~/.octoprint/config.yaml file's controls section using those new OCTO900 and OCTO901 commands, as created.
Finally, I'll use the Themeify plugin so that the buttons style as inline blocks. See form.custom_control in this thread.
That's just perfect, the OCTO codes work like a charme !! Got me what I wanted for now. I have not yet looked into the Themeify plugin to customise the buttons but I have them in the Control tab now.