No, not offhand. There are filament monitors which might serve this purpose.
Or, install a Z max endstop and have the printer home Z max when a print is finished. You'd tie that in to the connector on the motherboard but also tie into that electrically so that your external whatever knows that the print has finished. It won't know that it has failed should that happen.