Reviving the dockable_probe

i had to go back to ah klipper commit from 5. April 24 (01c7befacb5b71643130433f2afb3f22ece68d71) until i had ah working machine again now… with the commit i thougt before its fixed again with the original dockable_probe from mental, klipper started but failed quile QGL

"Internal error on command. “BASE_QUAD_GANRTY_LEVEL”

looks like somechanges after the adding of eddy_probe and changes to probe breaks the dockable_probe allready :frowning:

i might just never update again anymore, propably doesn’t fix any issues anyway as long as everthing is running fine

Looks like you’ve got a lot of things changing there. This module is not compatible with mental’s, as you’ve discovered. I would recommend picking one and sticking to it while troubleshooting otherwise it will add to the confusion. (FWIW I’m not sure mental’s has been updated since the Klipper probe changes, but maybe within DangerKlipper it has.)

If I were you, I’d update everything through the web UI, then go back through the guide for this module. With that internal error, there’s a misconfiguration causing:

self.toolhead.manual_move([None, None, self.approach_position[2]],
IndexError: list index out of range

That’s trying to move to a Z location. Going through the aforementioned guide will help.

Please post the full Klipper log, it contains helpful info on troubleshooting, like the complete printer config.

Didn’t realize there was an active topic on this here. Unfortunate to return to find this still hasn’t been merged, but oh well.

Anyway, I have been rebuilding my printer into its near-final form and soon will be setting up the probe again, and I want to make sure I am doing it in the most up-to-date way possible in terms of setup and usage.

By setup I mean the actual installation - previously I was just downloading dockable_probe.py and dropping it in the klippy/extras folder, which isn’t ideal since it makes git get upset at the untracked file. So curious the most clean way to do that.

For the physical side, I have an unusual implementation - not an actual dockable probe per se but rather a pin that’s held up by a magnet and then deployed by moving into a set of tines to pull it out of reach of the magnet. So in terms of the motions it goes through, it’s basically the same as a dockable one. The exception being for stowing where it can just lower past the trigger point anywhere on the bed, and the magnet grabs the pin again.

I discussed this previously on the dormant PR thread but it’s probably better suited for here. Here’s the config I was using for it before, mostly just for reference:

[dockable_probe]
pin: !gpio15
x_offset: 0
y_offset: 41
speed: 10
lift_speed: 12
travel_speed: 250
attach_speed: 100
detach_speed: 100
check_open_attach: True
dock_position: 4, 232
approach_position: 4, 207
detach_position: 0, 0 # not used
z_hop: 15

### Dockable probe overrides ###

# We stow the probe by dropping Z below the pickup threshold so some macros are just skipped
[gcode_macro _PROBING_VARS]
variable_dock_return_skip: 0
gcode:

[gcode_macro MOVE_TO_INSERT_PROBE]
rename_existing: _MOVE_TO_INSERT_PROBE
gcode:
    SET_GCODE_VARIABLE MACRO=_PROBING_VARS VARIABLE=dock_return_skip VALUE=1

[gcode_macro MOVE_TO_DOCK_PROBE]
rename_existing: _MOVE_TO_DOCK_PROBE
gcode:
    # Only do dock move for probe approach
    {% if printer["gcode_macro _PROBING_VARS"].dock_return_skip == 0 %}
        _MOVE_TO_DOCK_PROBE
    {% endif %}

[gcode_macro MOVE_TO_DETACH_PROBE]
rename_existing: _MOVE_TO_DETACH_PROBE
gcode:
    SET_GCODE_VARIABLE MACRO=_PROBING_VARS VARIABLE=dock_return_skip VALUE=0
    G90
    G1 Z0.5
    G1 Z10

All of this worked fine - it just feels like a kludge, and I always wondered if there was a better, cleaner way to do it.

I can confirm that commit f25f1b4 works with klipper v0.12.0-317-gb89d5523

Now I need to revisit what happens after docking, as moving the tool head to the last position directly when that was the last bed mesh point cleans the probe right off the dock!

The features of being able to leave the probe attached will be nice for z_calibration followed by BED_MESH_CALIBRATE

Thank you for all your work bringing the dockable probe up to date!

If the probe is getting yanked out of the dock as the toolhead goes by, look at changing where the detach position is (maybe other side of the dock). If that fails, overwrite the extract macro (see the module docks) to include an extra G1 to move further from the dock (sometimes detaching in an L is better, sideways and then over the bed).

Agreed! Those are good ways to solve it, thanks.

I ended up doing the macro overwrite and added the L shaped path, call the original detach and then move forward enough so just about any position is safe to travel.

I appreciate you fixing up the plugin so it works again! I have little desire to go though a mod for Euclid or Klicky, the Quickdraw is pretty great!

1 Like

I think I’m missing something obvious. Is there a good guide for setting up dockable probe? I got the error “Section ‘dockable_probe’ is not a valid config section” so I changed my repo in Kiauh to cloakedcode/klipper and ran through the switch repo script. I still get the non valid config section error though. Could someone spoon feed me please or point to a place where the spoon feeding has happened?
Thank you!

Hi there, welcome!

You’re looking for what Moonraker terms “extensions” and has docs to keep the code up to date:

https://moonraker.readthedocs.io/en/latest/configuration/#update_manager

The initial setup:

  • clone the cloakedcode/klipper repo beside your primary klipper directory
  • ‘git checkout work-annex-probe’ to switch the git repo to the branch with the right code
  • symlink the dockable_probe.py file into the klipper directory
  • then restart klipper.

For similar steps of a different plugin:

(There are no install docs for dockable_probe because it was always the expectation that it would get merged into Klipper.)

1 Like

Hey thanks a ton, I would have never gotten that on my own! I’ve got the probe mounted on the gantry of the X axis of my Tevo Tarantula and I’m using the bed to “scrape” the probe off. Is there a way to get it to raise the z up after its done detaching? The z_hop is giving me an error.

You’ll need to overwrite the MOVE_TO_DETACH_PROBE gcode macro to call the existing macro and then Z up. (See the docs linked in the OP.)

1 Like

Thanks again for your help. After some googling and your docs, I’ve added the lines below to my cfg and it detaches and moves up as expected and desired but then it returns to a point close to 0, 0, ~5. Is this related to the dockable_probe or is this a default in Klipper?

[gcode_macro MOVE_TO_DETACH_PROBE]
rename_existing: MOVE_TO_DETACH_PROBE_1
gcode:
  MOVE_TO_DETACH_PROBE_1
  G90
  G1 Z25

Please put your code into Preformatted Text. Thank you.

Format

2 Likes

That’s the behavior of the module. It returns to the point previous to the attach/detach request. This makes it seamless when running bed meshing, tilt adjustments, etc. Run an additional G1 after whatever triggered the probing to push the toolhead further from the bed (or if this is bed meshing, the z_hop config option of bed_mesh should result in the toolhead returning to a set position).

Ok that makes sense, I’ll just do a homing override. Thank you for all of your help!

Hello. I have been using dockable_probe.py for some time and it has been great. I recently updated Klipper and now get the following error:

Internal error during connect: init() missing 1 required positional argument: ‘start_session_cb’

My logs indicate some issue with dockable_probe.py.

Unhandled exception during connect
Traceback (most recent call last):
  File "/home/pi/klipper/klippy/klippy.py", line 130, in _connect
    self._read_config()
  File "/home/pi/klipper/klippy/klippy.py", line 123, in _read_config
    self.load_object(config, section_config.get_name(), None)
  File "/home/pi/klipper/klippy/klippy.py", line 112, in load_object
    self.objects[section] = init_func(config.getsection(section))
  File "/home/pi/klipper/klippy/extras/dockable_probe.py", line 640, in load_config
    dockable_probe = DockableProbe(config)
  File "/home/pi/klipper/klippy/extras/dockable_probe.py", line 215, in __init__
    self.probe_session = probe.ProbeSessionHelper(config, self)
TypeError: __init__() missing 1 required positional argument: 'start_session_cb'

I am unable to determine what broke. Is there an updated dockable_probe.py?

Any help would be appreciated.

BTW…I am using the latest from June 24, 2024.

Last night, i also updated klipper and now have the exact error:

Internal error during connect: init() missing 1 required positional argument: ‘start_session_cb’

@Sid any news on how to fix it?

Back on April 18 it looks like a number of changes were made to rearrange the probing code again.

This breaks the dockable probe code until I can get to it, and I’m afk for the weekend. A temporary workaround would be to downgrade Klipper to an earlier version (e.g. 11f04ba should work).

2 Likes

I’ve pushed a bug fix for those breaking changes mentioned in the other post. ^

Please update your local copy. The changes are backwards compatible so they won’t break on earlier versions of Klipper.

1 Like