#21 Add PowerOFF when print is finished

neue Einstellmöglichkeiten anzeigen
This commit is contained in:
David Zingg
2020-02-29 16:08:03 +01:00
parent c31d7b7bca
commit 3d7cb06446
6 changed files with 373 additions and 15 deletions

View File

@ -61,4 +61,35 @@
<span class="help-block"><small>{{ _('Delay in seconds after octoprint is shutted down to switch off relays. This settings is recommended to make sure that Raspberry Pi is completely shutted down when you switch power off. Switching off when your Raspberry Pi is running could lead to unrepairable damage to your SD Card!') }}</small></span>
</div>
</div>
<h4>Automatic Power Off Features</h4>
<div class="control-group">
<div class="controls">
<label class="checkbox">
<input type="checkbox" data-bind="checked: settings.plugins.mystromswitch.showShutdownOctopiOption">Show option to automatic shutdown Octoprint after Print is finished
</label>
<span class="help-block"><small>{{ _('This setting shows the option to shut Octoprint down and switch your mySwitch off after your Print is finished.') }}</small></span>
</div>
</div>
<div class="control-group">
<div class="controls">
<label class="checkbox">
<input type="checkbox" data-bind="checked: settings.plugins.mystromswitch.showPowerOffPrintFinishOption">Show option to turn off Relais after Print is finished
</label>
<span class="help-block"><small>{{ _('This setting shows the option to switch your mySwitch off after your Print is finished') }}</small></span>
</div>
</div>
<div class="control-group">
<label class="control-label">{{ _('Delay after print is finished') }}</label>
<div class="controls">
<div class="input-append">
<input type="number" class="input-block-level" data-bind="value: settings.plugins.mystromswitch.shutdownDelay">
<span class="add-on">seconds</span>
</div>
<span class="help-block"><small>{{ _('Delay in seconds after after print is finished') }}</small></span>
</div>
</div>
</form>

View File

@ -2,4 +2,13 @@
<label class="control-label" id="mystromswitchPowerValue">Powerconsumption 0.0W</label>
<label class="control-label" id="mystromswitchEnergyValue">Energy 0.0Wh</label>
<button class="btn btn-primary" data-bind="click: onToggleRelayEvent, visible : onOffButtonEnabled">{{ _('Toggle Relais') }}</button>
<label class="checkbox">
<input type="checkbox" data-bind="enable: loginState.isUser(), checked: automaticShutdownEnabled, visible:showShutdownOctopiOption">
{{ _('Shutdown Octoprint after print finishes') }}
</label>
<label class="checkbox">
<input type="checkbox" data-bind="enable: loginState.isUser(), checked: automaticPowerOffEnabled, visible:showPowerOffPrintFinishOption">
{{ _('Power Off Relais after print finishes') }}
</label>
</div>