Closed jneilliii closed 3 months ago
I've been able to fix file selection, and caught another bug with print command for X1C devices for filesystem_root. Print gets started, but OctoPrint status doesn't pick up the fact printer is printing.
Print seems to nearly instantly complete from OctoPrint's perspective, so I suspect the sd printing status updates for print progress isn't getting started.
2024-08-17 18:42:10,411 - octoprint.printer.standard.job - INFO - Print job selected - origin: sdcard, path: calipe~2.3mf, owner: jneilliii, user: jneilliii
2024-08-17 18:42:13,925 - octoprint.util.comm - INFO - Starting job on behalf of user jneilliii
2024-08-17 18:42:13,925 - octoprint.util.comm - INFO - Changing monitoring state from "Operational" to "Starting print from SD"
2024-08-17 18:42:13,926 - octoprint.printer.standard.job - INFO - Print job started - origin: sdcard, path: calipe~2.3mf, owner: jneilliii, user: jneilliii
2024-08-17 18:42:14,022 - octoprint.plugins.pluginmanager - INFO - Loaded plugin repository data from disk, was still valid
2024-08-17 18:42:14,764 - octoprint.plugins.pluginmanager - INFO - Loaded notice data from disk, was still valid
2024-08-17 18:42:14,770 - octoprint.plugins.tracking - INFO - Sent tracking event print_started, payload: {'origin': 'sdcard', 'file': '59efec78cf9e9e0f7dca95f340dd83b8f9d1aba7'}
2024-08-17 18:42:23,116 - octoprint.plugins.bambu_printer.BambuPrinter.states - INFO - Started print for Caliper_Battery_Saver_with_edge_v7.gcode.3mf
2024-08-17 18:42:23,124 - octoprint.util.comm - INFO - Changing monitoring state from "Starting print from SD" to "Printing from SD"
2024-08-17 18:42:23,614 - octoprint.util.comm - INFO - Changing monitoring state from "Printing from SD" to "Finishing"
2024-08-17 18:42:23,617 - octoprint.printer.standard.job - INFO - Print job done - origin: sdcard, path: calipe~2.3mf, owner: jneilliii
2024-08-17 18:42:23,639 - octoprint.plugins.bambu_printer.BambuPrinter - INFO - command sent successfully
2024-08-17 18:42:23,644 - octoprint.util.comm - INFO - Changing monitoring state from "Finishing" to "Operational"
2024-08-17 18:42:23,652 - octoprint.plugins.achievements - INFO - New achievement unlocked: Sprint!
2024-08-17 18:42:24,090 - octoprint.plugins.tracking - INFO - Sent tracking event print_done, payload: {'origin': 'sdcard', 'file': '59efec78cf9e9e0f7dca95f340dd83b8f9d1aba7', 'elapsed': 9}
Didn't notice this during testing of the refactor by @Valemos but file selection is broken. OctoPrint sends the M23 command with the 8dot3 filename of the file selected in the user interface. Haven't dug deep enough yet, but I suspect it's because these aren't in the file list cache keys the way they were before. Previously the 8dot3 key would be assigned as a string value, which would be detected on file selection and if it was string would then return the dictionary/file_info of the result of the full filename key.
https://github.com/jneilliii/OctoPrint-BambuPrinter/blob/8e3eb9c64be6d6334790da632720c9d395262aef/octoprint_bambu_printer/virtual.py#L734-L736