[Help Needed] Octoprint PrushMeshMap Plugin
Hello Everyone,
The Plugin:
In the process of leveling my bed manually, I wrote a Python script ( https://github.com/ff8jake/g81-to-heatmap ) to decipher the G81 output into something a bit more human. Like this:
Many of you liked it, and I received a few requests to turn this into an Octoprint plugin. So I did. 🙂
I know many of you really want to tweak with this, including things like measuring after getting your PINDA up to temp. So I added the option to customize the gcode:
Finally, I have also made this in such a way that it constantly watches the output coming back from the printer. Any time a G81 happens (via the script above, or via a nice G81 inserted into your Slic3r start scripts!), it's going to recalculate the heatmap. You'll just need to go to the Prush Mesh Level tab, click reload under the heatmap image, and see what your last G81 results were. This will be very nice for troubleshooting. Have a crappy first layer? Go check that last heatmap and see what the PINDA thought on that particular print. 🙂
How to Use it Yourself:
I haven't put this on the Octoprint Plugin Directory yet because I want to battle test it a bit more and get some more ideas from you guys first. If you run Octoprint and want to give this a shot, do the following:
Ideally this all works correctly and you'll have the "Prusa Mesh Leveling" tab at the top. You must have your printer connected to perform a mesh level operation. The image WILL NOT update automatically after doing this. This is somewhat intentional, as it's sloppy to have javascript constantly refreshing it and it makes sure you are able to see a quick before/after by clicking the reload button below the image.
You can go to Settings > Prusa Mesh Leveling if you'd like to adjust the gcode script to include heater settings, PINDA warmup, etc.
Help Wanted:
This is my first Octoprint plugin. I do Python work as a Linux Sys Admin as needed at work and whenever my hobbies call for it. If anyone here has Octoprint plugin experience, please PM me an example and I may throw you directly onto this project. Of course, if you are only wanting to add some one off changes or improvements, it's on Github so you can fork and make a pull request as well. Issues and feature requests are also welcome and appreciated.
Github Repo: https://github.com/ff8jake/OctoPrint-PrusaMeshMap
Thank you guys for your help!
My MK3 Parts: [Bowden] [New Shoes] [TPU Micro Springs]
Re: [Help Needed] Octoprint PrushMeshMap Plugin
I'll be adding this fellow to my octopi as soon as I get a chance. (middle of a 12 hour print)
Can I request a feature.
Record the tests, and have an option to "average" them. (I know you complain about the consistency of the PINDA... this request is more for you than me... ;))
Hi, I'm Sean. I used to work on CNC machines.
I try to not make mistakes, but the decision is YOURS.
Please feel free to donate to my filament/maintance fund.
Re: [Help Needed] Octoprint PrushMeshMap Plugin
I'll be adding this fellow to my octopi as soon as I get a chance. (middle of a 12 hour print)
Can I request a feature.
Record the tests, and have an option to "average" them. (I know you complain about the consistency of the PINDA... this request is more for you than me... ;))
https://github.com/ff8jake/OctoPrint-PrusaMeshMap/issues/1 - Boom, first issue. 🙂
My MK3 Parts: [Bowden] [New Shoes] [TPU Micro Springs]
Re: [Help Needed] Octoprint PrushMeshMap Plugin
Already bumping this from 0.1.0 to 0.1.1. Had an absolute URL in one spot that would have worked for me and nobody else. If you installed, I think you can just install again (fom URL) to fix.
Thanks
My MK3 Parts: [Bowden] [New Shoes] [TPU Micro Springs]
Re: [Help Needed] Octoprint PrushMeshMap Plugin
Of course you post this while I'm in the middle of a 6 hour print. Blargh!!!
Re: [Help Needed] Octoprint PrushMeshMap Plugin
Of course you post this while I'm in the middle of a 6 hour print. Blargh!!!
Yeah that's a common issue. Need to get a second or third MK3 to fix that.
My MK3 Parts: [Bowden] [New Shoes] [TPU Micro Springs]
Re: [Help Needed] Octoprint PrushMeshMap Plugin
Great idea!
Thanks for this bro
Re: [Help Needed] Octoprint PrushMeshMap Plugin
Thank you guys for your help!
No, thank YOU! 🙂
It looks very promising - sadly I'm not able to install it for some reason. I am using OctoPrint 1.3.6 (latest official release) with an RPi Zero W, but I get this sad message:
Installing plugin from https://github.com/ff8jake/OctoPrint-PrusaMeshMap/archive/master.zip...
/home/pi/oprint/bin/python -m pip install https://github.com/ff8jake/OctoPrint-PrusaMeshMap/archive/master.zip
Collecting https://github.com/ff8jake/OctoPrint-PrusaMeshMap/archive/master.zip
Downloading https://github.com/ff8jake/OctoPrint-PrusaMeshMap/archive/master.zip (307kB)
Requirement already satisfied: OctoPrint in /home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.3.6-py2.7.egg (from OctoPrint-PrusaMeshMap==0.1.1)
Collecting matplotlib (from OctoPrint-PrusaMeshMap==0.1.1)
Downloading matplotlib-2.2.2.tar.gz (37.3MB)
Exception:
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/commands/install.py", line 324, in run
requirement_set.prepare_files(finder)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/req/req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/download.py", line 821, in unpack_url
hashes=hashes
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/download.py", line 659, in unpack_http_url
hashes)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/download.py", line 882, in _download_http_url
_download_url(resp, link, content_file, hashes)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/download.py", line 603, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/utils/hashes.py", line 46, in check_against_chunks
for chunk in chunks:
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/download.py", line 571, in written_chunks
for chunk in chunks:
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/utils/ui.py", line 139, in iter
for x in it:
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/download.py", line 560, in resp_read
decode_content=False):
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 357, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 314, in read
data = self._fp.read(amt)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 63, in read
self._close()
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 50, in _close
self.__callback(self.__buf.getvalue())
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/controller.py", line 275, in cache_response
self.serializer.dumps(request, response, body=body),
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/serialize.py", line 86, in dumps
data, separators=(",", ":"), sort_keys=True,
File "/usr/lib/python2.7/json/__init__.py", line 250, in dumps
sort_keys=sort_keys, **kw).encode(obj)
File "/usr/lib/python2.7/json/encoder.py", line 210, in encode
return ''.join(chunks)
MemoryError
You are using pip version 9.0.1, however version 9.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Error!
Could not parse output from pip, see plugin_pluginmanager_console.log for generated output
Maybe this is not intended for use with the limited ressources of the RPi Zero W?
Best regards
Hansen > Greetings from Denmark <
Re: [Help Needed] Octoprint PrushMeshMap Plugin
Added the plug-in without issue, however, I neglected to power the printer on before I left the house this morning so I can't test.
Re: [Help Needed] Octoprint PrushMeshMap Plugin
It looks very promising - sadly I'm not able to install it for some reason. I am using OctoPrint 1.3.6 (latest official release) with an RPi Zero W, but I get this sad message:
Installing plugin from https://github.com/ff8jake/OctoPrint-PrusaMeshMap/archive/master.zip...
/home/pi/oprint/bin/python -m pip install https://github.com/ff8jake/OctoPrint-PrusaMeshMap/archive/master.zip
Collecting https://github.com/ff8jake/OctoPrint-PrusaMeshMap/archive/master.zip
Downloading https://github.com/ff8jake/OctoPrint-PrusaMeshMap/archive/master.zip (307kB)
Requirement already satisfied: OctoPrint in /home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.3.6-py2.7.egg (from OctoPrint-PrusaMeshMap==0.1.1)
Collecting matplotlib (from OctoPrint-PrusaMeshMap==0.1.1)
Downloading matplotlib-2.2.2.tar.gz (37.3MB)
Exception:
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/commands/install.py", line 324, in run
requirement_set.prepare_files(finder)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/req/req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/download.py", line 821, in unpack_url
hashes=hashes
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/download.py", line 659, in unpack_http_url
hashes)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/download.py", line 882, in _download_http_url
_download_url(resp, link, content_file, hashes)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/download.py", line 603, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/utils/hashes.py", line 46, in check_against_chunks
for chunk in chunks:
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/download.py", line 571, in written_chunks
for chunk in chunks:
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/utils/ui.py", line 139, in iter
for x in it:
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/download.py", line 560, in resp_read
decode_content=False):
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 357, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 314, in read
data = self._fp.read(amt)
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 63, in read
self._close()
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 50, in _close
self.__callback(self.__buf.getvalue())
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/controller.py", line 275, in cache_response
self.serializer.dumps(request, response, body=body),
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/serialize.py", line 86, in dumps
data, separators=(",", ":"), sort_keys=True,
File "/usr/lib/python2.7/json/__init__.py", line 250, in dumps
sort_keys=sort_keys, **kw).encode(obj)
File "/usr/lib/python2.7/json/encoder.py", line 210, in encode
return ''.join(chunks)
MemoryError
You are using pip version 9.0.1, however version 9.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Error!
Could not parse output from pip, see plugin_pluginmanager_console.log for generated output
Maybe this is not intended for use with the limited ressources of the RPi Zero W?
Thanks for your attempt, I think I have a workaround. Please try the following:
--no-cache-dir
From what I am seeing, this error happens from time to time with pip on low memory systems (not specific to my plugin). The above argument seems to fix it in most cases I find. Also, if you find this fixes your issue, can you please confirm your experience on the following Github issue? https://github.com/ff8jake/OctoPrint-PrusaMeshMap/issues/3
Thanks!
My MK3 Parts: [Bowden] [New Shoes] [TPU Micro Springs]
Re: [Help Needed] Octoprint PrushMeshMap Plugin
Added the plug-in without issue, however, I neglected to power the printer on before I left the house this morning so I can't test.
Will make sure to document that the plugin fails to work when the printer is powered off. Thanks!
My MK3 Parts: [Bowden] [New Shoes] [TPU Micro Springs]
Re: [Help Needed] Octoprint PrushMeshMap Plugin
I try to install the script on a Pi 3 B + and Octopi 0.15.0, but it does not seem to work.
after "Using cached matplotlib-2.2.2.tar.gz" nothing happens. Does anyone else with Pi 3+ and 0.15.0 tested this?
My install response:
Installing plugin from https://github.com/ff8jake/OctoPrint-PrusaMeshMap/archive/master.zip ...
/home/pi/oprint/bin/python2 -m pip install https://github.com/ff8jake/OctoPrint-PrusaMeshMap/archive/master.zip
Collecting https://github.com/ff8jake/OctoPrint-PrusaMeshMap/archive/master.zip
Downloading https://github.com/ff8jake/OctoPrint-PrusaMeshMap/archive/master.zip (307kB)
Requirement already satisfied: OctoPrint in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint-PrusaMeshMap==0.1.1)
Collecting matplotlib (from OctoPrint-PrusaMeshMap==0.1.1)
Using cached matplotlib-2.2.2.tar.gz
Bear MK3 with Bondtech extruder
Re: [Help Needed] Octoprint PrushMeshMap Plugin
I try to install the script on a Pi 3 B + and Octopi 0.15.0, but it does not seem to work.
after "Using cached matplotlib-2.2.2.tar.gz" nothing happens. Does anyone else with Pi 3+ and 0.15.0 tested this?
My install response:
Installing plugin from https://github.com/ff8jake/OctoPrint-PrusaMeshMap/archive/master.zip ...
/home/pi/oprint/bin/python2 -m pip install https://github.com/ff8jake/OctoPrint-PrusaMeshMap/archive/master.zip
Collecting https://github.com/ff8jake/OctoPrint-PrusaMeshMap/archive/master.zip
Downloading https://github.com/ff8jake/OctoPrint-PrusaMeshMap/archive/master.zip (307kB)
Requirement already satisfied: OctoPrint in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint-PrusaMeshMap==0.1.1)
Collecting matplotlib (from OctoPrint-PrusaMeshMap==0.1.1)
Using cached matplotlib-2.2.2.tar.gz
Dang, I guess this is what I get for running OctoPrint in docker and not trying this out on a Pi before release. A post or two back I put the --no-cache-dir instructions, guessing this is with that plugged in?
I have a Pi 3 B+ at home I can test with later, but it's looking like this is strictly pip issues on the Pi. You may be able to install these requirements by hand via SSH, if you'd like to see if you have any better luck:
pip install matplotlib numpy
Those should be the only pip packages the plugin will require, and pretty much the same command OctoPrint is running.
My MK3 Parts: [Bowden] [New Shoes] [TPU Micro Springs]
Re: [Help Needed] Octoprint PrushMeshMap Plugin
Added the plug-in without issue, however, I neglected to power the printer on before I left the house this morning so I can't test.
Will make sure to document that the plugin fails to work when the printer is powered off. Thanks!
😆 Troubleshooting 101, is it plugged in? Is it powered on?...
Re: [Help Needed] Octoprint PrushMeshMap Plugin
.....
Dang, I guess this is what I get for running OctoPrint in docker and not trying this out on a Pi before release. A post or two back I put the --no-cache-dir instructions, guessing this is with that plugged in?
.....
Are you running it through your diskstation?
Re: [Help Needed] Octoprint PrushMeshMap Plugin
Are you running it through your diskstation?
Nah, I have a Dell R520 server that I run KVM on. I've got a virtual machine there running Docker that I am passing USB through to, then passing that into an OctoPrint Docker container. Works pretty nicely. 🙂
My MK3 Parts: [Bowden] [New Shoes] [TPU Micro Springs]
Re: [Help Needed] Octoprint PrushMeshMap Plugin
Mine appears to be stuck at the downloading part of matplotlib. It's been trying to pull down 37.3MB for quite a long time, far longer than it should take. This is on a Pi B+:
Installing plugin...
Installing plugin from https://github.com/ff8jake/OctoPrint-PrusaMeshMap/archive/master.zip...
/home/pi/oprint/bin/python -m pip install https://github.com/ff8jake/OctoPrint-PrusaMeshMap/archive/master.zip
Collecting https://github.com/ff8jake/OctoPrint-PrusaMeshMap/archive/master.zip
Downloading https://github.com/ff8jake/OctoPrint-PrusaMeshMap/archive/master.zip
Requirement already satisfied: OctoPrint in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint-PrusaMeshMap==0.1.1)
Collecting matplotlib (from OctoPrint-PrusaMeshMap==0.1.1)
Downloading matplotlib-2.2.2.tar.gz (37.3MB)
Re: [Help Needed] Octoprint PrushMeshMap Plugin
Installed and working!
Thank you Brigandier for a great script!
The magic code was:
sudo apt-get install pip
😀 😀 😀
Bear MK3 with Bondtech extruder
Re: [Help Needed] Octoprint PrushMeshMap Plugin
Installed and working!
Thank you Brigandier for a great script!
The magic code was:
sudo apt-get install pip
😀 😀 😀
Wow, was this on a burned Octopi card, or did you have something like Raspbian in place and installed OctoPrint from that? 🙂
My MK3 Parts: [Bowden] [New Shoes] [TPU Micro Springs]
Re: [Help Needed] Octoprint PrushMeshMap Plugin
Mine appears to be stuck at the downloading part of matplotlib. It's been trying to pull down 37.3MB for quite a long time, far longer than it should take. This is on a Pi B+:
Installing plugin...
Installing plugin from https://github.com/ff8jake/OctoPrint-PrusaMeshMap/archive/master.zip...
/home/pi/oprint/bin/python -m pip install https://github.com/ff8jake/OctoPrint-PrusaMeshMap/archive/master.zip
Collecting https://github.com/ff8jake/OctoPrint-PrusaMeshMap/archive/master.zip
Downloading https://github.com/ff8jake/OctoPrint-PrusaMeshMap/archive/master.zip
Requirement already satisfied: OctoPrint in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint-PrusaMeshMap==0.1.1)
Collecting matplotlib (from OctoPrint-PrusaMeshMap==0.1.1)
Downloading matplotlib-2.2.2.tar.gz (37.3MB)
Have you tried the --no-cache-dir option in the Plugin Manager? Instructions for this are a few of my posts back.
My MK3 Parts: [Bowden] [New Shoes] [TPU Micro Springs]