TFyre / bambu-farm

Bambulab Web interface for multiple printers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

printers do not show idle

Jostxxl opened this issue · comments

Hello there,
thanks so far for this awesome interface.
We are in the middle of setting it up but ran into a problem with batch printing.
Most printers do not show idle in the list although they are idling.
They show local or cloud even though they have no active print.
We tried to force the stop and request full status but it didnt work.

Any ideas what this might cause?

This is the only related error i could see:
`2024-02-28 01:24:15,284 ERROR [com.tfy.bam.pri.BambuPrinterStream] (vert.x-eventloop-thread-2) 899 Killian: clientFailure: io.netty.channel.AbstractChannel$AnnotatedConnectException - Connection refused: getsockopt: /192.168.188.43:6000

2024-02-28 01:30:23,455 ERROR [com.tfy.bam.vie.das.DashboardPrinter] (executor-thread-221) 437 Marlise: Cannot parseInt []`

  • Looks like you have multiple ERRORs (exceptions) in the application log, can you perhaps include all exceptions with stack traces?

  • io.netty.channel.AbstractChannel$AnnotatedConnectException - Connection refused: getsockopt: /192.168.188.43:6000
    This means it cant connect to the printer for the live view image. What model printer is this? Assuming its X1C, you need to enable liveview: https://github.com/TFyre/bambu-farm/tree/main/docker/bambu-liveview

  • printers do not show idle
    Can you please specify which model of printer you are using and include a sample of the RAW log?

From the frontend goto logs and find a "big" entry, the size is after the time. You can mask any sensitive information.
image

Im working together with Jostxxl and ill be answering your topics.

  1. Thats the thing. There are no handled or unhandled exceptions. No stacktraces i could see.
  2. I suspected that and therefore ignored it. We dont need liveview right now although it is enabled in our printers. I could get rid of this constant logging by halfway enabling it. (only adding .live-view-url, .live-view and .url to the .env) It doesnt show the feed but it does not spam anymore. I have no experience in java compiling/programming. Does the guide for docker/bambu-liveview imply that i have to compile by myself and cannot use the compiled release?
  3. Right now we only have X1C printers connected for testing.

Here is the RAW log:
{ "print" : { "ams" : { "ams" : [ ], "ams_exist_bits" : "0", "insert_flag" : true, "power_on_flag" : false, "tray_exist_bits" : "0", "tray_is_bbl_bits" : "0", "tray_now" : "254", "tray_pre" : "254", "tray_read_done_bits" : "0", "tray_reading_bits" : "0", "tray_tar" : "255", "version" : 2 }, "ams_rfid_status" : 6, "ams_status" : 0, "aux_part_fan" : true, "bed_target_temper" : 0.0, "bed_temper" : 19.0, "big_fan1_speed" : "0", "big_fan2_speed" : "0", "cali_version" : 0, "chamber_temper" : 25.0, "command" : "push_status", "cooling_fan_speed" : "0", "fail_reason" : "0", "fan_gear" : 0, "filam_bak" : [ ], "force_upgrade" : false, "gcode_file" : "", "gcode_file_prepare_percent" : "0", "gcode_start_time" : "0", "gcode_state" : "IDLE", "heatbreak_fan_speed" : "0", "hms" : [ ], "home_flag" : 114696, "hw_switch_state" : 1, "ipcam" : { "ipcam_dev" : "1", "ipcam_record" : "disable", "mode_bits" : 2, "resolution" : "720p", "rtsp_url" : "rtsps://192.168.0.84/streaming/live/1", "timelapse" : "disable", "tutk_server" : "disable" }, "layer_num" : 0, "lifecycle" : "product", "lights_report" : [ { "mode" : "on", "node" : "chamber_light" }, { "mode" : "flashing", "node" : "work_light" } ], "maintain" : 131075, "mc_percent" : 0, "mc_print_error_code" : "0", "mc_print_stage" : "1", "mc_print_sub_stage" : 0, "mc_remaining_time" : 0, "mess_production_state" : "active", "msg" : 0, "nozzle_diameter" : "0.4", "nozzle_target_temper" : 0.0, "nozzle_temper" : 22.0, "nozzle_type" : "hardened_steel", "online" : { "ahb" : false, "ext" : false, "version" : 7 }, "print_error" : 0, "print_gcode_action" : 0, "print_real_action" : 0, "print_type" : "", "profile_id" : "", "project_id" : "", "queue_est" : 0, "queue_number" : 0, "queue_sts" : 0, "queue_total" : 0, "s_obj" : [ ], "sdcard" : false, "sequence_id" : "117", "spd_lvl" : 2, "spd_mag" : 100, "stg" : [ ], "stg_cur" : -1, "subtask_id" : "", "subtask_name" : "", "task_id" : "", "total_layer_num" : 0, "upgrade_state" : { "ahb_new_version_number" : "", "ams_new_version_number" : "", "consistency_request" : false, "dis_state" : 1, "err_code" : 0, "ext_new_version_number" : "", "force_upgrade" : false, "idx" : 7, "message" : "", "module" : "null", "new_version_state" : 1, "ota_new_version_number" : "01.07.02.00", "progress" : "0", "sequence_id" : 0, "sn" : "00M00A2XXXXXX", "status" : "IDLE" }, "upload" : { "file_size" : 0, "finish_size" : 0, "message" : "Good", "oss_url" : "", "progress" : 0, "sequence_id" : "0903", "speed" : 0, "status" : "idle", "task_id" : "", "time_remaining" : 0, "trouble_id" : "" }, "vt_tray" : { "bed_temp" : "0", "bed_temp_type" : "0", "cali_idx" : -1, "cols" : [ "00000000" ], "ctype" : 0, "drying_temp" : "0", "drying_time" : "0", "id" : "254", "nozzle_temp_max" : "0", "nozzle_temp_min" : "0", "remain" : 0, "tag_uid" : "0000000000000000", "tray_color" : "00000000", "tray_diameter" : "0.00", "tray_id_name" : "", "tray_info_idx" : "", "tray_sub_brands" : "", "tray_type" : "", "tray_uuid" : "00000000000000000000000000000000", "tray_weight" : "0", "xcam_info" : "000000000000000000000000" }, "wifi_signal" : "-62dBm", "xcam" : { "allow_skip_parts" : false, "buildplate_marker_detector" : true, "first_layer_inspector" : true, "halt_print_sensitivity" : "medium", "print_halt" : true, "printing_monitor" : true, "spaghetti_detector" : true }, "xcam_status" : "0" } }

