Update enclosure_settings.jinja2
Unlimited GPIO Outputs Unlimited Trigggger actions based on events (Temeprature, fillament or GPIO) Showing status of GPIO on enclosure tab Shutdown timeout reset after print start Default temperature for enclosure
This commit is contained in:
committed by
GitHub
parent
bd542a1d08
commit
ce67478609
@@ -1,397 +1,409 @@
|
||||
<form class="form-horizontal" id="enclosure_settings_temperature">
|
||||
<h4>{{ _('Temperature Sensor') }}</h4>
|
||||
<h4>{{ _('Temperature Sensor') }}</h4>
|
||||
<div data-bind="foreach: global_settings.settings.plugins.enclosure.temperature_reading">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input id="enableTemperatureReading" type="checkbox" onclick="fixUI()" data-bind="checked: settings.plugins.enclosure.temperatureReadingEnable"> {{ _('Temperature Reading') }}
|
||||
<input id="enableTemperatureReading" type="checkbox"
|
||||
data-bind="checked: isEnabled, click: $parent.fixUI()"> {{ _('Enable Temperature Reading') }}
|
||||
</label>
|
||||
</div>
|
||||
<div id="temperature_reading_content">
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="settings-enclosure-dhtPin">{{ _('Sensor Pin') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: settings.plugins.enclosure.dhtPin">
|
||||
<span class="help-inline">GPIO pin for temperature sensor, recommended to use 4 as DS18B20 only works on pin 4</span>
|
||||
</div>
|
||||
<label class="control-label" for="settings-enclosure-dhtModel">{{ _('Sensor Type') }}</label>
|
||||
<div class="controls">
|
||||
<select data-bind="value: sensorType">
|
||||
<option value="">Select Sensor</option>
|
||||
<option value="11">DHT11</option>
|
||||
<option value="22">DHT22</option>
|
||||
<option value="2303">AM2302</option>
|
||||
<option value="18b20">DS18B20</option>
|
||||
</select>
|
||||
<span class="help-inline"> <span class="label label-important">Attention</span> You need to install and configure the necessary
|
||||
libraries for the temeprature sensor, check the documentation on <a href="github.com/vitormhenrique/OctoPrint-Enclosure">github</a> page</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ko if: ($data.sensorType() == "18b20") -->
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="settings-enclosure-dhtPin">{{ _('Sensor Pin') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: gpioPin" value="4" disabled="true">
|
||||
<span class="help-inline">GPIO pin for temperature sensor, recommended to use 4 as DS18B20 only works on pin 4</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
<!-- ko ifnot: ($data.sensorType() == "18b20") -->
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="settings-enclosure-dhtPin">{{ _('Sensor Pin') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: gpioPin">
|
||||
<span class="help-inline">GPIO pin for temperature sensor, recommended to use 4 as DS18B20 only works on pin 4</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: useFahrenheit"> {{ _('Use Fahrenheit Unit') }}
|
||||
</label>
|
||||
<span class="help-inline">Choose if you want to work with Celsius or Fahrenheit</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<form class="form-horizontal">
|
||||
<h4>{{ _('Temperature Control') }}</h4>
|
||||
<div data-bind="foreach: global_settings.settings.plugins.enclosure.temperature_control">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input id="enableHeater" type="checkbox" data-bind="checked: isEnabled, click: $parent.fixUI()"> {{ _('Enable Temperature Control') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div id="temperature_control_content">
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="settings-enclosure-heaterpin">{{ _('Temp Control Pin') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: gpioPin">
|
||||
<span class="help-inline">GPIO pin used to control Heater. You can not use GPIO 4 here</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="settings-enclosure-dhtModel">{{ _('Sensor Type') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: settings.plugins.enclosure.dhtModel">
|
||||
<span class="help-inline">Available options are: 11 for DHT11; 22 for DHT22; 2302 for AM2302; 1820 for DS18B20 1-wire temperature sensor</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="settings-enclosure-getTempScript">{{ _('Get Temperature Script') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: settings.plugins.enclosure.getTempScript">
|
||||
<span class="help-inline">Location of script that reads temperature</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="settings-enclosure-getHumiScript">{{ _('Get Humidity Script') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: settings.plugins.enclosure.getHumiScript">
|
||||
<span class="help-inline">Location of script that reads humidity</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: settings.plugins.enclosure.useFahrenheit"> {{ _('Use Fahrenheit Unit') }}
|
||||
<input type="checkbox" data-bind="checked: activeLow"> {{ _('Active Low') }}
|
||||
</label>
|
||||
<span class="help-inline">Choose if you want to work with Celsius or Fahrenheit</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<h4>{{ _('Heater') }}</h4>
|
||||
<form class="form-horizontal">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input id="enableHeater" onclick="fixUI()" type="checkbox" data-bind="checked: settings.plugins.enclosure.heaterEnable"> {{ _('Enable Heater') }}
|
||||
</label>
|
||||
<span class="help-inline">Active low means that the heater will turn on when receive a low signal (ground) from Raspbery PI</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="heater_content">
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="settings-enclosure-heaterpin">{{ _('Heater Pin') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: settings.plugins.enclosure.heaterPin">
|
||||
<span class="help-inline">GPIO pin used to control Heater. You can not use GPIO 4 here</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<div class="control-group">
|
||||
<label class="control-label">{{ _('Temp Control Type') }}</label>
|
||||
<div class="controls">
|
||||
<label class="radio"><input type="radio" value="heater" name="optradio" data-bind="checked: controlType"> {{ _('Heater') }}</label>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<label class="radio"><input type="radio" value="cooler" name="optradio" data-bind="checked: controlType"> {{ _('Cooler') }}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: settings.plugins.enclosure.heaterActiveLow"> {{ _('Heater Active Low') }}
|
||||
<input type="checkbox" data-bind="checked: autoStartup"> {{ _('Auto Startup') }}
|
||||
</label>
|
||||
<span class="help-inline">Active low means that the heater will turn on when receive a low signal (groud) from Raspbery PI</span>
|
||||
<span class="help-inline">Choose if you want to automatically startup temperature control when the print starts</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">{{ _('Default Temperature') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: defaultTemp">
|
||||
<span class="help-inline">Default temperature that temperature control will be set</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<h4>{{ _('IO 1') }}</h4>
|
||||
<h4>{{ _('Raspberry Pi Outputs') }}</h4>
|
||||
<form class="form-horizontal">
|
||||
<div data-bind="foreach: global_settings.settings.plugins.enclosure.rpi_outputs">
|
||||
<!-- <div class="controls">
|
||||
<h5>IO <span data-bind="text: $index"> </span></h5>
|
||||
</div> -->
|
||||
<div class="control-group">
|
||||
<label class="control-label">{{ _('IO Label') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: label">
|
||||
<span class="help-inline">Name displayed on Enclosure Tab</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="settings-enclosure-io1">{{ _('IO 1 Number') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: gpioPin">
|
||||
<span class="help-inline">GPIO number that will be controlled. You can not use GPIO 4 here</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: activeLow"> {{ _('Active Low') }}
|
||||
</label>
|
||||
<span class="help-inline">Active low means that the GPIO will turn on when receive a low signal (ground) from Raspbery PI</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: autoStartup, click: $parent.fixAutoStartupUI($index()),
|
||||
attr: {id: 'autoStartup_' + $index() }"> {{ _('Auto Startup') }}
|
||||
</label>
|
||||
<span class="help-inline">Choose if GPIO should turn on automatomatically when print starts</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: none" data-bind="attr: {id: 'autoStartupField_' + $index() }">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input id="io1_enabled" onclick="fixUI()" type="checkbox" data-bind="checked: settings.plugins.enclosure.io1Enable"> {{ _('Enable IO 1') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group" id="io1_content">
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="settings-enclosure-io1">{{ _('IO 1 Label') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: settings.plugins.enclosure.io1Label">
|
||||
<span class="help-inline">Name displayed on Enclosure Tab</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="settings-enclosure-io1">{{ _('IO 1 Number') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: settings.plugins.enclosure.io1Pin">
|
||||
<span class="help-inline">GPIO number that will be controlled. You can not use GPIO 4 here</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: settings.plugins.enclosure.io1ActiveLow"> {{ _('Active Low') }}
|
||||
</label>
|
||||
<span class="help-inline">Active low means that the GPIO will turn on when receive a low signal (groud) from Raspbery PI</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: settings.plugins.enclosure.io1AutoStartup"> {{ _('Auto Startup') }}
|
||||
</label>
|
||||
<span class="help-inline">Choose if GPIO should turn on automatomatically when print starts</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="settings-enclosure-io1">{{ _('Startup Delay (Seconds)') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: settings.plugins.enclosure.io1TimeDelay">
|
||||
<span class="help-inline">Time delay to turn on GPIO when print starts</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: settings.plugins.enclosure.io1AutoShutDown"> {{ _('Auto Shutdown') }}
|
||||
</label>
|
||||
<span class="help-inline">Choose if GPIO should turn off automatomatically when print finishes</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="settings-enclosure-io1">{{ _('Shutdown Delay (Seconds)') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: settings.plugins.enclosure.io1OffTimeDelay">
|
||||
<span class="help-inline">Time delay to turn off GPIO when print finishes</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<h4>{{ _('IO 2') }}</h4>
|
||||
<form class="form-horizontal">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input id="io2_enabled" onclick="fixUI()" type="checkbox" data-bind="checked: settings.plugins.enclosure.io2Enable"> {{ _('Enable IO 2') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group" id="io2_content">
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="settings-enclosure-io2">{{ _('IO 2 Label') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: settings.plugins.enclosure.io2Label">
|
||||
<span class="help-inline">Name displayed on Enclosure Tab</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="settings-enclosure-io2">{{ _('IO 2 Number') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: settings.plugins.enclosure.io2Pin">
|
||||
<span class="help-inline">GPIO number that will be controlled. You can not use GPIO 4 here</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: settings.plugins.enclosure.io2ActiveLow"> {{ _('Active Low') }}
|
||||
</label>
|
||||
<span class="help-inline">Active low means that the GPIO will turn on when receive a low signal (groud) from Raspbery PI</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: settings.plugins.enclosure.io2AutoStartup"> {{ _('Auto Startup') }}
|
||||
</label>
|
||||
<span class="help-inline">Choose if GPIO should turn on automatomatically when print starts</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="settings-enclosure-io2">{{ _('Startup Delay (Seconds)') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: settings.plugins.enclosure.io2TimeDelay">
|
||||
<span class="help-inline">Time delay to turn on GPIO when print starts</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: settings.plugins.enclosure.io2AutoShutDown"> {{ _('Auto Shutdown') }}
|
||||
</label>
|
||||
<span class="help-inline">Choose if GPIO should turn off automatomatically when print finishes</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="settings-enclosure-io2">{{ _('Shutdown Delay (Seconds)') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: settings.plugins.enclosure.io2OffTimeDelay">
|
||||
<span class="help-inline">Time delay to turn off GPIO when print finishes</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<h4>{{ _('IO 3') }}</h4>
|
||||
<form class="form-horizontal">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input id="io3_enabled" onclick="fixUI()" type="checkbox" data-bind="checked: settings.plugins.enclosure.io3Enable"> {{ _('Enable IO 3') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group" id="io3_content">
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="settings-enclosure-io3">{{ _('IO 3 Label') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: settings.plugins.enclosure.io3Label">
|
||||
<span class="help-inline">Name displayed on Enclosure Tab</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="settings-enclosure-io3">{{ _('IO 3 Number') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: settings.plugins.enclosure.io3Pin">
|
||||
<span class="help-inline">GPIO number that will be controlled. You can not use GPIO 4 here</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: settings.plugins.enclosure.io3ActiveLow"> {{ _('Active Low') }}
|
||||
</label>
|
||||
<span class="help-inline">Active low means that the GPIO will turn on when receive a low signal (groud) from Raspbery PI</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: settings.plugins.enclosure.io3AutoStartup"> {{ _('Auto Startup') }}
|
||||
</label>
|
||||
<span class="help-inline">Choose if GPIO should turn on automatomatically when print starts</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="settings-enclosure-io3">{{ _('Startup Delay (Seconds)') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: settings.plugins.enclosure.io3TimeDelay">
|
||||
<span class="help-inline">Time delay to turn on GPIO when print starts</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: settings.plugins.enclosure.io3AutoShutDown"> {{ _('Auto Shutdown') }}
|
||||
</label>
|
||||
<span class="help-inline">Choose if GPIO should turn off automatomatically when print finishes</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="settings-enclosure-io3">{{ _('Shutdown Delay (Seconds)') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: settings.plugins.enclosure.io3OffTimeDelay">
|
||||
<span class="help-inline">Time delay to turn off GPIO when print finishes</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<h4>{{ _('IO 4') }}</h4>
|
||||
<form class="form-horizontal">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input id="io4_enabled" onclick="fixUI()" type="checkbox" data-bind="checked: settings.plugins.enclosure.io4Enable"> {{ _('Enable IO 4') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group" id="io4_content">
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="settings-enclosure-io4">{{ _('IO 4 Label') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: settings.plugins.enclosure.io4Label">
|
||||
<span class="help-inline">Name displayed on Enclosure Tab</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="settings-enclosure-io4">{{ _('IO 4 Number') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: settings.plugins.enclosure.io4Pin">
|
||||
<span class="help-inline">GPIO number that will be controlled. You can not use GPIO 4 here</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: settings.plugins.enclosure.io4ActiveLow"> {{ _('Active Low') }}
|
||||
</label>
|
||||
<span class="help-inline">Active low means that the GPIO will turn on when receive a low signal (groud) from Raspbery PI</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: settings.plugins.enclosure.io4AutoStartup"> {{ _('Auto Startup') }}
|
||||
</label>
|
||||
<span class="help-inline">Choose if GPIO should turn on automatomatically when print starts</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="settings-enclosure-io4">{{ _('Startup Delay (Seconds)') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: settings.plugins.enclosure.io4TimeDelay">
|
||||
<span class="help-inline">Time delay to turn on GPIO when print starts</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: settings.plugins.enclosure.io4AutoShutDown"> {{ _('Auto Shutdown') }}
|
||||
</label>
|
||||
<span class="help-inline">Choose if GPIO should turn off automatomatically when print finishes</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="settings-enclosure-io4">{{ _('Shutdown Delay (Seconds)') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: settings.plugins.enclosure.io4OffTimeDelay">
|
||||
<span class="help-inline">Time delay to turn off GPIO when print finishes</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<h4>{{ _('Filament Sensor') }}</h4>
|
||||
<form class="form-horizontal">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input id="filament_sensor_enable" onclick="fixUI()" type="checkbox" data-bind="checked: settings.plugins.enclosure.filamentSensorEnable"> {{ _('Enable Filament Sensor') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div id="filament_sensor_content">
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="settings-enclosure-filament-sensor">{{ _('Sensor Pin') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: settings.plugins.enclosure.filamentSensorPin">
|
||||
<span class="help-inline">GPIO number that will be used to sense end of filament. You can not use GPIO 4 here</span>
|
||||
</div>
|
||||
</div>
|
||||
<label class="control-label">{{ _('Startup Delay (Seconds)') }}</label>
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: settings.plugins.enclosure.filamentSensorActiveLow"> {{ _('Active Low') }}
|
||||
</label>
|
||||
<span class="help-inline">Active low means that end of the filament was detected when receive a low signal (groud) from filament sensor</span>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="settings-enclosure-filament-sensor">{{ _('Filament Change Gcode') }}</label>
|
||||
<div class="controls">
|
||||
<textarea rows="4" class="block" data-bind="value: settings.plugins.enclosure.filamentSensorGcode"></textarea>
|
||||
<span class="help-inline">GCODE that will be sent to the printer to pause and allow filament to be changed.
|
||||
You should add <code>;</code> on the end of every line sent to the printer</span>
|
||||
</div>
|
||||
<input type="text" class="input-block-level" data-bind="value: startupTimeDelay">
|
||||
<span class="help-inline">Time delay to turn on GPIO when print starts</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<a class="accordion-toggle collapsed" data-toggle="collapse" data-target="#advanced_enclosure">
|
||||
<h4>{{ _('Advanced') }}</h4>
|
||||
</a>
|
||||
|
||||
<div id="advanced_enclosure" class="accordion-body collapse">
|
||||
<form class="form-horizontal">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: settings.plugins.enclosure.debug"> {{ _('Enable debug info') }}
|
||||
</label>
|
||||
<span class="help-inline">Log adcitional information on octoprint log to help trouble shoot the plugin</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: settings.plugins.enclosure.useBoardPinNumber"> {{ _('Use Board Pin #') }}
|
||||
</label>
|
||||
<span class="help-inline">Use BOARD pin numbers instead of BCM pin numbers</span>
|
||||
</div>
|
||||
</div>
|
||||
<label class="control-label" for="settings-enclosure-io1">{{ _('Filament Detection Timeout') }}</label>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: autoShutdown, click: $parent.fixAutoShutdownUI($index()), attr: {id: 'autoShutdown_' + $index() }"> {{ _('Auto Shutdown') }}
|
||||
</label>
|
||||
<span class="help-inline">Choose if GPIO should turn off automatomatically when print finishes</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: none" data-bind="attr: {id: 'autoShutdownField_' + $index() }">
|
||||
<div class="control-group">
|
||||
<label class="control-label">{{ _('Shutdown Delay (Seconds)') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: settings.plugins.enclosure.filamentSensorTimeout">
|
||||
<span class="help-inline">Time that filament sensor will be inactive after sensing end of filament. This is to avoid sending multiple M600
|
||||
commands to the printer.</span>
|
||||
<input type="text" class="input-block-level" data-bind="value: shutdownTimeDelay">
|
||||
<span class="help-inline">Time delay to turn off GPIO when print finishes</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<a title="Delete IO" class="btn btn-danger pull-right" data-bind="click: function() { $parent.removeRpiOutput($data) }"><i class="icon-trash"></i></a>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<hr/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<button class="btn pull-right" data-bind="click: function() { $root.addRpiOutput(); }">Add Outputs...</button>
|
||||
</div>
|
||||
</form>
|
||||
<h4>{{ _('Raspberry Pi Inputs') }}</h4>
|
||||
<form class="form-horizontal">
|
||||
<!-- <div class="control-group">
|
||||
<div class="controls">
|
||||
<span class="help-inline"> <span class="label label-important">Attention</span>
|
||||
Here you will configure input GPIO that will be used to trigger events.</span>
|
||||
</div>
|
||||
</div> -->
|
||||
<div data-bind="foreach: global_settings.settings.plugins.enclosure.rpi_inputs">
|
||||
<!-- <div class="controls">
|
||||
<h5>IO <span data-bind="text: $index"> </span></h5>
|
||||
</div> -->
|
||||
<div class="control-group">
|
||||
<label class="control-label">{{ _('IO Label') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: label">
|
||||
<span class="help-inline">Name of Input</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ko if: $data.eventType-->
|
||||
<div class="control-group">
|
||||
<label class="control-label">{{ _('Event Type') }}</label>
|
||||
<div class="controls">
|
||||
<label class="radio">
|
||||
<!-- <input type="radio" value="temperature" data-bind="checked: eventType, click: $parent.eventTypeUI( $index(),'temperature'),
|
||||
attr: {name: 'eventType_' + $index() }"> {{ _('Temperature') }} -->
|
||||
<input type="radio" value="temperature" data-bind="checked: eventType, attr: {name: 'eventType_' + $index() }"> {{ _('Temperature') }}
|
||||
<span class="help-inline">Events will run actions when a certain temperature of the sensor is hit.
|
||||
You can control a OUTPUT pin and set that to a LOW or HIGH value when that happens.
|
||||
You can use this as a safety measure and trigger alarm lights for example. <span class="label label-important">Warning</span>
|
||||
You should always have proper smoke detector on your house. DO NOT use this as your only safety device.</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<label class="radio">
|
||||
<!-- <input type="radio" value="filament" data-bind="checked: eventType, click: $parent.eventTypeUI($index(),'filament'),
|
||||
attr: {name: 'eventType_' + $index() }"> {{ _('Filament Sensor') }} -->
|
||||
<input type="radio" value="printer" data-bind="checked: eventType, attr: {name: 'eventType_' + $index() }"> {{ _('Printer') }}
|
||||
<span class="help-inline">Events will run PRINTER actions when a condition is met, that can be a filament sensor, button, etc.
|
||||
Actions can be Pause \ Resume a printer job, or change the filament. You can use the "change filament" action and set up the input
|
||||
GPIO acording to your sensor, for example, if your filament sensor conects to ground when detects the end of the filament,
|
||||
you should choose PULL UP resistors and detect the event on the falling edge.</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<label class="radio">
|
||||
<!-- <input type="radio" value="gpio" data-bind="checked: eventType, click: $parent.eventTypeUI($index(),'gpio'),
|
||||
attr: {name: 'eventType_' + $index() }"> {{ _('GPIO Control') }} -->
|
||||
<input type="radio" value="gpio" data-bind="checked: eventType, attr: {name: 'eventType_' + $index() }"> {{ _('GPIO Control') }}
|
||||
<span class="help-inline">Events will control GPIO outputs when a condition is met, for example detect a press of a button.
|
||||
You can use this to control any previous configured OUTPUTS, basically beeing able to control your lights / fan / pritner
|
||||
using mechanical buttons buttons instead of the octoprint interface.
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ko if: ($data.eventType() == "printer" || $data.eventType() == "gpio") -->
|
||||
<div data-bind="attr: {id: 'input_io_' + $index() }">
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="settings-enclosure-io1">{{ _('Input IO Number') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: gpioPin">
|
||||
<span class="help-inline">Input GPIO that will detect the event that should trigger the action. For example if you have a filament
|
||||
sensor you put the GPIO pin that the sensor is connected. This can also be a press of a button or any other signal that you want to detect.
|
||||
You can not use GPIO 4 here if you are using temeprature sensor DS18B20</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">Input Pull Resistor</label>
|
||||
<div class="controls">
|
||||
<select data-bind="value: inputPull">
|
||||
<option value="inputPullUp">Input Pullup</option>
|
||||
<option value="inputPullDown">Input Pulldown</option>
|
||||
</select>
|
||||
<span class="help-inline">Choose what type of pull resistors that you want on the output. If you signal is active low,
|
||||
that means it should run the action when receive a low signal (ground), you should choose PULL UP resistors.</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
<!-- ko if: ($data.eventType() == "gpio") -->
|
||||
<div data-bind="attr: {id: 'gpio_controlled_' + $index() }">
|
||||
<div class="control-group">
|
||||
<label class="control-label">Event Trigger</label>
|
||||
<div class="controls">
|
||||
<select >
|
||||
<option value="hise">Hise</option>
|
||||
<option value="fall">Fall</option>
|
||||
</select>
|
||||
<span class="help-inline">Do you want thrigger the event on the rise or falling edge? If you signal is active low,
|
||||
that means it should run the action when receive a low signal (ground), you should choose FALLING EDGE.</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label"> Controlled IO</label>
|
||||
<div class="controls">
|
||||
<select data-bind="options: $root.global_settings.settings.plugins.enclosure.rpi_outputs, optionsText: 'label',
|
||||
optionsValue: 'gpioPin', value: $data.controlledIO">
|
||||
</select>
|
||||
<span class="help-inline">When the event happen, you want control which IO?</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">Set Controlled IO Value</label>
|
||||
<div class="controls">
|
||||
<select data-bind="value: setControlledIO">
|
||||
<option value="low">Low</option>
|
||||
<option value="high">High</option>
|
||||
</select>
|
||||
<span class="help-inline">When the event happen, you want to turn the controlled IO HIGH or LOW?</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
<!-- ko if: ($data.eventType() == "temperature") -->
|
||||
<div data-bind="attr: {id: 'temp_controlled_' + $index() }">
|
||||
<div class="control-group">
|
||||
<label class="control-label">{{ _('Set Temperature') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: setTemp">
|
||||
<span class="help-inline">Set temperature that will trigger the event</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label"> Controlled IO</label>
|
||||
<div class="controls">
|
||||
<select data-bind="options: $root.global_settings.settings.plugins.enclosure.rpi_outputs, optionsText: 'label',
|
||||
optionsValue: 'gpioPin', value: $data.controlledIO">
|
||||
</select>
|
||||
<span class="help-inline">When the event happen, you want control which IO?</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">Set Controlled IO Value</label>
|
||||
<div class="controls">
|
||||
<select data-bind="value: setControlledIO">
|
||||
<option value="low">Low</option>
|
||||
<option value="high">High</option>
|
||||
</select>
|
||||
<span class="help-inline">When the event happen, you want to turn the controlled IO HIGH or LOW?</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
<!-- ko if: ($data.eventType() == "printer") -->
|
||||
<div class="control-group" data-bind="attr: {id: 'filament_controlled_' + $index() }">
|
||||
<div class="control-group">
|
||||
<label class="control-label">Event Trigger</label>
|
||||
<div class="controls">
|
||||
<select >
|
||||
<option value="hise">Hise</option>
|
||||
<option value="fall">Fall</option>
|
||||
</select>
|
||||
<span class="help-inline">Do you want thrigger the event on the rise or falling edge? If you signal is active low,
|
||||
that means it should run the action when receive a low signal (ground), you should choose FALLING EDGE.</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">{{ _('Printer Action') }}</label>
|
||||
<div class="controls">
|
||||
<select data-bind="value: printerAction">
|
||||
<option value="filament">Filament Change</option>
|
||||
<option value="resume">Printer Resume</option>
|
||||
<option value="pause">Printer Pause</option>
|
||||
</select>
|
||||
<span class="help-inline"> You can use filament change on your filament detectors and add buttons to resume and pause the print job.</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
<!-- /ko -->
|
||||
<div class="control-group">
|
||||
<a title="Delete IO" class="btn btn-danger pull-right" data-bind="click: function() { $parent.removeRpiInput($data) }"><i class="icon-trash"></i></a>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<hr/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<button class="btn pull-right" data-bind="click: function() { $root.addRpiInput(); }">Add Inputs...</button>
|
||||
</div>
|
||||
</form>
|
||||
<a href="#" class="muted" data-toggle="collapse" data-target="#advanced_enclosure">
|
||||
<i class="icon-caret-right"></i>
|
||||
Advanced options
|
||||
</a>
|
||||
<div id="advanced_enclosure" class="accordion-body collapse">
|
||||
<form class="form-horizontal">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: global_settings.settings.plugins.enclosure.debug"> {{ _('Enable debug info') }}
|
||||
</label>
|
||||
<span class="help-inline">Log adcitional information on octoprint log to help trouble shoot the plugin</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: global_settings.settings.plugins.enclosure.useBoardPinNumber"> {{ _('Use Board Pin #') }}
|
||||
</label>
|
||||
<span class="help-inline">Use BOARD pin numbers instead of BCM pin numbers</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<button class="btn" data-bind="click: function() { $root.clearGPIOMode(); }">Clear GPIO Mode</button>
|
||||
<span class="help-inline">This will clear any GPIO configuration that might exist on your system, use with caution,
|
||||
it might break other plugins that use GPIO</span>
|
||||
</div>
|
||||
</div>
|
||||
<label class="control-label" >{{ _('Filament Detection Timeout') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: global_settings.settings.plugins.enclosure.filamentSensorTimeout">
|
||||
<span class="help-inline">Time that filament sensor will be inactive after sensing end of filament. This is to avoid sending multiple M600
|
||||
commands to the printer.</span>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="settings-enclosure-filament-sensor">{{ _('Filament Change Gcode') }}</label>
|
||||
<div class="controls">
|
||||
<textarea rows="4" class="block" data-bind="value: global_settings.settings.plugins.enclosure.filamentSensorGcode"></textarea>
|
||||
<span class="help-inline">GCODE that will be sent to the printer to pause and allow filament to be changed.
|
||||
You should add <code>;</code> on the end of every line sent to the printer</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user