Hi guys,
I'm a completely new user with OctoPrint. I like to implement an addition function. I like to switch on/off the light with a button at Control Page, see attached picture. So I inserted the
following lines at control.jinja2:
<button class="btn btn-block control-box" data-bind="enable: isOperational(), click: function() { $root.sendCustomCommand({type:'command',command:'M106 S255'}) }">{{ _('Light on') }}</button>
<button class="btn btn-block control-box" data-bind="enable: isOperational(), click: function() { $root.sendCustomCommand({type:'command',command:'M106 S0'}) }">{{ _('Light off') }}</button>
Now I have to change the command. I need something like:
/usr/local/bin/gpio -g write 18 1
/usr/local/bin/gpio -g write 18 0
I'm not familiar enough with programming to know how the command has to looks like. Can someone helps me, please?