πŸ‡ΊπŸ‡¦ We stand with Ukraine! πŸ‡ΊπŸ‡¦

New Plugin: Bed Ready

I've made a new plugin that can potentially save you from disaster.

Utilizing OpenCV the new Bed Ready plugin will capture a snapshot on print start and compare it to a Reference Image created from the plugin's settings.

If the comparison match between the two snapshot's is less than the configured Match Percentage the print will be paused and wait to be resumed or cancelled.

image

6 Likes

Such a straightforward idea, finally well executed.

Perhaps it could be interesting to configure an optional gcode snippet to "present" the bed (eg move the bed to a certain position where it is visible in its entirety, turn on lighting).

2 Likes

Yeah, I thought of that but when I started programming it I realized if there's something on the bed and you home with bed leveling and z_safe_homing your nozzle would crash into the part. One work around is to use the before print starts and/or after print ends gcode scripts in octoprint to add positioning if necessary.

post removed

Curious, why is the at command needed? Why not just hook into beforePrintStarted?

Would job_on_hold work in beforePrintStarted because technically the job hasn't actually started. Wasn't even aware of that event really (only see PrintStarted). Other question was if pausing a print that hasn't started is possible or not.

I knew 100% that the at command approach would work and give control of the process to the user on a per print basis so they could decide to process or not per file. I could add a flag for that as well I suppose and toggle the way I do idle timer in TPLink SmartPlug/Tasmota plugins from the sidebar/navbar.

Good question. Worth finding out :slight_smile:

Instead of the event I was suggesting using the octoprint.comm.protocol.scripts hook to catch beforePrintStarted and do the magic. See this

yeah, I was just reading the docs after searching for beforePrintStarted. would be a good exercise to know if either of those potential issues are actually issues or not.