# Using Octoprint's Bed Visualizer with Klipper

**URL:** <https://klipper.discourse.group/t/using-octoprints-bed-visualizer-with-klipper/13035>\
**Category:** General Discussion\
**Created:** [January 11, 2024, 2:07pm UTC](https://klipper.discourse.group/t/using-octoprints-bed-visualizer-with-klipper/13035 "2024-01-11T14:07:27Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Slartibartfast](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/slartibartfast/32/9538_2.png) [@Slartibartfast](https://klipper.discourse.group/u/Slartibartfast)\
**Post date:** [January 11, 2024, 2:07pm UTC](https://klipper.discourse.group/t/using-octoprints-bed-visualizer-with-klipper/13035/1 "2024-01-11T14:07:27Z")

</div>

I’m using Octoprint with Klipper and am really struggling to get good first layers and I’m beginning to wonder if my bed mesh is working, so I installed “Bed Visualizer” to try and see if I can tell.

I have run the command “BUILD\_MESH” followed by “SAVE\_CONFIG” several times and see I have a 7x7 matrix of points in the comments of my printer.cfg file under the heading [bed\_mesh default]

The Bed Visualizer instructions say to add these lines to the configuration, which I have done:

```auto
@BEDLEVELVISUALIZER	; instruct plugin to start recording responses from printer.
BED_MESH_OUTPUT ; report the bed leveling mesh points.

```

However, when I click “Update Mesh Now” it just says “Please wait, retrieving current mesh.” but never shows anything. There is a message in the main window that says “Bed has not been probed” that makes me thing something isn’t working.

Does anyone know how Bed Visualizer is meant to work, and how I can check if my mesh is correct and being used?

---

<div class="post-metadata">

**Author:** ![EddyMI3D](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/eddymi3d/32/1981_2.png) [@EddyMI3D](https://klipper.discourse.group/u/EddyMI3D)\
**Post date:** [January 11, 2024, 2:10pm UTC](https://klipper.discourse.group/t/using-octoprints-bed-visualizer-with-klipper/13035/2 "2024-01-11T14:10:11Z")

</div>

No problem at all.

Here is the script I use in Bed Visualizer:

```auto
@BEDLEVELVISUALIZER
BED_MESH_CLEAR
G28
G28 Z
BED_MESH_CALIBRATE
G28 Z
BED_MESH_OUTPUT PGP=0

```

If the mesh is already loaded:

```auto
@BEDLEVELVISUALIZER
BED_MESH_OUTPUT PGP=0

```

> [@Slartibartfast](#):
>
> Does anyone know how Bed Visualizer is meant to work, and how I can check if my mesh is correct and being used?

The plugin shows the topographic of the bed surface.  
You get shown the minimum and maximum deviation from zero.

Also see here:

> <https://github.com/jneilliii/OctoPrint-BedLevelVisualizer/blob/master/wiki/index.md>

---

<div class="post-metadata">

**Author:** ![Slartibartfast](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/slartibartfast/32/9538_2.png) [@Slartibartfast](https://klipper.discourse.group/u/Slartibartfast)\
**Post date:** [January 11, 2024, 2:52pm UTC](https://klipper.discourse.group/t/using-octoprints-bed-visualizer-with-klipper/13035/3 "2024-01-11T14:52:54Z")

</div>

Thanks @EddyMI3D

I first tried adding `PGP=0` to me `BED_MESH_OUTPUT` but nothing changed, so I tried replacing with your code above (with the G28 commands) and when I ran it my tool started reporting “-56.8°C” and has shutdown with an error:

```MCU
This generally occurs when a heater temperature exceeds
its configured min_temp or max_temp.
Once the underlying issue is corrected, use the
"FIRMWARE_RESTART" command to reset the firmware, reload the
config, and restart the host software.
Printer is shutdown

```

This may just be a coincidence but it happened right after I clicked “Update Mesh Now” once I changed the code. Reverting the code and restarting the system doesn’t seem to bring it back. KLIPPY.LOG file attached  
[klippy.log](https://klipper.discourse.group/uploads/short-url/2vGvRVaY0jbgiEqrU8z0QqNNS3s.log) (107.5 KB)

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [January 11, 2024, 3:19pm UTC](https://klipper.discourse.group/t/using-octoprints-bed-visualizer-with-klipper/13035/4 "2024-01-11T15:19:57Z")

</div>

See [ADC out of range](https://klipper.discourse.group/t/adc-out-of-range/6643)

---

<div class="post-metadata">

**Author:** ![Slartibartfast](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/slartibartfast/32/9538_2.png) [@Slartibartfast](https://klipper.discourse.group/u/Slartibartfast)\
**Post date:** [January 11, 2024, 3:42pm UTC](https://klipper.discourse.group/t/using-octoprints-bed-visualizer-with-klipper/13035/5 "2024-01-11T15:42:21Z")

</div>

Okay, somewhat surprisingly it seems it was just a coincidence.

I turned the printer around and discovered that one of the thermometer weirs had indeed come out of the back of the plug, and it just so happened to do so right at the time I was running the above code. It took a bit of finagling to get back in but it’s all operational again: 🙂

---

<div class="post-metadata">

**Author:** ![Slartibartfast](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/slartibartfast/32/9538_2.png) [@Slartibartfast](https://klipper.discourse.group/u/Slartibartfast)\
**Post date:** [January 11, 2024, 3:57pm UTC](https://klipper.discourse.group/t/using-octoprints-bed-visualizer-with-klipper/13035/6 "2024-01-11T15:57:41Z")

</div>

So, sorry about that little diversion…

Anyway, after running the code above the bed is probed again and I do indeed get a visualisation of the bed:

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/b/b77e6d12580e06ec55e90842a235636628bb2b4f.png)

And the visualisation does indeed seem to imply that my bed is high in the centre (and by an entire layer height if I understand what I’m looking at correctly), which could explain the 1st layer issues I’m having.

Given the `BED_MESH_OUTPUT` command seems to be failing for me is there any way I can determine if my prints are actually using this mesh information?

---

<div class="post-metadata">

**Author:** ![EddyMI3D](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/eddymi3d/32/1981_2.png) [@EddyMI3D](https://klipper.discourse.group/u/EddyMI3D)\
**Post date:** [January 11, 2024, 4:25pm UTC](https://klipper.discourse.group/t/using-octoprints-bed-visualizer-with-klipper/13035/7 "2024-01-11T16:25:15Z")

</div>

What printer do you have?

---

<div class="post-metadata">

**Author:** ![Slartibartfast](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/slartibartfast/32/9538_2.png) [@Slartibartfast](https://klipper.discourse.group/u/Slartibartfast)\
**Post date:** [January 11, 2024, 4:27pm UTC](https://klipper.discourse.group/t/using-octoprints-bed-visualizer-with-klipper/13035/8 "2024-01-11T16:27:20Z")

</div>

It’s a corexy printer by SecKit called the SK-Tank.

It’s not a very well known printer but is meant to be of utmost quality –though I’ve had no end of trouble with it: 😔

---

<div class="post-metadata">

**Author:** ![EddyMI3D](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/eddymi3d/32/1981_2.png) [@EddyMI3D](https://klipper.discourse.group/u/EddyMI3D)\
**Post date:** [January 11, 2024, 4:30pm UTC](https://klipper.discourse.group/t/using-octoprints-bed-visualizer-with-klipper/13035/9 "2024-01-11T16:30:43Z")

</div>

Can you remove the bed surface (magnetic) ?

---

<div class="post-metadata">

**Author:** ![Slartibartfast](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/slartibartfast/32/9538_2.png) [@Slartibartfast](https://klipper.discourse.group/u/Slartibartfast)\
**Post date:** [January 11, 2024, 11:42pm UTC](https://klipper.discourse.group/t/using-octoprints-bed-visualizer-with-klipper/13035/10 "2024-01-11T23:42:13Z")

</div>

> [@EddyMI3D](#):
>
> Can you remove the bed surface (magnetic) ?

Indeed I can.

While removing the surface sheet may give more accurate probing results the thing I’m trying to workout is if the prints are even using the bed mesh data at all though??

---

<div class="post-metadata">

**Author:** ![Slartibartfast](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/slartibartfast/32/9538_2.png) [@Slartibartfast](https://klipper.discourse.group/u/Slartibartfast)\
**Post date:** [January 12, 2024, 5:40am UTC](https://klipper.discourse.group/t/using-octoprints-bed-visualizer-with-klipper/13035/11 "2024-01-12T05:40:32Z")

</div>

The problem I am having is that when the nozzle travels over parts of the first layer after they have been printed it has a tendency to drag that bit free:

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/3/3f4a62c3b7995bb6015729ae28a987b90ac92cf1.jpeg)

The perimeter of that square was laid down perfectly well to begin with but when the nozzle came to pass over it later to “fill it in” it pulled it up on the way over.

After seeing a visualisation of the bed I see that the centre seems to be 0.2mm higher than the front and back, which seems consistent with the problem.

---

<div class="post-metadata">

**Author:** ![Slartibartfast](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/slartibartfast/32/9538_2.png) [@Slartibartfast](https://klipper.discourse.group/u/Slartibartfast)\
**Post date:** [January 12, 2024, 5:41am UTC](https://klipper.discourse.group/t/using-octoprints-bed-visualizer-with-klipper/13035/12 "2024-01-12T05:41:08Z")

</div>

Close up of that middle square:

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/0/0f58135f2d4563601513205d0b4b8f55830b0d95.jpeg)  
(Because new users can only add one image per post)

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [January 12, 2024, 11:40am UTC](https://klipper.discourse.group/t/using-octoprints-bed-visualizer-with-klipper/13035/13 "2024-01-12T11:40:18Z")

</div>

Check if [Axis Twist Compensation - Klipper documentation](https://www.klipper3d.org/Axis_Twist_Compensation.html) brings an improvement.

---

<div class="post-metadata">

**Author:** ![Slartibartfast](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/slartibartfast/32/9538_2.png) [@Slartibartfast](https://klipper.discourse.group/u/Slartibartfast)\
**Post date:** [January 12, 2024, 12:20pm UTC](https://klipper.discourse.group/t/using-octoprints-bed-visualizer-with-klipper/13035/14 "2024-01-12T12:20:50Z")

</div>

Thanks @Sineos

It seems unlikely that I would have axis twist issues.

Really, all I’m wanting to do at this stage is verify that prints are using the mesh provided. If I still have issues after verifying that the mesh is being used then I’ll start looking at what problems there could be with the mesh but at the moment I’m just wanting to simply verify that it’s being used in the first place.

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [January 12, 2024, 1:23pm UTC](https://klipper.discourse.group/t/using-octoprints-bed-visualizer-with-klipper/13035/15 "2024-01-12T13:23:53Z")

</div>

In the last half year the bed mesh topic and its implications have been discussed rather intensively and no indication has been found that

- Klipper does not use a [properly loaded mesh](https://www.klipper3d.org/G-Codes.html#bed_mesh)
- the compensation does not work as intended

On the contrary, it has been identified that often twisted axes or other mechanical issues lead to situations that the algorithm cannot compensate, mainly due to the offset between probe and nozzle.

This offset leads to location-biased effects, e.g. imagine a twisted or distorted axis / linear movement:  
The entire printing carriage is at location A for probing and at location B for printing. If there is a Z relevant difference between the locations A and B then the mesh will not work as expected.

YMMV.

---

<div class="post-metadata">

**Author:** ![Slartibartfast](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/slartibartfast/32/9538_2.png) [@Slartibartfast](https://klipper.discourse.group/u/Slartibartfast)\
**Post date:** [January 12, 2024, 1:27pm UTC](https://klipper.discourse.group/t/using-octoprints-bed-visualizer-with-klipper/13035/16 "2024-01-12T13:27:17Z")

</div>

Sure, that might be the case but I still want to verify that it is actually using the mesh in the first place. Are you saying I’m silly for wanting to verify this?

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [January 12, 2024, 1:30pm UTC](https://klipper.discourse.group/t/using-octoprints-bed-visualizer-with-klipper/13035/17 "2024-01-12T13:30:47Z")

</div>

> [@Slartibartfast](#):
>
> Are you saying I’m silly for wanting to verify this?

On the contrary. I have provided you above with the link to the relevant documentation, with which you can check which mesh is loaded and with what values.  
If the printer is generally using this Z compensation can be easily done via visually inspecting your z-stepper during regular X/Y movements across the bed

---

<div class="post-metadata">

**Author:** ![Slartibartfast](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/slartibartfast/32/9538_2.png) [@Slartibartfast](https://klipper.discourse.group/u/Slartibartfast)\
**Post date:** [January 12, 2024, 2:52pm UTC](https://klipper.discourse.group/t/using-octoprints-bed-visualizer-with-klipper/13035/18 "2024-01-12T14:52:55Z")

</div>

> [@Sineos](#):
>
> On the contrary. I have provided you above with the link to the relevant documentation, with which you can check which mesh is loaded and with what values.

Yes, this is exactly what I am trying to do.

As I say I’ve tried using the commands “Bed Visualiser” suggest, being:

```auto
@BEDLEVELVISUALIZER	; instruct plugin to start recording responses from printer.
BED_MESH_OUTPUT ; report the bed leveling mesh points.

```

As well as the commands @EddyMI3D suggested, being:

```auto
@BEDLEVELVISUALIZER
BED_MESH_OUTPUT PGP=0

```

But these both produce the warning “Bed has not been probed”, which seems suspicious.

I feel like I’m just repeating my first post here but as I say I have also run the commands “BUILD\_MESH” followed by “SAVE\_CONFIG” several times and see a commented 7x7 matrix of values in my printer.cfg but still get “Bed has not been probed” when I run the commands suggested.

This is how I thought it should work but clearly I’m doing something wrong and I am trying to work out what I should be doing differently.

---

<div class="post-metadata">

**Author:** ![EddyMI3D](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/eddymi3d/32/1981_2.png) [@EddyMI3D](https://klipper.discourse.group/u/EddyMI3D)\
**Post date:** [January 12, 2024, 2:56pm UTC](https://klipper.discourse.group/t/using-octoprints-bed-visualizer-with-klipper/13035/19 "2024-01-12T14:56:21Z")

</div>

> [@Slartibartfast](#):
>
> But these both produce the warning “Bed has not been probed”, which seems suspicious.

No, you actively have to run a `bed_mesh_calibration` before.

Or you use the other script I sent.

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [January 12, 2024, 3:03pm UTC](https://klipper.discourse.group/t/using-octoprints-bed-visualizer-with-klipper/13035/20 "2024-01-12T15:03:07Z")

</div>

TBH, I do not care at all what some bed mesh plugin in Octoprint is telling you.

If the console commands return the relevant information, then everything is valid:

 ![grafik](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/3/39afb06f9b11ba0f58381acf2fbcade1739472e6.png)

You only have a default mesh, so it would be

```auto
BED_MESH_PROFILE LOAD="default"

```

[Next page](https://klipper.discourse.group/t/using-octoprints-bed-visualizer-with-klipper/13035.md?page=2)