and this is how constant status updates look:
{ "print" : { "bed_temper" : 19.0, "command" : "push_status", "msg" : 1, "sequence_id" : "119", "t_utc" : 1709118102845 } }
msg stays 1 during idle and sequence_id is always changing along with time and temperature.

  1. no, you dont have to compile anything, just need to edit the docker compose file and list all the printers... It acts as a media streaming service since you only have 1x liveview stream per printer. With this, you can have multiple viewers (printer -> mediamtx -> multiple people observing the printer)

Let me know if you need help setting up the docker environment! happy to help!

  1. The RAW output has "print_type" : "" in it... I was expecting idle to be in there... I will have to find a different "trigger" to sense if the printer is done printing

Please test with https://github.com/TFyre/bambu-farm/releases/tag/v1.1.0

idle status works now!
However, i ran into some other problems:

Whenever i want to batch start a print, it shows queued in green but the printer throws an error:

image
image

And another occurrence:
When i forcefully stop(in dashboard) a started print(manually), the printer stops and goes to an unrecoverable failed state. (Only in dashboard, printer is fine and idle again after i acknowledge the stopped print)
The printer then is in status failed and clearing the faults via dashboard, clearing the fault on the printer, refresh the page or restart the whole application does not clear the failed status in the dashboard. Only turning off and on the printer brings it back to idle.

