You may be able to work around this, by some kind of magic work with the 'gcode system commands' plugin:
However this will still not do what you want with the sliders.
Your best bet to get something this custom, would be to write your own plugin that injected the code. I appreciate this is quite a lot more complicated, but there is only so far custom controls can go.
The GCODE System Commands does not support variables, at least ot my knowledge, therefore it indeed can't do what I want.
I tried using a simple static command to change the brightness, but that did not work either and at this point I dont know what am I doing wrong using these:
- children:
- command: OCTO911
confirm: null
enabled: true
name: Test Command 1
layout: vertical
name: Camera Control 1
EDIT: Actually scratch the part about it not working, it works only when the printer is connected even though the command is in theory not meant for the printer.
When I connect the printer, it works as expected.
Yep, the commands can only be sent if there is a printer connected. You might be able to create say 5 buttons, 0%, 25%, 50%, 75%, 100%, etc. to work around this. Not exactly what you were hoping for, but maybe it will get close.
The idea was to have something less complex than what /webcam/control.htm offers, but placed on the "Controls" page. Bonus of that would be that I could also import these controls into OctoRemote.
Instead I'll most probably just create two presets, one for daytime and one for nighttime.
Yeah, to be able to do it without a printer connected I think you would have to create a custom plugin and utilize simplApiPlugin mixin. Here's an example of sliders for custom controls.
right, but with the proper tweaks it would be possible I think to use the same sliders with javascript commands instead of gcode commands and a single file simpleApiPlugin mixin implementation. Can't remember if JavaScript buttons are locked while not connected or not. Then you would use the command OctoPrint.SimpleApiCommand("pluginid","command", {parameter: get_value_from_parameter}). Would have to double check that javascript commands would support the parameters though. It might even be possible to wrap the whole thing in a plugin using a settings_overlay in the single file plugin. Would be a good challenge for @Charlie_Powell.