User avatar
Brigandier
Posts: 422
Joined: Sun Sep 24, 2017 5:17 pm
Location: USA, Arkansas
Contact: Send private message

[Help Needed] Octoprint PrushMeshMap Plugin

Sun Apr 01, 2018 10:23 pm

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:
test.png
test.png (59.61 KiB) Viewed 2683 times

Many of you liked it, and I received a few requests to turn this into an Octoprint plugin. So I did. :)
example.PNG
example.PNG (205.91 KiB) Viewed 2683 times

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:
example2.PNG
example2.PNG (32.72 KiB) Viewed 2683 times

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:

  • Log in to Octoprint,
  • Go to Settings > Plugin Manager,
  • Click the "Get More..." button at the bottom of the plugin list,
  • Scroll down to "... from URL" and paste in: https://github.com/ff8jake/OctoPrint-Pr ... master.zip
  • Click Install, and when it finishes restart your Octoprint server.
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!
Waiting for MK3 to be worth using... still waiting...
My MK3 Parts: [New Shoes] [TPU Micro Springs]
My MK3 Software: [G81 Heatmaps] [OctoPrint Heatmaps]

sean.h8
Posts: 579
Joined: Fri Dec 01, 2017 12:54 pm
Location: Kentucky, USA
Contact: Send private message

Re: [Help Needed] Octoprint PrushMeshMap Plugin

Sun Apr 01, 2018 10:43 pm

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.

User avatar
Brigandier
Posts: 422
Joined: Sun Sep 24, 2017 5:17 pm
Location: USA, Arkansas
Contact: Send private message

Re: [Help Needed] Octoprint PrushMeshMap Plugin

Sun Apr 01, 2018 10:55 pm

sean.h8 wrote:
Sun Apr 01, 2018 10:43 pm
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-Pr ... p/issues/1 - Boom, first issue. :)
Waiting for MK3 to be worth using... still waiting...
My MK3 Parts: [New Shoes] [TPU Micro Springs]
My MK3 Software: [G81 Heatmaps] [OctoPrint Heatmaps]

User avatar
Brigandier
Posts: 422
Joined: Sun Sep 24, 2017 5:17 pm
Location: USA, Arkansas
Contact: Send private message

Re: [Help Needed] Octoprint PrushMeshMap Plugin

Mon Apr 02, 2018 12:12 am

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
Waiting for MK3 to be worth using... still waiting...
My MK3 Parts: [New Shoes] [TPU Micro Springs]
My MK3 Software: [G81 Heatmaps] [OctoPrint Heatmaps]

neil.e
Posts: 127
Joined: Sun Nov 12, 2017 12:02 am
Contact: Send private message

Re: [Help Needed] Octoprint PrushMeshMap Plugin

Mon Apr 02, 2018 12:54 am

Of course you post this while I'm in the middle of a 6 hour print. Blargh!!!

User avatar
Brigandier
Posts: 422
Joined: Sun Sep 24, 2017 5:17 pm
Location: USA, Arkansas
Contact: Send private message

Re: [Help Needed] Octoprint PrushMeshMap Plugin

Mon Apr 02, 2018 2:20 am

neil.e wrote:
Mon Apr 02, 2018 12:54 am
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. :mrgreen:
Waiting for MK3 to be worth using... still waiting...
My MK3 Parts: [New Shoes] [TPU Micro Springs]
My MK3 Software: [G81 Heatmaps] [OctoPrint Heatmaps]

Jan
Posts: 31
Joined: Tue Feb 06, 2018 7:56 pm
Location: Berlin
Contact: Send private message

Re: [Help Needed] Octoprint PrushMeshMap Plugin

Mon Apr 02, 2018 4:43 am

Great idea!

Thanks for this bro

User avatar
jrh
Posts: 27
Joined: Sat Oct 07, 2017 12:03 pm
Contact: Send private message

Re: [Help Needed] Octoprint PrushMeshMap Plugin

Mon Apr 02, 2018 9:58 am

Brigandier wrote:
Sun Apr 01, 2018 10:23 pm
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:

Code: Select all

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 <

User avatar
edward.c6
Posts: 319
Joined: Tue Oct 17, 2017 9:47 pm
Contact: Send private message

Re: [Help Needed] Octoprint PrushMeshMap Plugin

Mon Apr 02, 2018 12:39 pm

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.

User avatar
Brigandier
Posts: 422
Joined: Sun Sep 24, 2017 5:17 pm
Location: USA, Arkansas
Contact: Send private message

Re: [Help Needed] Octoprint PrushMeshMap Plugin

Mon Apr 02, 2018 12:41 pm

jrh wrote:
Mon Apr 02, 2018 9:58 am
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:

Code: Select all

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:

  • In OctoPrint, go to Settings > Plugin Manager,
  • In the top right corner, click the wrench icon,
  • In the "Additional arguments" box, add the following:

    Code: Select all

    --no-cache-dir
  • Click "Save" and try the plugin install again. :)

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-Pr ... p/issues/3

Thanks!
Waiting for MK3 to be worth using... still waiting...
My MK3 Parts: [New Shoes] [TPU Micro Springs]
My MK3 Software: [G81 Heatmaps] [OctoPrint Heatmaps]

Return to “User mods - OctoPrint, enclosures, nozzles, ...”

Who is online

Users browsing this forum: No registered users and 1 guest