Update to latest moonraker api changes

This commit is contained in:
Birkemosen 2020-09-06 21:31:17 +02:00
parent b314e57bfc
commit 59efbfa369
2 changed files with 3 additions and 2 deletions

View File

@ -48,7 +48,7 @@ export default {
},
methods: {
setPower(index, value) {
let rpc = value === 1 ? "post_power_on" : "post_power_off";
let rpc = value === 1 ? "machine.gpio_power.on" : "machine.gpio_power.off";
let deviceId = this.devices[index].id;
Vue.prototype.$socket.sendObj(
rpc,

View File

@ -9,6 +9,7 @@ export default {
commit('setConnected');
Vue.prototype.$socket.sendObj('server.files.get_directory', { path: '/gcodes' }, 'getDirectoryRoot');
Vue.prototype.$socket.sendObj('printer.info', {}, 'getKlipperInfo');
Vue.prototype.$socket.sendObj('machine.gpio_power.devices', {}, 'getPowerDevices');
},
socket_on_close ({ commit }, event) {
@ -212,7 +213,7 @@ export default {
} else {
commit('setPowerDevices', data.devices);
Vue.prototype.$socket.sendObj('get_power_status', {}, 'getPowerDevicesStatus');
Vue.prototype.$socket.sendObj('machine.gpio_power.status', {}, 'getPowerDevicesStatus');
}
},