mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-08-11 00:30:12 -04:00
An H2D armed five 12-hour drying cycles inside four hours, one of them six seconds after the previous one ended, and none ran more than a couple of hours. Two things combine. The firmware ends a cycle when it decides the filament is dry rather than when the clock runs out, and reports no fault doing it -- across this printer's history the run length tracks how wet the spools were, from nearly the full 12 hours starting at 32% down to minutes once the unit sat at 10-13%. That part is the AMS doing its job. The loop is ours. An AMS reports higher relative humidity while it is warm than once it has cooled: the same unit read 10-13% cold and 15-20% through every cycle. With the threshold at 14% the reading at the moment a cycle ended was always still above it, so the next 30-second pass armed another 12-hour cycle. Nothing counted, nothing waited, and it only stopped when the box finally cooled enough to read 13%. Auto-drying now waits 30 minutes after a cycle ends before arming another on the same unit, and gives up on a unit after two consecutive cycles that bring the reading no lower -- logging why and sending a new notification, on by default because it reports that Bambuddy has stopped acting. Progress is judged against the lowest reading any cycle on that unit has ended at, not against the threshold, so a genuinely wet spool in a humid room coming down 40-37-35 keeps drying however far it still is from the target; comparing against the best so far rather than the previous end stops a sensor wobbling by one point reading as progress every other cycle. The suspension lifts by itself once the reading falls below the threshold. Neither guard can stop a running cycle, and a cycle Bambuddy cut short for a print, or that the user stopped by hand, is not counted against the unit -- so a farm that dries between queue jobs is unaffected. The threshold field now warns below 20%, and every cycle end logs the unit's temperature and humidity, which is what made this diagnosable. The same bundle showed unrelated tasks failing with "database is locked", each inside a 30.000-second Discord connect timeout. Alarms are raised from inside the loop that records sensor history, at a point where the new rows are added but not committed; the first read in the notification path flushed them to satisfy itself, opening a write transaction, and the provider was then contacted over the network with that transaction still open. SQLite allows one writer and 30 seconds outlives the 15-second busy timeout, so every other write in that window failed. The two reads that run before a provider is contacted no longer flush the caller's pending work, and the connect timeout is 5 seconds rather than 30 -- the body keeps the full 30, so image uploads on a slow uplink are unaffected. SQLite only; Postgres has no single-writer limit. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| active_print_spoolman.py | ||
| ams_history.py | ||
| ams_label.py | ||
| api_key.py | ||
| archive.py | ||
| auth_ephemeral.py | ||
| bug_report.py | ||
| color_catalog.py | ||
| external_link.py | ||
| filament.py | ||
| filament_sku_settings.py | ||
| finance.py | ||
| github_backup.py | ||
| group.py | ||
| kprofile_note.py | ||
| library.py | ||
| local_preset.py | ||
| location.py | ||
| long_lived_token.py | ||
| maintenance.py | ||
| notification.py | ||
| notification_template.py | ||
| oidc_provider.py | ||
| orca_base_cache.py | ||
| pending_upload.py | ||
| pipeline_run.py | ||
| print_batch.py | ||
| print_log.py | ||
| print_queue.py | ||
| printer.py | ||
| printer_ha_sensor.py | ||
| printer_sensor_history.py | ||
| project.py | ||
| project_bom.py | ||
| settings.py | ||
| shopping_list.py | ||
| slicer_pipeline.py | ||
| slot_preset.py | ||
| smart_plug.py | ||
| smart_plug_energy_snapshot.py | ||
| sponsor_toast_state.py | ||
| spool.py | ||
| spool_assignment.py | ||
| spool_catalog.py | ||
| spool_k_profile.py | ||
| spool_usage_history.py | ||
| spoolbuddy_device.py | ||
| spoolman_k_profile.py | ||
| spoolman_slot_assignment.py | ||
| user.py | ||
| user_email_pref.py | ||
| user_otp_code.py | ||
| user_totp.py | ||
| virtual_printer.py | ||