In my plugin PrintJobHistory I implemented a feature to take a snapshot after a specific M117 command was executed.
It looks like that this feature did not work, see M117 Snap Not Taking a Snapshot · Issue #123 · OllisGit/OctoPrint-PrintJobHistory · GitHub
It does not take the picture until the bed and gantry have moved to the final position.
I use the "octoprint.comm.protocol.gcode.sent" hook and it listen for a specific M117 command:
If the command reached, I started a new thread to take a picture...the picture is taken succesful, but too late.
I know that are a couple of caches/buffers involved and also the thread of the camera could also be an issue. But what do you think, is is possible to implement such feature?
Btw. in the next Plugin-Release I will change the hook to:
octoprint.comm.protocol.gcode.sending ...maybe it makes a difference.