Ender 3 BLTouch Octoprint Z-Offset

I have installed a BLTouch and updated the Z-offset (now -3.88). It works great.
I use G29 in my Cura slicer and while using gcode files from an SD card things work perfectly.
I have now tried Octoprint. It connects perfectly to the printer, but when I try to print the nozzle seems to be about 2mm too high and hence the filament does not stick to the bed.
I have tried the ABL expert plugin, and set the Z offset to -3.88 and also 3.88, but the nozzle is still too high.
I would be very grateful if someone could tell me what silly mistake I am making.

Hi
is the z-offset configured in printer firmware (and saved)?
You can check that with M503 and look for M851 X... Y... Z-3.88

Further do you have anything special in OctoPrint - Settings - Gcode scripts?

Otherwise pls provide the logs of the print, so the commands executed will be visible.

Thank you.
I have checked the M503 and it does return Z-3.88, so that part seems to be working.
I don’t have any Gcode scripts in Octoprint, except for cancelled prints. My Gcode is generated in Cura, and I have added G29 in the start code there, so the BLTouch does it’s full 5x5 mesh check before every print.
Should I have this code in the start script in Octoprint instead?
I will try to find the log from Octoprint.
Thanks again.

having G29 after G28 in cura is just fine. was wondering if anything there would interfere.

I fixed the problem by trying different Z offsets in ABL Expert until it worked. It seems that Z offset -4.05 in ABL expert works well with Octoprint, whereas -3.88 works with SD card.
I’m not sure why

head z-offset is a machine setting, not a printing or interface setting. it should be same.
There is something else interfering here.

Thank you Seb,

I am attaching the Cura start code and also a log of a print that worked correctly.
This is the start Gcode that I am using in Cura:-

; Ender 3 Custom Start G-code
M140 S{material_bed_temperature_layer_0} ; Set Heat Bed temperature
M190 S{material_bed_temperature_layer_0} ; Wait for Heat Bed temperature
M104 S160; start warming extruder to 160
G28 ; Home all axes
G29 ;
G92 E0 ; Reset Extruder
M104 S{material_print_temperature_layer_0} ; Set Extruder temperature
G1 X0.1 Y20 Z0.3 F5000.0 ; Move to start position
M109 S{material_print_temperature_layer_0} ; Wait for Extruder temperature
; G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
G1 X0.1 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line
G1 X0.4 Y200.0 Z0.3 F5000.0 ; Move to side a little
G1 X0.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line
G92 E0 ; Reset Extruder
G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
; End of custom start GCode

Looks ok

This line should not be there / uncommented: if you do, the nozzle priming will be to far from bed.

Have all the same issues.
I understand the separation of tools and GCODE to operate the BLTouch add-on but I am getting killed on the Octoprint/Local Config whereby my configured z-offset gets reset when I use Octoprint. I installed bed level visualizer and boom reset. I can't deal.

I'm loading NON-BLTouch firmware, enjoying my silent 4.2.7 board and calling it a day.