#21 Add PowerOFF when print is finished

This commit is contained in:
David Zingg 2020-02-29 16:55:20 +01:00
parent 1c3c49bab9
commit 531d795615

View File

@ -7,8 +7,8 @@ $(function() {
self.printer = parameters[2]; self.printer = parameters[2];
self.onOffButtonEnabled = ko.observable(); self.onOffButtonEnabled = ko.observable();
//self.showShutdownOctopiOption = ko.observable(); self.showShutdownOctopiOption = ko.observable();
//self.showPowerOffPrintFinishOption = ko.observable(); self.showPowerOffPrintFinishOption = ko.observable();
self.mystromswitchPowerValue = document.getElementById("mystromswitchPowerValue") self.mystromswitchPowerValue = document.getElementById("mystromswitchPowerValue")
self.mystromswitchEnergyValue = document.getElementById("mystromswitchEnergyValue") self.mystromswitchEnergyValue = document.getElementById("mystromswitchEnergyValue")
@ -62,8 +62,8 @@ $(function() {
}) })
} }
//self.automaticShutdownEnabled.subscribe(self.onAutomaticShutdownEnabledChanged,self); self.automaticShutdownEnabled.subscribe(self.onAutomaticShutdownEnabledChanged,self);
//self.automaticPowerOffEnabled.subscribe(self.onAutomaticPowerOffEnabledChanged,self); self.automaticPowerOffEnabled.subscribe(self.onAutomaticPowerOffEnabledChanged,self);
self.onDataUpdaterPluginMessage = function(plugin, data) { self.onDataUpdaterPluginMessage = function(plugin, data) {
if (plugin != "mystromswitch" && plugin != "octoprint_mystromswitch") { if (plugin != "mystromswitch" && plugin != "octoprint_mystromswitch") {
@ -79,6 +79,7 @@ $(function() {
self.mystromswitchPowerValue.innerHTML = "Power Consumption "+data.power.toFixed(1)+"W"; self.mystromswitchPowerValue.innerHTML = "Power Consumption "+data.power.toFixed(1)+"W";
}else{ }else{
self.mystromswitchPowerValue.innerHTML = "myStrom switch not reachable" self.mystromswitchPowerValue.innerHTML = "myStrom switch not reachable"
self.mystromswitchEnergyValue.innerHTML = "Check url in Plugin Settings"
} }
} }
} }