Compare commits

...
9 Commits
Author SHA1 Message Date
Stefan Dej 707330e501 bugfix: add timestamp to gui.json for caching problems
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-04 00:17:58 +02:00
Stefan Dej 7a75f6f6cc bugfix: remove "move=1" before all axis are homed
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-04 00:05:39 +02:00
Stefan Dej 331c0a1e99 add mjpgstreamer to nginx in installation.md
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-02 22:36:12 +02:00
Stefan Dej 0c70bd5f23 update installation.md
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-01 21:20:55 +02:00
Stefan Dej bce591e16e update installation.md
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-01 21:20:16 +02:00
Stefan Dej d0d36470ba update loadingQGL to generic function
report klippy state in browser console log

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-01 16:41:33 +02:00
Stefan Dej 479f2245e3 bugfix: disable heater with value 0
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-01 16:38:58 +02:00
Stefan Dej 706803ea5b update update-0.1.x.md
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-01 16:27:46 +02:00
Stefan Dej 1efe346cb0 add update-0.1.x.md
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-01 14:02:53 +02:00
9 changed files with 93 additions and 43 deletions

No files matched your search

+1
View File
@@ -1,6 +1,7 @@
# Overview
- [Installation](installation.md)
- [Update from 0.1.x to latest](update-0.1.x.md)
- [Update from 0.0.x to 0.1.x](update-0.0.x.md)
- [Macros](macros.md)
- [Slicer upload](slicer-upload.md)
+39 -17
View File
@@ -5,35 +5,47 @@ may work, however they may need a custom install script.
**Please don't use a octopi image!!!**
Klipper should be installed prior to installing Moonraker. Please see
[Klipper's Documention](https://github.com/KevinOConnor/klipper/blob/master/docs/Installation.md)
for instructions on how to do this.
## Installing operation system image
It's recommend to use a clean Raspberry Pi OS 32-bit Lite (previosly called Raspbian)
image. You can download it [here](https://downloads.raspberrypi.org/raspios_lite_armhf_latest).
## Install Moonraker (API)
More information about the installtion of Raspberry Pi OS are
[here](https://www.raspberrypi.org/documentation/installation/installing-images/).
**If you have finished the installation and connected via ssh, you can continue.**
## Install Requirements
```
sudo apt update && sudo apt upgrade
sudo apt install git dfu-util
```
## Install Klipper
Moonraker is still in alpha development, and thus some of its dependencies
in Klipper have yet to be merged. Until this has been done it will be
necessary to add a remote and work off a developmental branch of Klipper
to correctly run Moonraker.
### Change Klipper branch
In this step, we install klipper and change to the development branch of Klipper.
```
cd ~
git clone https://github.com/KevinOConnor/klipper
cd ~/klipper
git remote add arksine https://github.com/Arksine/klipper.git
```
Now fetch and checkout:
```
git remote add arksine https://github.com/arksine/klipper
git fetch arksine
git checkout arksine/dev-moonraker-testing
git reset --hard arksine/dev-moonraker-testing
./scripts/install-octopi.sh
```
Note that you are now in a detached head state and you cannot pull. Any
time you want to update to the latest version of this branch you must
repeat the two commands above.
time you want to update to the latest version of this branch you have to
`git fetch arksine` and `git reset --hard arksine/dev-moonraker-testing`.
**Note that the above command is NOT part of the Moonraker install procedure.**
### Install Moonraker application
Now you can copy your `printer.cfg` in your home directory and restart klipper.
Please check the `klippy.log`, if Klipper starts correctly and then continue
the guide.
## Install Moonraker (API)
You can now install the Moonraker application:
```
cd ~
@@ -59,7 +71,7 @@ Edit your printer.cfg with nano ~/printer.cfg and add the following lines:
```
[moonraker]
trusted_clients:
192.168.1.0/24
192.168.1.0/24
```
We also need a `virtual_sdcard` for store the gcode files:
@@ -116,6 +128,12 @@ upstream apiserver {
server 127.0.0.1:7125;
}
upstream mjpgstreamer {
#edit your webcam port here
ip_hash;
server 127.0.0.1:8081;
}
server {
listen 80 default_server;
listen [::]:80 default_server;
@@ -186,6 +204,10 @@ server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
}
location /webcam/ {
proxy_pass http://mjpgstreamer/;
}
}
```
+24
View File
@@ -0,0 +1,24 @@
# Update from 0.1.x to latest
Updates after 0.1.x are easier than 0.0.x to 0.1.x.
## Update Moonraker
```
cd ~/moonraker
git pull
sudo service moonraker restart
```
## Update Klipper
```
cd ~/klipper
git fetch arksine
git checkout arksine/dev-moonraker-testing
sudo service klipper restart
```
## Update static files from Mainsail
```
rm -R ~/mainsail/*
cd ~/mainsail
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/download/v0.1.1/mainsail-beta-0.1.1.zip && unzip mainsail.zip && rm mainsail.zip
```
+4 -6
View File
@@ -61,7 +61,7 @@
</template>
<script>
import { mapState, mapGetters, mapMutations } from 'vuex'
import { mapState, mapGetters } from 'vuex'
import Vue from "vue";
export default {
@@ -74,19 +74,16 @@
loadingHomeX: false,
loadingHomeY: false,
loadingHomeZ: false,
loadingQGL: false,
loadingZTilt: false,
}
},
computed: {
...mapState({
loadingQGL: state => state.socket.loadingQGL,
homedAxes: state => state.printer.toolhead.homed_axes,
config: state => state.config,
loadings: state => state.loadings,
}),
...mapMutations([
'setLoadingQGL',
]),
...mapGetters([
'getMacros',
'is_printing'
@@ -115,7 +112,7 @@
},
doQGL() {
this.$store.commit('addGcodeResponse', "QUAD_GANTRY_LEVEL");
this.$store.commit('setLoadingQGL', true);
this.$store.commit('setLoading', { name: 'controlQGL' });
this.$socket.sendObj('post_printer_gcode_script', { script: "QUAD_GANTRY_LEVEL" }, "responseQGL");
},
doZtilt() {
@@ -141,6 +138,7 @@
this.loadingHomeX = loadings.includes('controlHomeX');
this.loadingHomeY = loadings.includes('controlHomeY');
this.loadingHomeZ = loadings.includes('controlHomeZ');
this.loadingQGL = loadings.includes('controlQGL');
this.loadingZTilt = loadings.includes('controlZTilt');
}
}
+5 -4
View File
@@ -55,29 +55,30 @@
printer_state: state => state.printer.idle_timeout.state,
printer_is_paused: state => state.printer.pause_resume.is_paused,
printer_is_printing: state => state.printer.virtual_sdcard.is_active,
homed_axis: state => state.printer.toolhead.homed_axes,
}),
},
methods: {
sendBabySteppingDownFine() {
let gcode = "SET_GCODE_OFFSET Z_ADJUST=-0.01 MOVE=1";
let gcode = "SET_GCODE_OFFSET Z_ADJUST=-0.01"+(this.homed_axis === "xyz" ? " MOVE=1" : "");
this.$store.commit('setLoading', { name: 'babySteppingDownFine' });
this.$store.commit('addGcodeResponse', gcode);
Vue.prototype.$socket.sendObj('post_printer_gcode_script', { script: gcode }, "respondeBabySteppingDownFine");
},
sendBabySteppingDown() {
let gcode = "SET_GCODE_OFFSET Z_ADJUST=-0.05 MOVE=1";
let gcode = "SET_GCODE_OFFSET Z_ADJUST=-0.05"+(this.homed_axis === "xyz" ? " MOVE=1" : "");
this.$store.commit('setLoading', { name: 'babySteppingDown' });
this.$store.commit('addGcodeResponse', gcode);
Vue.prototype.$socket.sendObj('post_printer_gcode_script', { script: gcode }, "respondeBabySteppingDown");
},
sendBabySteppingUpFine() {
let gcode = "SET_GCODE_OFFSET Z_ADJUST=0.01 MOVE=1";
let gcode = "SET_GCODE_OFFSET Z_ADJUST=0.01"+(this.homed_axis === "xyz" ? " MOVE=1" : "");
this.$store.commit('setLoading', { name: 'babySteppingUpFine' });
this.$store.commit('addGcodeResponse', gcode);
Vue.prototype.$socket.sendObj('post_printer_gcode_script', { script: gcode }, "respondeBabySteppingUpFine");
},
sendBabySteppingUp() {
let gcode = "SET_GCODE_OFFSET Z_ADJUST=0.05 MOVE=1";
let gcode = "SET_GCODE_OFFSET Z_ADJUST=0.05"+(this.homed_axis === "xyz" ? " MOVE=1" : "");
this.$store.commit('setLoading', { name: 'babySteppingUp' });
this.$store.commit('addGcodeResponse', gcode);
Vue.prototype.$socket.sendObj('post_printer_gcode_script', { script: gcode }, "respondeBabySteppingUp");
+1 -1
View File
@@ -40,7 +40,7 @@
if (this.max_temp !== undefined && this.value > this.max_temp) {
this.value = this.target;
Vue.$toast.error("Temperature too high for "+this.name+"! (max: "+this.max_temp+")");
} else if (this.min_temp !== undefined && this.value < this.min_temp && this.value !== 0) {
} else if (this.min_temp !== undefined && this.value < this.min_temp && parseFloat(this.value) !== 0) {
this.value = this.target;
Vue.$toast.error("Temperature too low for "+this.name+"! (min: "+this.min_temp+")");
} else this.$socket.sendObj('post_printer_gcode_script', {script: this.command+' '+this.attributeName+'='+this.name+' TARGET='+this.value});
+5 -5
View File
@@ -32,6 +32,8 @@ export default {
break;
case 'notify_klippy_state_changed':
window.console.log('notify_klippy_state_changed');
window.console.log(data.params[0]);
commit('setKlippyStatus', data.params[0]);
break;
@@ -72,7 +74,7 @@ export default {
getDirectoryRoot({ commit }, data) {
if (data.files && data.files.filter((file) => file.filename === "gui.json")) {
fetch('http://'+store.state.socket.hostname+':'+store.state.socket.port+'/server/files/gcodes/gui.json')
fetch('http://'+store.state.socket.hostname+':'+store.state.socket.port+'/server/files/gcodes/gui.json?time='+Date.now())
.then(res => res.json()).then(file => {
commit('setSettings', file);
});
@@ -105,8 +107,6 @@ export default {
version: data.version
});
commit('setKlippyStatus', 'ready');
Vue.prototype.$socket.sendObj('get_printer_objects_list', {}, 'getObjectInfo');
Vue.prototype.$socket.sendObj('get_printer_objects_status', { heaters: [] }, 'getHeatersInfo');
Vue.prototype.$socket.sendObj('get_printer_objects_status', { configfile: ['config'] }, 'getPrinterConfig');
@@ -122,7 +122,7 @@ export default {
});
Vue.prototype.$socket.sendObj('get_directory', { path: 'gcodes' }, 'getDirectory');
Vue.prototype.$socket.sendObj('get_printer_gcode_help', {}, 'getHelpList');
} else if (data !== undefined && !data.is_ready) commit('setKlippyStatus', 'disconnect');
}
commit('setPrinterStatusDetails', data);
@@ -276,7 +276,7 @@ export default {
},
responseQGL({commit}) {
commit('setLoadingQGL', false);
commit('removeLoading', { name: 'controlQGL' });
},
responseZTilt({commit}) {
-1
View File
@@ -20,7 +20,6 @@ export default new Vuex.Store({
loadingEmergencyStop: false,
loadingPrintPause: false,
loadingPrintResume: false,
loadingQGL: false,
loadingRestart: false,
loadingRestartFirmware: false,
loadingRebootHost: false,
+14 -9
View File
@@ -139,7 +139,7 @@ export default {
}
// update target temp in temperature chart
if (index_target >= 0) {
if (index_target >= 0 && payload.value.target !== undefined) {
for (let i = 0; i < ticks; i++) state.temperaturChart.datasets[index_target].data.push(payload.value.target.toFixed(1));
}
@@ -443,17 +443,22 @@ export default {
},
setKlippyStatus(state, value) {
state.socket.klippy_state = value;
if (value === "disconnect") {
state.socket.is_ready = false;
state.socket.klippy_message = "";
} else if (value === "ready") Vue.prototype.$socket.sendObj('get_printer_info', {}, 'getKlipperInfo');
if (value !== undefined) {
state.socket.klippy_state = value;
if (value === "disconnect") {
state.socket.is_ready = false;
state.socket.klippy_message = "";
} else if (value === "ready") Vue.prototype.$socket.sendObj('get_printer_info', {}, 'getKlipperInfo');
}
},
setPrinterStatusDetails(state, data) {
state.socket.error_detected = data.error_detected;
state.socket.is_ready = data.is_ready;
state.socket.klippy_message = data.message;
if (data !== undefined && data.is_ready !== undefined) {
state.socket.error_detected = data.error_detected;
state.socket.is_ready = data.is_ready;
state.socket.klippy_message = data.message;
}
},
setLoadingGcodeUpload(state, value) {