Update to latest moonraker api changes
This commit is contained in:
parent
b314e57bfc
commit
59efbfa369
@ -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,
|
||||
|
@ -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');
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user