#21 Add PowerOFF when print is finished
This commit is contained in:
@ -7,8 +7,8 @@ $(function() {
|
||||
self.printer = parameters[2];
|
||||
|
||||
self.onOffButtonEnabled = ko.observable();
|
||||
self.showShutdownOctopiOption = ko.observable();
|
||||
self.showPowerOffPrintFinishOption = ko.observable();
|
||||
//self.showShutdownOctopiOption = ko.observable();
|
||||
//self.showPowerOffPrintFinishOption = ko.observable();
|
||||
self.mystromswitchPowerValue = document.getElementById("mystromswitchPowerValue")
|
||||
self.mystromswitchEnergyValue = document.getElementById("mystromswitchEnergyValue")
|
||||
|
||||
@ -30,7 +30,7 @@ $(function() {
|
||||
|
||||
//self.onOffButtonEnabled.subscribe(self.onmystromswitchEvent, self);
|
||||
|
||||
/*self.onAutomaticShutdownEnabledChanged = function(){
|
||||
self.onAutomaticShutdownEnabledChanged = function(){
|
||||
var cmd = "disableShutdownAfterFinish";
|
||||
if (self.automaticShutdownEnabled()) {
|
||||
var cmd = "enableShutdownAfterFinish";
|
||||
@ -60,7 +60,7 @@ $(function() {
|
||||
}),
|
||||
contentType: "application/json; charset=UTF-8"
|
||||
})
|
||||
}*/
|
||||
}
|
||||
|
||||
//self.automaticShutdownEnabled.subscribe(self.onAutomaticShutdownEnabledChanged,self);
|
||||
//self.automaticPowerOffEnabled.subscribe(self.onAutomaticPowerOffEnabledChanged,self);
|
||||
@ -70,8 +70,8 @@ $(function() {
|
||||
return;
|
||||
}
|
||||
self.onOffButtonEnabled(data.onOffButtonEnabled);
|
||||
self.showShutdownOctopiOption(data.showShutdownOctopiOption);
|
||||
self.showPowerOffPrintFinishOption(data.showPowerOffPrintFinishOption);
|
||||
//self.showShutdownOctopiOption(data.showShutdownOctopiOption);
|
||||
//self.showPowerOffPrintFinishOption(data.showPowerOffPrintFinishOption);
|
||||
self.mystromswitchEnergyValue.innerHTML = "Energy: "+data.energy.toFixed(1)+"Wh"
|
||||
if(data.relay == false){
|
||||
self.mystromswitchPowerValue.innerHTML = "Relay is off";
|
||||
|
@ -1,7 +1,7 @@
|
||||
<form class="form-horizontal">
|
||||
<h4>General</h4>
|
||||
<div class="control-group">
|
||||
<label class="control-label">{{ _('URL or IP-Address of your switch') }}</label>
|
||||
<label class="control-label">{{ _('URL or IP-Address of your switch (without http)') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: settings.plugins.mystromswitch.ip">
|
||||
</div>
|
||||
|
@ -3,12 +3,12 @@
|
||||
<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">
|
||||
<input type="checkbox" data-bind="enable: loginState.isUser(), checked: automaticShutdownEnabled">
|
||||
{{ _('Shutdown Octoprint after print finishes') }}
|
||||
</label>
|
||||
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="enable: loginState.isUser(), checked: automaticPowerOffEnabled, visible: showPowerOffPrintFinishOption">
|
||||
<input type="checkbox" data-bind="enable: loginState.isUser(), checked: automaticPowerOffEnabled">
|
||||
{{ _('Power Off Relais after print finishes') }}
|
||||
</label>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user