This is the RAW after this occurrence:
{ "print" : { "ams" : { "ams" : [ ], "ams_exist_bits" : "0", "insert_flag" : true, "power_on_flag" : false, "tray_exist_bits" : "0", "tray_is_bbl_bits" : "0", "tray_now" : "254", "tray_pre" : "254", "tray_read_done_bits" : "0", "tray_reading_bits" : "0", "tray_tar" : "254", "version" : 6 }, "ams_rfid_status" : 6, "ams_status" : 0, "aux_part_fan" : true, "bed_target_temper" : 0.0, "bed_temper" : 22.0, "big_fan1_speed" : "0", "big_fan2_speed" : "0", "cali_version" : 0, "chamber_temper" : 26.0, "command" : "push_status", "cooling_fan_speed" : "0", "fail_reason" : "50348044", "fan_gear" : 0, "filam_bak" : [ ], "force_upgrade" : false, "gcode_file" : "/data/Metadata/plate_1.gcode", "gcode_file_prepare_percent" : "100", "gcode_start_time" : "1709153713", "gcode_state" : "FAILED", "heatbreak_fan_speed" : "0", "hms" : [ ], "home_flag" : 114696, "hw_switch_state" : 1, "ipcam" : { "ipcam_dev" : "1", "ipcam_record" : "enable", "mode_bits" : 2, "resolution" : "720p", "rtsp_url" : "rtsps://192.168.0.194/streaming/live/1", "timelapse" : "disable", "tutk_server" : "disable" }, "layer_num" : 0, "lifecycle" : "product", "lights_report" : [ { "mode" : "on", "node" : "chamber_light" }, { "mode" : "flashing", "node" : "work_light" } ], "maintain" : 131075, "mc_percent" : 0, "mc_print_error_code" : "0", "mc_print_stage" : "1", "mc_print_sub_stage" : 0, "mc_remaining_time" : 63, "mess_production_state" : "active", "msg" : 0, "nozzle_diameter" : "0.4", "nozzle_target_temper" : 0.0, "nozzle_temper" : 30.0, "nozzle_type" : "hardened_steel", "online" : { "ahb" : false, "ext" : false, "version" : 7 }, "print_error" : 0, "print_gcode_action" : 2, "print_real_action" : 0, "print_type" : "cloud", "profile_id" : "54331126", "project_id" : "55299005", "queue_est" : 0, "queue_number" : 0, "queue_sts" : 0, "queue_total" : 0, "s_obj" : [ ], "sdcard" : false, "sequence_id" : "665", "spd_lvl" : 2, "spd_mag" : 100, "stg" : [ 2, 14, 1 ], "stg_cur" : -1, "subtask_id" : "108456565", "subtask_name" : "Upper_Plate", "task_id" : "108456564", "total_layer_num" : 50, "upgrade_state" : { "ahb_new_version_number" : "", "ams_new_version_number" : "", "consistency_request" : false, "dis_state" : 1, "err_code" : 0, "ext_new_version_number" : "", "force_upgrade" : false, "idx" : 7, "message" : "", "module" : "null", "new_version_state" : 1, "ota_new_version_number" : "01.07.02.00", "progress" : "0", "sequence_id" : 0, "sn" : "00M00A280100294", "status" : "IDLE" }, "upload" : { "file_size" : 0, "finish_size" : 0, "message" : "Good", "oss_url" : "", "progress" : 0, "sequence_id" : "0903", "speed" : 0, "status" : "idle", "task_id" : "", "time_remaining" : 0, "trouble_id" : "" }, "vt_tray" : { "bed_temp" : "0", "bed_temp_type" : "0", "cali_idx" : -1, "cols" : [ "FFFFFFFF" ], "ctype" : 0, "drying_temp" : "0", "drying_time" : "0", "id" : "254", "nozzle_temp_max" : "220", "nozzle_temp_min" : "190", "remain" : 0, "tag_uid" : "0000000000000000", "tray_color" : "FFFFFFFF", "tray_diameter" : "0.00", "tray_id_name" : "", "tray_info_idx" : "GFA00", "tray_sub_brands" : "", "tray_type" : "PLA", "tray_uuid" : "00000000000000000000000000000000", "tray_weight" : "0", "xcam_info" : "000000000000000000000000" }, "wifi_signal" : "-63dBm", "xcam" : { "allow_skip_parts" : false, "buildplate_marker_detector" : true, "first_layer_inspector" : true, "halt_print_sensitivity" : "medium", "print_halt" : true, "printing_monitor" : true, "spaghetti_detector" : true }, "xcam_status" : "0" } }

I believe this is the related print command response:
{ "print" : { "ams_mapping" : [ 254 ], "bed_levelling" : true, "bed_type" : "auto", "command" : "project_file", "file" : "", "flow_cali" : true, "layer_inspect" : true, "md5" : "", "param" : "Metadata/plate_1.gcode", "profile_id" : "0", "project_id" : "0", "reason" : "ERROR STATE", "result" : "FAIL", "sequence_id" : "4", "subtask_id" : "0", "subtask_name" : "Upper_Plate.gcode", "task_id" : "0", "timelapse" : true, "url" : "file:///sdcard/Upper_Plate.gcode.3mf", "use_ams" : true, "vibration_cali" : true } }

And this the status after failed:
{ "print" : { "command" : "push_status", "msg" : 1, "print_error" : 83902466, "sequence_id" : "10", "t_utc" : 1709155579523 } }

I really appreciate your work and your fast response, thank you!