Re: OctoPrint issues and tips
Printer is connected, looks like. What is the content of Terminal tab? The Rpi port is allowed in printer's menu?
Re: OctoPrint issues and tips
What kind of settings should I put into the printer profile during the Octoprint Setup Wizard process?
Are these ok? Why there is inverted next to the Y axis?
https://manual.prusa3d.com/Answers/View/1259/Standalone+MK3+settings+for+OctoPrint
Re: OctoPrint issues and tips
use this https://www.prusa3d.com/download-prusaprint and you will not have to put anything anywhere. This is a pre-build Prusa Octoprint image
Re: OctoPrint issues and tips
I wrote a small python script to:
- check if the serial port exists
- check if the printer is connected. in case not, it asks the API to connect and check for status for next 10 seconds. if connected, it will exit with a message that it was successful.
- touches the IP for Octoprint to reload everything so the webpage is loaded quickly even when first using.
Uff..sorry, i totally mislooked this post. I've had some problems with my RPi and 7 inch china LCD, too... i will test it later today and report.
MANY THANKS!
What kind of settings should I put into the printer profile during the Octoprint Setup Wizard process?
Are these ok? Why there is inverted next to the Y axis?
General: name of your priner, model..
Print bed&volume: original lower left, heated bed, x250, y210, z210.
Axes: x10200, y10200, z720, e7200.
Hotend&extruder: 0,4mm, 1 extruder.
Re: OctoPrint issues and tips
no worries. But please test it while printing from Octoprint too. The cron with python shell running every X minutes could slow down the printing every time it runs
I print from SD Card, Octoprint is planned only to watch the process (temperatures, end of print via Pushover with a photo, maybe streaming), so it should not affect my prints. If anyone prints while streaming the camera, using this solution probably will cause some pauses in the print
Re: OctoPrint issues and tips
cannot edit my previous post, here's a small correction in the file name
I wrote a small python script to:
- check if the serial port exists
- check if the printer is connected. in case not, it asks the API to connect and check for status for next 10 seconds. if connected, it will exit with a message that it was successful.
- touches the IP for Octoprint to reload everything so the webpage is loaded quickly even when first using.
all you need is to give the Pi a bit of time, this script runs every second minute. It's not professional work, but it's worth testing. Also the CPU usage is worth monitoring, we don't want this script to pause the printjob every two minutes. Like said, it works but it can have negative impact on the performance and there could be a better way to do it.
note that you have to install python requests module by running sudo apt-get install python-requests, otherwise python will throw an error
before saving the .py file please:
- change the API key in headers_post and headers_get
- check if the payload_connect part contains correct things, like serial port name and so on.
try this, put the code below into a file and save it in /home/pi/restartOP.py
then run crontab -e and put this line to the end as new line
*/2 * * * * python /home/pi/restartOP.py
script here:
import requests
import json
import sys
import os
import time
url = "http://127.0.0.1/api/connection"
url_refresh="http://127.0.0.1"
headers_post = {
"Content-Type":"application/json",
"X-Api-Key":"2333F4CD454B491BA409B20A1CDA6A06"
}
headers_get={
"X-Api-Key":"2333F4CD454B491BA409B20A1CDA6A06"
}
payload_connect = {
"port":"/dev/ttyAMA0",
"baudrate":115200,
"printerProfile":"_default",
"autoconnect":"true",
"save":"true",
"command":"connect"
}
#we'll assume the process is running
if os.path.exists("/dev/ttyAMA0"):
print("Serial port does exist")
r = requests.get(url , headers=headers_get)
current_state=(r.json()['current']['state'])
if current_state.lower()=="closed":
print("Connection is closed. Reconnecting ...")
r = requests.post(url, data=json.dumps(payload_connect), headers=headers_post)
for x in range(10):
rc=requests.get(url , headers=headers_get)
cstate=(rc.json()['current']['state']).lower()
print("Result: port is "+cstate)
if cstate=="operational":
break
time.sleep(1)
if cstate=="operational":
print "Connection established OK"
else:
print("Connection is already established, nothing to do")
else:
print("Serial port does not exist, exiting")
#now just touch the WebUI to get it loaded quicker when needed
print("Touching the WebUI")
rc=requests.get(url, headers=headers_get)
[/quote]
Re: OctoPrint issues and tips
I tried ...something isn't right...
it doesn't work, when i run it manually with command "python /home/pi/restartOP.py" it says:
Traceback (most recent call last):
File "/home/pi/restartOP.py", line 3, in <module>
import requests
ImportError: No module named requests
I did replace API and since i have prusa on USB i changed ttyAMA0 to ttyACM0 (which is stated in octoprint).
EDIT: found it! I had to install requests with command: "sudo apt-get install python-requests" .
Now it wont' connect...so, back to exploring...
EDIT2: WORKS!!! in "profile" it's necesarry to leave "_default", not name of profile, stated in octoprint.
THANKS AGAIN!!!
Re: OctoPrint issues and tips
I tried ...something isn't right...
it doesn't work, when i run it manually with command "python /home/pi/restartOP.py" it says:
Traceback (most recent call last):
File "/home/pi/restartOP.py", line 3, in <module>
import requests
ImportError: No module named requests
I did replace API and since i have prusa on USB i changed ttyAMA0 to ttyACM0 (which is stated in octoprint).
EDIT: found it! I had to install requests with command: "sudo apt-get install python-requests" .
Now it wont' connect...so, back to exploring...
EDIT2: WORKS!!! in "profile" it's necesarry to leave "_default", not name of profile, stated in octoprint.
THANKS AGAIN!!!
good, I had it already installed so I did not think about this, I'll update my post 🙂
yeah no worries, glad it works for you. just please watch the CPU usage of the Pi in case you are printing by octoprint and not the SD card. Please give me a shout in this thread how it works after few prints. It's just a draft script just came off my head
and does the web interface load quicker on the first go?
Re: OctoPrint issues and tips
Well, since i have RPi3 CPU load is maximum around 25% when script is running, for now without printing, but i guess it won't present a problem. I'll watch out and update here when i'll print something.
However, it would be good if someone with Pi Zero would try this script and tell CPU usage, since Zero is less powerfull than Pi3.
I didn't notice any speed difference in web interface loading, but on Pi3 already loads way quicker than on Zero.
And, since i plan to have Pi more or less always on i just found out how to turn off LCD backlight - in screensaver-advanced it's necesarry to enable power management, set all times to zero (to disable shut down Pi) and enable "quick power-off in Blank only mode". And, of course, set screensaver to "blank only".
Re: OctoPrint issues and tips
use this https://www.prusa3d.com/download-prusaprint and you will not have to put anything anywhere. This is a pre-build Prusa Octoprint image
General: name of your priner, model..
Print bed&volume: original lower left, heated bed, x250, y210, z210.
Axes: x10200, y10200, z720, e7200.
Hotend&extruder: 0,4mm, 1 extruder.
@doa
Let's sum up two things:
1) If I would reinstall octoprint on a sd card - would I need to configure the network settings all again (config and turning ssh on etc.) ?
2) There are these values that @Protoncek wrote. How is octoprint image from prusa diffrent from normal one? Can't I just change the values? Is there something more that comes with the prusa octoprint image?
Re: OctoPrint issues and tips
use this https://www.prusa3d.com/download-prusaprint and you will not have to put anything anywhere. This is a pre-build Prusa Octoprint image
General: name of your priner, model..
Print bed&volume: original lower left, heated bed, x250, y210, z210.
Axes: x10200, y10200, z720, e7200.
Hotend&extruder: 0,4mm, 1 extruder.
@doa
Let's sum up two things:
1) If I would reinstall octoprint on a sd card - would I need to configure the network settings all again (config and turning ssh on etc.) ?
2) There are these values that @Protoncek wrote. How is octoprint image from prusa diffrent from normal one? Can't I just change the values? Is there something more that comes with the prusa octoprint image?
Hi, yes you would have to reconfigure the debian again. but it's not a big deal, you can configure ssh by putting a file on the root of the freshly imaged SD card, same for wifi connection. see this: https://hackernoon.com/raspberry-pi-headless-install-462ccabd75d0 step 3
this is for wifi connection: https://www.raspberrypi.org/forums/viewtopic.php?t=161202
here is the contents of ~/.octoprint/printerProfiles/_default.profile file, which contains the printer config, edit it and adjust according to mine (I have the image from Prusa)
axes:
e:
inverted: false
speed: 7200
x:
inverted: false
speed: 10200
y:
inverted: false
speed: 10200
z:
inverted: false
speed: 720
color: default
extruder:
count: 1
nozzleDiameter: 0.4
offsets:
- - 0.0
- 0.0
sharedNozzle: false
heatedBed: true
id: _default
model: Prusa i3 MK3
name: i3 MK3
volume:
custom_box: false
depth: 210.0
formFactor: rectangular
height: 210.0
origin: lowerleft
width: 250.0
Prusa's Pi image could also contain some slicing settings for Cura Engine, but did not investigate that, I'm not using that one. But Prusa's image contains a plugin for Octoprint, which displays IP address of the PI on the i3's LCD.
it's up to you, you can easily take another card and try to burn the Prusa's image onto that card, just to see if it works out of the box. You can then go back to the old card anytime
Re: OctoPrint issues and tips
Is there a guide for installing a Pi3 rather than Zero? I am sure I saw something some months back, but never bookmarked it.
I got Octopi up and running pretty easily but want to make sure I didn't miss anything.. And I am not clear as to how to setup the USB, as the PiZero guides give info about using Serial and GPIO.
Re: OctoPrint issues and tips
Is there a guide for installing a Pi3 rather than Zero? I am sure I saw something some months back, but never bookmarked it.
I got Octopi up and running pretty easily but want to make sure I didn't miss anything.. And I am not clear as to how to setup the USB, as the PiZero guides give info about using Serial and GPIO.
Yes here: https://octoprint.org/download/
Just update the config according pasted above and you are fine. Reg.serial port, there's nothing to do wrong, there will be only one if you connect itproperly
Re: OctoPrint issues and tips
Is there a guide for installing a Pi3 rather than Zero? I am sure I saw something some months back, but never bookmarked it.
I got Octopi up and running pretty easily but want to make sure I didn't miss anything.. And I am not clear as to how to setup the USB, as the PiZero guides give info about using Serial and GPIO.
Yes here: https://octoprint.org/download/
Just update the config according pasted above and you are fine. Reg.serial port, there's nothing to do wrong, there will be only one if you connect itproperly
I originally went for Octoprint 0.15 but then decided to give the Prusa version a go.
Are you saying i still need to make the GPIO/Bluetooth/Serial changes, even though i am using USB?
Re: OctoPrint issues and tips
Not sure what do you mean by changes, you connect the Pi via USB so the serial port name will be different. You may want to disable gpio on Pi (via raspi-config) to save some resources, but that's basically it, there's not much to do
Or do you mean something else I did not grt?
Re: OctoPrint issues and tips
I am probably reading too much into this, but I guess I am asking:
1. Do I need to do XI. Swapping ports used by GPIO and Bluetooth
2. Do I need to do XII. Disabling the serial console
And I guess this optional for the Pi3.. But my main question, is what do I put into Octopi for the Serial Port when using USB.. Is it still "/dev/ttyAMA0"?
Re: OctoPrint issues and tips
yes you are. This is not a rocket science, just do it and you will see that there are only 1 or 2 ports available in Octoprint GUI. I'd say just try it and you will see that
below points you mentioned you can do, but you don't have to.
Re: OctoPrint issues and tips
yes you are. This is not a rocket science, just do it and you will see that there are only 1 or 2 ports available in Octoprint GUI. I'd say just try it and you will see that
below points you mentioned you can do, but you don't have to.
This is me through and through.. The only reason i ask is that on my Octoprint GUI I don't have anything other than "Auto".
I ran into problems with my camera and focussed on that and concluded its faulty...
I am going to start all over again.. I will build the card from scratch and see what happens.. The only reason I asked was that I was sure I saw a guide about the non-Zero Pi giving some speciifc info and tips, but I can't find it...
Thanks for your help
Jon
Re: OctoPrint issues and tips
you should mention that you don't have anything else in there sooner .. you can ask direct quesions. There's no stupid question, only stupid answers 🙂
first I'd install the plain Octoprint image from scratch (not Prusa's, the general one). Do not do any modification, do not disable serial console, just let it be as it is. Only configure the SSH (and wpa_supplicant in case you are using wifi)
if you run following command with cable disconnected and then connected, you want to see a difference in the output when running before and after cable connection: ls /dev/tty*
if the output is the same, the USB serial was not detected, you have to investigate (or let us investigate if you provide some info more):
read this: https://github.com/guysoft/OctoPi/issues/146#issuecomment-144386713
i suggest: disconnect the USB cable from the printer, logon to your raspberry connect the cable and enter command dmesg. one of last lines should contain about the USB or serial port being connected, or some error message. Paste it here together with few more lines around the message.
If you see no error related to USB,SERIAL, TTY, try to use another cable
let me know, I'm willing to help
Re: OctoPrint issues and tips
I was under the impression that I could mount the pi to a Windows Drive.. And then export G-code straight to this folder.. I am sure its possible, but I have hit a wall.
I have created a folder on the pi called /share.
I set the permissions, and configured SAMBA so that I can mount it on the PC. And now I can mount it and read/write to this directory... So that side is working.
But once I put a gcode file on the PI using the share, how do I open it in Octopi?
The only option is for me to drag/drop a file into the "FILES" section.. But I am sure I read that its also possible to do this via a share... Can anyone help?
Jon
Edit: Ignore that, I think I have worked it out.. The directory used by Octopi is "/home/pi/.octoprint/uploads".
So I have to mount this and drop files there....