4 Commits

Author SHA1 Message Date
github-actions[bot]
2c7d6b8dba chore: bump version to 0.1.9 [skip ci] 2026-06-24 13:54:49 +00:00
RNL
0a1da46d1f Fix filaments card empty for pre-multi-AMS data (ams_unit_id=NULL rows now render in a fallback group). Resolve Dockerfile stash conflict. 2026-06-24 23:54:31 +10:00
github-actions[bot]
4c01b3d909 chore: bump version to 0.1.8 [skip ci] 2026-06-24 13:14:43 +00:00
RunLit
146d5af7aa Feature/multi printer support (#12)
* Initial implementation of multi-printer support.

* Always show device dropdown and add bambu_diagnose for multi-printer troubleshooting.

* Add multi-AMS support: per-unit snapshot/usage tracking, grouped dashboard panels with real type labels, and dual-nozzle card UX fixes. Fixes a real-world AMS info-code parsing bug found by inspecting live H2C data.

* Add Vortek hotend rack tracking: per-SN registry with slot mapping confirmed against live MQTT capture, plus a fallback for non-inductive nozzles (e.g. H2C's fixed left nozzle) shown read-only without fabricated identity. New dashboard card hides entirely on printers with no Vortek/nozzle-info data at all.
2026-06-24 23:14:32 +10:00
3 changed files with 18 additions and 5 deletions

View File

@@ -22,19 +22,20 @@ RUN pip install --no-cache-dir bambu-lab-cloud-api --no-deps && \
(d / 'INSTALLER').write_text('pip\n'); \
(d / 'RECORD').write_text('')"
# Install project and remaining dependencies (pip sees opencv-python already satisfied)
# Install standalone dependencies first — cached unless pyproject.toml changes
COPY pyproject.toml .
RUN pip install --no-cache-dir ".[standalone,mcp]"
# Copy application code
# Copy full source and install the local package (no-deps: already installed above)
COPY . .
RUN pip install --no-cache-dir --no-deps .
# Create data directory for SQLite
RUN mkdir -p /app/data
# Collect static files
# Collect static files from the locally installed package
ENV DJANGO_SETTINGS_MODULE=standalone.settings
RUN python standalone/manage.py collectstatic --noinput 2>/dev/null || true
RUN python standalone/manage.py collectstatic --noinput
# Supervisor config to run both web and collector
COPY docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf

View File

@@ -175,10 +175,22 @@ class PrinterDashboardView(LoginRequiredMixin, TemplateView):
# Group trays by physical AMS unit for the panel-style dashboard layout —
# one tinted panel per unit, full-width for multi-slot units (AMS/AMS 2 Pro),
# compact for single-slot units (AMS HT) so several can flow side-by-side.
# Filaments with ams_unit_id=None (pre-multi-AMS rows) fall into a single
# unlabelled group so they still render rather than being silently dropped.
units_meta = {
u.get('unit_id'): u for u in (latest_metric.ams_units or [])
}
ams_groups = []
ungrouped = [f for f in filaments_list if f.get('ams_unit_id') is None]
if ungrouped:
ams_groups.append({
'unit_id': None,
'ams_type': '',
'label': 'AMS',
'humidity': None,
'temp': None,
'filaments': ungrouped,
})
for uid, label in sorted(seen_units.items()):
unit_meta = units_meta.get(str(uid), {})
ams_groups.append({

View File

@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "bambu-run"
version = "0.1.7"
version = "0.1.9"
description = "Django reusable app for Bambu Lab 3D printer monitoring and filament inventory management"
readme = "README.md"
license = {text = "MIT"}