diff --git a/esphome/bambu-display/README.md b/esphome/bambu-display/README.md index 7038926..de26f1c 100644 --- a/esphome/bambu-display/README.md +++ b/esphome/bambu-display/README.md @@ -25,12 +25,16 @@ The configured swipe order is: Swipe left for the next printer or right for the previous printer. Navigation wraps from the last page to the first. Previous/Next buttons provide the same navigation. -Swipes propagate through the metric cards and filament slots. A swipe consumes the +Swipes propagate through the arc gauges and filament slots. A swipe consumes the rest of that touch so dragging across a navigation button does not also click it. Each page shows print status, job name, progress, nozzle and bed current/target -temperatures, remaining time, current/total layers, print stage, part fan speed and -filament colors/types. The active filament slot has a green outline. Print errors +temperatures, remaining time, estimated finish time, current/total layers, print +stage, fan speeds and filament colors/types. The layout follows BambuHelper's +classic gauges: black background, bright green accents, six arc gauges and a +vertical AMS column. Nozzle arcs are orange and the bed arc is cyan. For dual-nozzle +printers the auxiliary-fan position becomes the right-nozzle gauge. The active +filament slot has a green outline. Print errors and HMS alerts change the status badge to red; paused prints use amber. The display shows an alert badge rather than the detailed HMS diagnostic text. @@ -39,6 +43,10 @@ to `--` rather than continuing to show cached values as live. Unknown individual values also show `--`. Remaining time respects the HA sensor's `h`, `min` or `s` unit, and temperature labels use the imported HA temperature unit. Only the visible page is refreshed each second; every printer's subscriptions remain connected. +Auxiliary and exhaust fans are imported only for printers with those sensors; +unsupported fan readings show `--`. Finish time is estimated from HA's remaining +time and the HA-synchronized clock. Set `time.timezone` in the main YAML if your +timezone differs from `America/New_York`. This version provides monitoring and local page navigation. Camera feeds, cover images, printer pause/stop controls, power switching, cloud login and automatic @@ -67,6 +75,18 @@ this board. If GT911 is not found at `0x5D`, inspect the I²C scan and use its r address (some hardware revisions select `0x14`). Backlight is GPIO2; RGB data pins and timings are explicit in the main YAML rather than borrowed from a 5″ board. +The display and LVGL both use **big-endian RGB565**. With `mipi_rgb`'s named +`red`/`green`/`blue` pin groups, its generated bus pin map already exchanges the +two bytes. Selecting little-endian pixels corrupts colors on the physical panel +even though a host preview can look correct. Keep both byte-order settings aligned +with the bus mapping; changing the RGB/BGR label alone is insufficient for this +RPI panel's direct framebuffer path. + +To check the physical colors, open the device's **Display Color Test** diagnostic +button in Home Assistant. It shows labeled red, green, blue, white, cyan and magenta +blocks. Swipe to return to the printers. This test page is skipped during normal +printer navigation. Its expected image is [previews/color_test.png](previews/color_test.png). + CLI checks from the repository root: ```sh @@ -106,7 +126,8 @@ is also tested with seven. Each printer's filament strip supports up to eight sl For a dual-nozzle printer add `dual_nozzle: true`. For external filament add `external_spools: [{label: EXT, entity: sensor.my_external_spool}]`. Per-metric `entities` overrides use the keys in `NUMERIC`, `DUAL`, `TEXT` and `BINARY` inside -`generate.py`. A remaining-time override also updates its unit subscription. +`generate.py`. Use `extra_fans: [aux_fan, exhaust_fan]` only where those HA entities +exist; their mappings are in `EXTRA_FANS`. A remaining-time override also updates its unit subscription. Filament entries use the Bambu integration's `type`, `color` and `active` attributes. ## Development checks and screenshots diff --git a/esphome/bambu-display/dashboard.h b/esphome/bambu-display/dashboard.h index 945bac2..cdc5017 100644 --- a/esphome/bambu-display/dashboard.h +++ b/esphome/bambu-display/dashboard.h @@ -10,11 +10,11 @@ namespace bambu_display { -constexpr uint32_t GREEN = 0x60DE9A; -constexpr uint32_t MUTED = 0x91A3B5; +constexpr uint32_t GREEN = 0x00FF00; +constexpr uint32_t MUTED = 0xAEB3B7; constexpr uint32_t RED = 0xFF737B; constexpr uint32_t AMBER = 0xF2C572; -constexpr uint32_t TRACK = 0x263442; +constexpr uint32_t TRACK = 0x19232B; inline std::string lower(std::string text) { for (char &c : text) c = static_cast(std::tolower(static_cast(c))); @@ -67,6 +67,20 @@ inline std::string remaining(float value, const std::string &unit) { return buffer; } +inline int duration_seconds(float value, const std::string &unit) { + if (!std::isfinite(value) || value < 0) return -1; + double seconds; + if (unit == "h") seconds = double(value) * 3600; + else if (unit == "min") seconds = double(value) * 60; + else if (unit == "s") seconds = value; + else return -1; + return seconds <= 60000000 ? static_cast(std::round(seconds)) : -1; +} + +inline float celsius(float value, const std::string &unit) { + return unit == "°F" || unit == "F" ? (value - 32.0f) * 5.0f / 9.0f : value; +} + inline uint32_t filament_color(std::string value) { if (!value.empty() && value[0] == '#') value.erase(0, 1); // Bambu publishes RGB or RGBA, with alpha at the end. @@ -89,8 +103,10 @@ struct Snapshot { bool connected = false; std::string online, status, task, stage, print_error, hms_error; std::string remaining_unit, nozzle_unit, bed_unit; + std::string finish_time; float progress = NAN, nozzle = NAN, nozzle_target = NAN, bed = NAN, bed_target = NAN; float time_left = NAN, layer = NAN, total_layers = NAN, fan = NAN; + float aux_fan = NAN, exhaust_fan = NAN; bool dual_nozzle = false; float left_nozzle = NAN, left_target = NAN, right_nozzle = NAN, right_target = NAN; std::vector trays; @@ -127,8 +143,10 @@ struct Snapshot { namespace bambu_display { struct TrayWidgets { lv_obj_t *card, *swatch, *label; }; +struct GaugeWidgets { lv_obj_t *arc, *value, *detail; }; struct Widgets { - lv_obj_t *status, *task, *arc, *progress, *nozzle, *bed, *remaining, *layers, *stage; + lv_obj_t *status, *task, *top_progress, *remaining, *layers, *stage; + GaugeWidgets progress, nozzle, bed, fan, aux, exhaust; std::vector trays; }; @@ -136,33 +154,49 @@ inline void set_text(lv_obj_t *label, const std::string &text) { if (text != lv_label_get_text(label)) lv_label_set_text(label, text.c_str()); } +inline void render_gauge(const GaugeWidgets &widgets, float value, float position, + int maximum, const std::string &detail) { + lv_arc_set_value(widgets.arc, gauge_value(position, maximum)); + set_text(widgets.value, number(value)); + set_text(widgets.detail, detail); +} + inline void render(const Snapshot &data, const Widgets &widgets) { const bool live = data.live(); const uint32_t color = data.status_color(); set_text(widgets.status, data.status_text()); lv_obj_set_style_text_color(widgets.status, lv_color_hex(color), 0); - lv_obj_set_style_arc_color(widgets.arc, lv_color_hex(color), LV_PART_INDICATOR); - lv_arc_set_value(widgets.arc, live ? gauge_value(data.progress, 100) : 0); - set_text(widgets.progress, live && std::isfinite(data.progress) - ? number(std::clamp(data.progress, 0.0f, 100.0f)) + "%" : "--"); + lv_obj_set_style_arc_color(widgets.progress.arc, lv_color_hex(color), LV_PART_INDICATOR); + lv_bar_set_value(widgets.top_progress, live ? gauge_value(data.progress, 100) : 0, LV_ANIM_OFF); + render_gauge(widgets.progress, live && std::isfinite(data.progress) + ? std::clamp(data.progress, 0.0f, 100.0f) : NAN, live ? data.progress : NAN, 100, + live ? remaining(data.time_left, data.remaining_unit) : "--"); set_text(widgets.task, live ? (valid_text(data.task) ? data.task : "No active print") : data.connected ? "Waiting for printer data" : "Waiting for Home Assistant"); - if (live && data.dual_nozzle) { - set_text(widgets.nozzle, "L " + temperature(data.left_nozzle, data.left_target, data.nozzle_unit) - + "\nR " + temperature(data.right_nozzle, data.right_target, data.nozzle_unit)); - } else { - set_text(widgets.nozzle, live ? temperature(data.nozzle, data.nozzle_target, data.nozzle_unit) : "--"); - } - set_text(widgets.bed, live ? temperature(data.bed, data.bed_target, data.bed_unit) : "--"); - set_text(widgets.remaining, live ? remaining(data.time_left, data.remaining_unit) : "--"); - set_text(widgets.layers, live ? number(data.layer) + " / " + number(data.total_layers) : "--"); + const float nozzle = data.dual_nozzle ? data.left_nozzle : data.nozzle; + const float target = data.dual_nozzle ? data.left_target : data.nozzle_target; + render_gauge(widgets.nozzle, live ? nozzle : NAN, live ? celsius(nozzle, data.nozzle_unit) : NAN, + 300, live ? "/ " + number(target) + " " + data.nozzle_unit : "--"); + render_gauge(widgets.bed, live ? data.bed : NAN, live ? celsius(data.bed, data.bed_unit) : NAN, + 120, live ? "/ " + number(data.bed_target) + " " + data.bed_unit : "--"); + render_gauge(widgets.fan, live ? data.fan : NAN, live ? data.fan : NAN, 100, "%"); + if (data.dual_nozzle) + render_gauge(widgets.aux, live ? data.right_nozzle : NAN, + live ? celsius(data.right_nozzle, data.nozzle_unit) : NAN, + 300, live ? "/ " + number(data.right_target) + " " + data.nozzle_unit : "--"); + else + render_gauge(widgets.aux, live ? data.aux_fan : NAN, live ? data.aux_fan : NAN, 100, "%"); + render_gauge(widgets.exhaust, live ? data.exhaust_fan : NAN, live ? data.exhaust_fan : NAN, 100, "%"); + std::string time_line = live ? remaining(data.time_left, data.remaining_unit) : "--"; + if (live && !data.finish_time.empty()) time_line = data.finish_time + " | " + time_line; + set_text(widgets.remaining, time_line); + set_text(widgets.layers, live ? "Layer " + number(data.layer) + " / " + number(data.total_layers) : "--"); std::string stage = live ? humanize(data.stage) : "Telemetry unavailable"; - if (live && std::isfinite(data.fan)) stage += " | Part fan " + number(data.fan) + "%"; set_text(widgets.stage, stage); for (size_t i = 0; i < std::min(data.trays.size(), widgets.trays.size()); ++i) { const auto &tray = data.trays[i]; const auto &widget = widgets.trays[i]; - set_text(widget.label, tray.label + " " + (live && valid_text(tray.type) ? tray.type : "--")); + set_text(widget.label, tray.label + "\n" + (live && valid_text(tray.type) ? tray.type : "--")); lv_obj_set_style_bg_color(widget.swatch, lv_color_hex(live ? filament_color(tray.color) : TRACK), 0); lv_obj_set_style_border_color(widget.card, lv_color_hex(live && is_on(tray.active) ? GREEN : TRACK), 0); } diff --git a/esphome/bambu-display/generate.py b/esphome/bambu-display/generate.py index d731287..5c2b0dd 100644 --- a/esphome/bambu-display/generate.py +++ b/esphome/bambu-display/generate.py @@ -20,10 +20,12 @@ DUAL = { 'left_nozzle': 'left_nozzle_temperature', 'left_target': 'left_nozzle_target_temperature', 'right_nozzle': 'right_nozzle_temperature', 'right_target': 'right_nozzle_target_temperature', } +EXTRA_FANS = {'aux_fan': 'aux_fan_speed', 'exhaust_fan': 'chamber_fan_speed'} TEXT = {'status': 'print_status', 'task': 'task_name', 'stage': 'current_stage'} BINARY = {'online': 'online', 'print_error': 'print_error', 'hms_error': 'hms_errors'} BG, CARD, TRACK, TEXT_COLOR, MUTED, GREEN = ( - 0x0D131B, 0x17222E, 0x263442, 0xEDF3F7, 0x91A3B5, 0x60DE9A) + 0x000000, 0x000000, 0x19232B, 0xEEEEEE, 0xAEB3B7, 0x00FF00) +ORANGE, CYAN = 0xFFAA00, 0x00E5E5 class Lambda(str): @@ -67,6 +69,8 @@ def validate_printers(printers): raise ValueError(f'{pid}: the filament strip fits up to eight slots') if 'dual_nozzle' in printer and not isinstance(printer['dual_nozzle'], bool): raise ValueError(f'{pid}: dual_nozzle must be true or false') + if any(key not in EXTRA_FANS for key in printer.get('extra_fans', [])): + raise ValueError(f'{pid}: extra_fans supports aux_fan and exhaust_fan') for value in printer.get('entities', {}).values(): if not isinstance(value, str) or not re.fullmatch(r'(sensor|binary_sensor)\.[a-z0-9_]+', value): raise ValueError(f'{pid}: invalid entity override: {value}') @@ -79,70 +83,76 @@ def label(text, x, y, width, font=18, **kwargs): 'gesture_bubble': True, **kwargs}} -def card(pid, name, title, x, y, width=238, height=104, font=26): - return {'obj': {'x': x, 'y': y, 'width': width, 'height': height, - 'bg_color': CARD, 'radius': 16, 'border_width': 0, - 'pad_all': 0, 'scrollable': False, 'gesture_bubble': True, - 'widgets': [ - label(title, 16, 12, width - 32, 14, text_color=MUTED), - label('--', 16, 38, width - 32, font, id=f'{pid}_{name}_label', height=height - 42), - ]}} +def gauge(pid, key, title, x, y, color, maximum): + return [ + {'arc': {'id': f'{pid}_{key}_arc', 'x': x + 8, 'y': y, 'width': 154, 'height': 154, + 'min_value': 0, 'max_value': maximum, 'value': 0, + 'start_angle': 135, 'end_angle': 45, 'arc_width': 13, + 'arc_color': TRACK, 'indicator': {'arc_color': color, 'arc_width': 13}, + 'adjustable': False, 'gesture_bubble': True}}, + label('--', x + 14, y + 47, 142, 32, id=f'{pid}_{key}_label', text_align='CENTER'), + label('--', x + 14, y + 86, 142, 16, id=f'{pid}_{key}_detail', text_align='CENTER', text_color=MUTED), + label(title, x, y + 137, 170, 18, text_align='CENTER', text_color=color), + ] def page_for(printer, index, total): pid = printer['id'] widgets = [ - label(printer['name'], 24, 16, 545, 28), - label(printer['subtitle'], 24, 53, 545, 14, text_color=MUTED), - {'obj': {'x': 586, 'y': 20, 'width': 190, 'height': 42, - 'bg_color': CARD, 'radius': 21, 'border_width': 0, 'pad_all': 0, - 'scrollable': False, 'gesture_bubble': True, - 'widgets': [label('SYNCING', 0, 11, 190, 16, - id=f'{pid}_status_label', text_align='CENTER', text_color=MUTED)]}}, - label('Waiting for Home Assistant', 24, 88, 752, 20, id=f'{pid}_task_label'), - {'arc': {'id': f'{pid}_progress_arc', 'x': 28, 'y': 132, 'width': 224, 'height': 224, - 'min_value': 0, 'max_value': 100, 'value': 0, - 'start_angle': 135, 'end_angle': 45, 'arc_width': 14, - 'arc_color': TRACK, 'indicator': {'arc_color': GREEN, 'arc_width': 14}, - 'adjustable': False, 'gesture_bubble': True}}, - label('--', 42, 207, 196, 48, id=f'{pid}_progress_label', text_align='CENTER'), - label('PRINT PROGRESS', 42, 266, 196, 14, text_align='CENTER', text_color=MUTED), - card(pid, 'nozzle', 'NOZZLES L/R / TARGET' if printer.get('dual_nozzle') - else 'NOZZLE / TARGET', 282, 132, height=118, - font=18 if printer.get('dual_nozzle') else 26), - card(pid, 'bed', 'BED / TARGET', 538, 132, height=118), - card(pid, 'remaining', 'REMAINING', 282, 262, height=86), - card(pid, 'layers', 'LAYER', 538, 262, height=86), - label('Telemetry unavailable', 24, 358, 752, 16, id=f'{pid}_stage_label', text_color=MUTED), - label('FILAMENT / ACTIVE SLOT OUTLINED IN GREEN', 24, 383, 752, 12, text_color=MUTED), + {'bar': {'id': f'{pid}_top_progress', 'x': 0, 'y': 0, 'width': 800, 'height': 5, + 'min_value': 0, 'max_value': 100, 'value': 0, 'bg_color': TRACK, + 'indicator': {'bg_color': GREEN}, 'gesture_bubble': True}}, + label(printer['name'], 16, 17, 485, 26, text_color=GREEN), + label(f'{index + 1} / {total}', 520, 24, 70, 14, text_color=MUTED, text_align='CENTER'), + label('SYNCING', 598, 21, 186, 16, id=f'{pid}_status_label', text_align='RIGHT', text_color=MUTED), + {'obj': {'x': 578, 'y': 64, 'width': 1, 'height': 362, 'bg_color': TRACK, + 'border_width': 0, 'pad_all': 0, 'scrollable': False, 'gesture_bubble': True}}, + ] + widgets += gauge(pid, 'progress', 'Progress', 16, 62, GREEN, 100) + widgets += gauge(pid, 'nozzle', 'Nozzle L' if printer.get('dual_nozzle') else 'Nozzle', + 202, 62, ORANGE, 300) + widgets += gauge(pid, 'bed', 'Bed', 388, 62, CYAN, 120) + widgets += gauge(pid, 'fan', 'Part', 16, 229, 0xEEEEEE, 100) + widgets += gauge(pid, 'aux', 'Nozzle R' if printer.get('dual_nozzle') else 'Aux', + 202, 229, ORANGE if printer.get('dual_nozzle') else 0xEEEEEE, + 300 if printer.get('dual_nozzle') else 100) + widgets += gauge(pid, 'exhaust', 'Exhaust', 388, 229, GREEN, 100) + widgets += [ + label('--', 16, 401, 544, 26, id=f'{pid}_remaining_label', text_color=GREEN, text_align='CENTER'), + label('Telemetry unavailable', 16, 430, 544, 12, id=f'{pid}_stage_label', text_color=MUTED, text_align='CENTER'), + label('--', 594, 397, 190, 16, id=f'{pid}_layers_label', text_color=MUTED, text_align='CENTER'), ] trays = trays_for(printer) - if trays: - width = (752 - 8 * (len(trays) - 1)) // len(trays) - for i, tray in enumerate(trays): - widgets.append({'obj': { - 'id': f'{pid}_tray_{i}_card', 'x': 24 + (width + 8) * i, 'y': 401, - 'width': width, 'height': 32, 'bg_color': CARD, 'radius': 6, - 'border_width': 1, 'border_color': TRACK, 'pad_all': 0, - 'scrollable': False, 'gesture_bubble': True, - 'widgets': [ - {'obj': {'id': f'{pid}_tray_{i}_swatch', 'x': 1, 'y': 1, 'width': width - 4, - 'height': 5, 'bg_color': TRACK, 'radius': 2, 'border_width': 0, - 'pad_all': 0, 'scrollable': False, 'gesture_bubble': True}}, - label(f'{tray["label"]} --', 6, 11, width - 12, 12, - id=f'{pid}_tray_{i}_label'), - ]}}) - else: - widgets.append(label('No filament slots configured', 24, 403, 752, 14, text_color=MUTED)) - for direction, x, text in (('previous', 24, '< PREV'), ('next', 688, 'NEXT >')): - widgets.append({'button': {'x': x, 'y': 444, 'width': 88, 'height': 30, - 'bg_color': CARD, 'radius': 8, 'border_width': 0, + for i, tray in enumerate(trays): + bank = i // 4 + slot = i % 4 + if slot == 0: + title = 'AMS ' + tray['label'][:-1] if tray['label'][-1:].isdigit() else 'EXTERNAL SPOOL' + widgets.append(label(title, 594, 70 + bank * 145, 190, 20, + text_align='CENTER', text_color=MUTED)) + widgets.append({'obj': { + 'id': f'{pid}_tray_{i}_card', 'x': 594 + 48 * slot, 'y': 102 + bank * 145, + 'width': 44, 'height': 82, 'bg_color': BG, 'radius': 5, + 'border_width': 1, 'border_color': TRACK, 'pad_all': 0, + 'scrollable': False, 'gesture_bubble': True, + 'widgets': [ + {'obj': {'id': f'{pid}_tray_{i}_swatch', 'x': 3, 'y': 3, 'width': 36, + 'height': 40, 'bg_color': TRACK, 'radius': 4, 'border_width': 0, + 'pad_all': 0, 'scrollable': False, 'gesture_bubble': True}}, + label(f'{tray["label"]}\n--', 1, 46, 40, 12, height=34, + id=f'{pid}_tray_{i}_label', text_align='CENTER'), + ]}}) + if not trays: + widgets.append(label('No AMS', 594, 150, 190, 20, text_color=MUTED, text_align='CENTER')) + for direction, x, text in (('previous', 16, '<'), ('next', 720, '>')): + widgets.append({'button': {'x': x, 'y': 446, 'width': 64, 'height': 30, + 'bg_color': TRACK, 'radius': 8, 'border_width': 0, 'pad_all': 0, 'gesture_bubble': True, 'widgets': [{'label': {'text': text, 'align': 'CENTER', - 'text_font': 'montserrat_12'}}], + 'text_color': TEXT_COLOR, 'text_font': 'montserrat_18'}}], 'on_click': [{f'lvgl.page.{direction}': {}}]}}) - widgets.append(label(f'{index + 1} / {total} SWIPE LEFT / RIGHT', 130, 451, 540, 14, - text_align='CENTER', text_color=MUTED)) + widgets.append(label('Waiting for Home Assistant', 94, 449, 612, 14, + id=f'{pid}_task_label', text_align='CENTER')) return {'id': f'{pid}_page', 'bg_color': BG, 'bg_opa': 'COVER', 'pad_all': 0, 'scrollable': False, 'scrollbar_mode': 'OFF', 'on_swipe_left': [ @@ -154,6 +164,25 @@ def page_for(printer, index, total): 'on_load': [{'script.execute': f'{pid}_refresh'}], 'widgets': widgets} +def color_test_page(): + widgets = [label('DISPLAY COLOR TEST', 16, 18, 768, 28), + label('Each block must match its label. Swipe to return to the printers.', + 16, 62, 768, 18)] + colors = [('RED', 0xFF0000), ('GREEN', 0x00FF00), ('BLUE', 0x0000FF), + ('WHITE', 0xFFFFFF), ('CYAN', 0x00FFFF), ('MAGENTA', 0xFF00FF)] + for i, (name, color) in enumerate(colors): + widgets += [ + {'obj': {'x': 16 + i * 129, 'y': 118, 'width': 122, 'height': 200, + 'bg_color': color, 'bg_opa': 'COVER', 'border_width': 0, + 'scrollable': False, 'gesture_bubble': True}}, + label(name, 16 + i * 129, 332, 122, 18, text_align='CENTER'), + ] + return {'id': 'color_test_page', 'skip': True, 'bg_color': BG, 'bg_opa': 'COVER', + 'pad_all': 0, 'scrollable': False, + 'on_swipe_left': [{'lvgl.page.next': {}}], + 'on_swipe_right': [{'lvgl.page.previous': {}}], 'widgets': widgets} + + def generate(printers): validate_printers(printers) package = {'sensor': [], 'text_sensor': [], 'script': [], @@ -163,6 +192,7 @@ def generate(printers): fields = dict(NUMERIC) if printer.get('dual_nozzle'): fields.update(DUAL) + fields.update({key: EXTRA_FANS[key] for key in printer.get('extra_fans', [])}) expressions = {} for key, suffix in fields.items(): sid = f'{pid}_{key}' @@ -193,6 +223,12 @@ def generate(printers): lines.append(f'data.{key} = {expr};') if printer.get('dual_nozzle'): lines.append('data.dual_nozzle = true;') + lines += [ + 'const int seconds_left = bambu_display::duration_seconds(data.time_left, data.remaining_unit);', + 'const auto clock = id(ha_time).now();', + 'if (clock.is_valid() && seconds_left >= 0)', + ' data.finish_time = esphome::ESPTime::from_epoch_local(clock.timestamp + seconds_left).strftime("%H:%M");', + ] tray_widgets = [] for i, tray in enumerate(trays): lines.append('data.trays.push_back({' + ', '.join([ @@ -201,8 +237,9 @@ def generate(printers): tray_widgets.append('{' + ', '.join(f'id({pid}_tray_{i}_{part})' for part in ('card', 'swatch', 'label')) + '}') refs = [f'id({pid}_{key})' for key in ( - 'status_label', 'task_label', 'progress_arc', 'progress_label', 'nozzle_label', - 'bed_label', 'remaining_label', 'layers_label', 'stage_label')] + 'status_label', 'task_label', 'top_progress', 'remaining_label', 'layers_label', 'stage_label')] + for key in ('progress', 'nozzle', 'bed', 'fan', 'aux', 'exhaust'): + refs.append('{' + ', '.join(f'id({pid}_{key}_{part})' for part in ('arc', 'label', 'detail')) + '}') refs.append('{' + ', '.join(tray_widgets) + '}') lines.append('bambu_display::render(data, {' + ', '.join(refs) + '});') package['script'].append({'id': f'{pid}_refresh', 'then': [{'lambda': Lambda('\n'.join(lines))}]}) @@ -210,6 +247,10 @@ def generate(printers): 'condition': {'lvgl.page.is_showing': f'{pid}_page'}, 'then': [{'script.execute': f'{pid}_refresh'}]}}) package['lvgl']['pages'].append(page_for(printer, index, len(printers))) + package['lvgl']['pages'].append(color_test_page()) + package['button'] = [{'platform': 'template', 'name': 'Display Color Test', + 'entity_category': 'diagnostic', + 'on_press': [{'lvgl.page.show': 'color_test_page'}]}] return package diff --git a/esphome/bambu-display/generated.yaml b/esphome/bambu-display/generated.yaml index b9890d9..62432f8 100644 --- a/esphome/bambu-display/generated.yaml +++ b/esphome/bambu-display/generated.yaml @@ -36,6 +36,14 @@ sensor: id: prints_charming_fan entity_id: sensor.p1s_01p09c470102673_cooling_fan_speed internal: true +- platform: homeassistant + id: prints_charming_aux_fan + entity_id: sensor.p1s_01p09c470102673_aux_fan_speed + internal: true +- platform: homeassistant + id: prints_charming_exhaust_fan + entity_id: sensor.p1s_01p09c470102673_chamber_fan_speed + internal: true - platform: homeassistant id: polly_pocket_progress entity_id: sensor.a1mini_0309ca580403653_print_progress @@ -196,6 +204,10 @@ sensor: id: constipation_orion_right_target entity_id: sensor.constipation_orion_right_nozzle_target_temperature internal: true +- platform: homeassistant + id: constipation_orion_exhaust_fan + entity_id: sensor.constipation_orion_chamber_fan_speed + internal: true text_sensor: - platform: homeassistant id: prints_charming_status @@ -722,6 +734,8 @@ script: data.layer = id(prints_charming_layer).state; data.total_layers = id(prints_charming_total_layers).state; data.fan = id(prints_charming_fan).state; + data.aux_fan = id(prints_charming_aux_fan).state; + data.exhaust_fan = id(prints_charming_exhaust_fan).state; data.status = id(prints_charming_status).state; data.task = id(prints_charming_task).state; data.stage = id(prints_charming_stage).state; @@ -731,6 +745,10 @@ script: data.remaining_unit = id(prints_charming_remaining_unit).state; data.nozzle_unit = id(prints_charming_nozzle_unit).state; data.bed_unit = id(prints_charming_bed_unit).state; + const int seconds_left = bambu_display::duration_seconds(data.time_left, data.remaining_unit); + const auto clock = id(ha_time).now(); + if (clock.is_valid() && seconds_left >= 0) + data.finish_time = esphome::ESPTime::from_epoch_local(clock.timestamp + seconds_left).strftime("%H:%M"); data.trays.push_back({"A1", id(prints_charming_tray_0_type).state, id(prints_charming_tray_0_color).state, id(prints_charming_tray_0_active).state}); data.trays.push_back({"A2", id(prints_charming_tray_1_type).state, id(prints_charming_tray_1_color).state, id(prints_charming_tray_1_active).state}); data.trays.push_back({"A3", id(prints_charming_tray_2_type).state, id(prints_charming_tray_2_color).state, id(prints_charming_tray_2_active).state}); @@ -739,7 +757,7 @@ script: data.trays.push_back({"B2", id(prints_charming_tray_5_type).state, id(prints_charming_tray_5_color).state, id(prints_charming_tray_5_active).state}); data.trays.push_back({"B3", id(prints_charming_tray_6_type).state, id(prints_charming_tray_6_color).state, id(prints_charming_tray_6_active).state}); data.trays.push_back({"B4", id(prints_charming_tray_7_type).state, id(prints_charming_tray_7_color).state, id(prints_charming_tray_7_active).state}); - bambu_display::render(data, {id(prints_charming_status_label), id(prints_charming_task_label), id(prints_charming_progress_arc), id(prints_charming_progress_label), id(prints_charming_nozzle_label), id(prints_charming_bed_label), id(prints_charming_remaining_label), id(prints_charming_layers_label), id(prints_charming_stage_label), {{id(prints_charming_tray_0_card), id(prints_charming_tray_0_swatch), id(prints_charming_tray_0_label)}, {id(prints_charming_tray_1_card), id(prints_charming_tray_1_swatch), id(prints_charming_tray_1_label)}, {id(prints_charming_tray_2_card), id(prints_charming_tray_2_swatch), id(prints_charming_tray_2_label)}, {id(prints_charming_tray_3_card), id(prints_charming_tray_3_swatch), id(prints_charming_tray_3_label)}, {id(prints_charming_tray_4_card), id(prints_charming_tray_4_swatch), id(prints_charming_tray_4_label)}, {id(prints_charming_tray_5_card), id(prints_charming_tray_5_swatch), id(prints_charming_tray_5_label)}, {id(prints_charming_tray_6_card), id(prints_charming_tray_6_swatch), id(prints_charming_tray_6_label)}, {id(prints_charming_tray_7_card), id(prints_charming_tray_7_swatch), id(prints_charming_tray_7_label)}}}); + bambu_display::render(data, {id(prints_charming_status_label), id(prints_charming_task_label), id(prints_charming_top_progress), id(prints_charming_remaining_label), id(prints_charming_layers_label), id(prints_charming_stage_label), {id(prints_charming_progress_arc), id(prints_charming_progress_label), id(prints_charming_progress_detail)}, {id(prints_charming_nozzle_arc), id(prints_charming_nozzle_label), id(prints_charming_nozzle_detail)}, {id(prints_charming_bed_arc), id(prints_charming_bed_label), id(prints_charming_bed_detail)}, {id(prints_charming_fan_arc), id(prints_charming_fan_label), id(prints_charming_fan_detail)}, {id(prints_charming_aux_arc), id(prints_charming_aux_label), id(prints_charming_aux_detail)}, {id(prints_charming_exhaust_arc), id(prints_charming_exhaust_label), id(prints_charming_exhaust_detail)}, {{id(prints_charming_tray_0_card), id(prints_charming_tray_0_swatch), id(prints_charming_tray_0_label)}, {id(prints_charming_tray_1_card), id(prints_charming_tray_1_swatch), id(prints_charming_tray_1_label)}, {id(prints_charming_tray_2_card), id(prints_charming_tray_2_swatch), id(prints_charming_tray_2_label)}, {id(prints_charming_tray_3_card), id(prints_charming_tray_3_swatch), id(prints_charming_tray_3_label)}, {id(prints_charming_tray_4_card), id(prints_charming_tray_4_swatch), id(prints_charming_tray_4_label)}, {id(prints_charming_tray_5_card), id(prints_charming_tray_5_swatch), id(prints_charming_tray_5_label)}, {id(prints_charming_tray_6_card), id(prints_charming_tray_6_swatch), id(prints_charming_tray_6_label)}, {id(prints_charming_tray_7_card), id(prints_charming_tray_7_swatch), id(prints_charming_tray_7_label)}}}); - id: polly_pocket_refresh then: - lambda: !lambda |- @@ -763,8 +781,12 @@ script: data.remaining_unit = id(polly_pocket_remaining_unit).state; data.nozzle_unit = id(polly_pocket_nozzle_unit).state; data.bed_unit = id(polly_pocket_bed_unit).state; + const int seconds_left = bambu_display::duration_seconds(data.time_left, data.remaining_unit); + const auto clock = id(ha_time).now(); + if (clock.is_valid() && seconds_left >= 0) + data.finish_time = esphome::ESPTime::from_epoch_local(clock.timestamp + seconds_left).strftime("%H:%M"); data.trays.push_back({"EXT", id(polly_pocket_tray_0_type).state, id(polly_pocket_tray_0_color).state, id(polly_pocket_tray_0_active).state}); - bambu_display::render(data, {id(polly_pocket_status_label), id(polly_pocket_task_label), id(polly_pocket_progress_arc), id(polly_pocket_progress_label), id(polly_pocket_nozzle_label), id(polly_pocket_bed_label), id(polly_pocket_remaining_label), id(polly_pocket_layers_label), id(polly_pocket_stage_label), {{id(polly_pocket_tray_0_card), id(polly_pocket_tray_0_swatch), id(polly_pocket_tray_0_label)}}}); + bambu_display::render(data, {id(polly_pocket_status_label), id(polly_pocket_task_label), id(polly_pocket_top_progress), id(polly_pocket_remaining_label), id(polly_pocket_layers_label), id(polly_pocket_stage_label), {id(polly_pocket_progress_arc), id(polly_pocket_progress_label), id(polly_pocket_progress_detail)}, {id(polly_pocket_nozzle_arc), id(polly_pocket_nozzle_label), id(polly_pocket_nozzle_detail)}, {id(polly_pocket_bed_arc), id(polly_pocket_bed_label), id(polly_pocket_bed_detail)}, {id(polly_pocket_fan_arc), id(polly_pocket_fan_label), id(polly_pocket_fan_detail)}, {id(polly_pocket_aux_arc), id(polly_pocket_aux_label), id(polly_pocket_aux_detail)}, {id(polly_pocket_exhaust_arc), id(polly_pocket_exhaust_label), id(polly_pocket_exhaust_detail)}, {{id(polly_pocket_tray_0_card), id(polly_pocket_tray_0_swatch), id(polly_pocket_tray_0_label)}}}); - id: ds_turd_flinger_refresh then: - lambda: !lambda |- @@ -788,11 +810,15 @@ script: data.remaining_unit = id(ds_turd_flinger_remaining_unit).state; data.nozzle_unit = id(ds_turd_flinger_nozzle_unit).state; data.bed_unit = id(ds_turd_flinger_bed_unit).state; + const int seconds_left = bambu_display::duration_seconds(data.time_left, data.remaining_unit); + const auto clock = id(ha_time).now(); + if (clock.is_valid() && seconds_left >= 0) + data.finish_time = esphome::ESPTime::from_epoch_local(clock.timestamp + seconds_left).strftime("%H:%M"); data.trays.push_back({"A1", id(ds_turd_flinger_tray_0_type).state, id(ds_turd_flinger_tray_0_color).state, id(ds_turd_flinger_tray_0_active).state}); data.trays.push_back({"A2", id(ds_turd_flinger_tray_1_type).state, id(ds_turd_flinger_tray_1_color).state, id(ds_turd_flinger_tray_1_active).state}); data.trays.push_back({"A3", id(ds_turd_flinger_tray_2_type).state, id(ds_turd_flinger_tray_2_color).state, id(ds_turd_flinger_tray_2_active).state}); data.trays.push_back({"A4", id(ds_turd_flinger_tray_3_type).state, id(ds_turd_flinger_tray_3_color).state, id(ds_turd_flinger_tray_3_active).state}); - bambu_display::render(data, {id(ds_turd_flinger_status_label), id(ds_turd_flinger_task_label), id(ds_turd_flinger_progress_arc), id(ds_turd_flinger_progress_label), id(ds_turd_flinger_nozzle_label), id(ds_turd_flinger_bed_label), id(ds_turd_flinger_remaining_label), id(ds_turd_flinger_layers_label), id(ds_turd_flinger_stage_label), {{id(ds_turd_flinger_tray_0_card), id(ds_turd_flinger_tray_0_swatch), id(ds_turd_flinger_tray_0_label)}, {id(ds_turd_flinger_tray_1_card), id(ds_turd_flinger_tray_1_swatch), id(ds_turd_flinger_tray_1_label)}, {id(ds_turd_flinger_tray_2_card), id(ds_turd_flinger_tray_2_swatch), id(ds_turd_flinger_tray_2_label)}, {id(ds_turd_flinger_tray_3_card), id(ds_turd_flinger_tray_3_swatch), id(ds_turd_flinger_tray_3_label)}}}); + bambu_display::render(data, {id(ds_turd_flinger_status_label), id(ds_turd_flinger_task_label), id(ds_turd_flinger_top_progress), id(ds_turd_flinger_remaining_label), id(ds_turd_flinger_layers_label), id(ds_turd_flinger_stage_label), {id(ds_turd_flinger_progress_arc), id(ds_turd_flinger_progress_label), id(ds_turd_flinger_progress_detail)}, {id(ds_turd_flinger_nozzle_arc), id(ds_turd_flinger_nozzle_label), id(ds_turd_flinger_nozzle_detail)}, {id(ds_turd_flinger_bed_arc), id(ds_turd_flinger_bed_label), id(ds_turd_flinger_bed_detail)}, {id(ds_turd_flinger_fan_arc), id(ds_turd_flinger_fan_label), id(ds_turd_flinger_fan_detail)}, {id(ds_turd_flinger_aux_arc), id(ds_turd_flinger_aux_label), id(ds_turd_flinger_aux_detail)}, {id(ds_turd_flinger_exhaust_arc), id(ds_turd_flinger_exhaust_label), id(ds_turd_flinger_exhaust_detail)}, {{id(ds_turd_flinger_tray_0_card), id(ds_turd_flinger_tray_0_swatch), id(ds_turd_flinger_tray_0_label)}, {id(ds_turd_flinger_tray_1_card), id(ds_turd_flinger_tray_1_swatch), id(ds_turd_flinger_tray_1_label)}, {id(ds_turd_flinger_tray_2_card), id(ds_turd_flinger_tray_2_swatch), id(ds_turd_flinger_tray_2_label)}, {id(ds_turd_flinger_tray_3_card), id(ds_turd_flinger_tray_3_swatch), id(ds_turd_flinger_tray_3_label)}}}); - id: jordyns_layer_slayer_refresh then: - lambda: !lambda |- @@ -816,11 +842,15 @@ script: data.remaining_unit = id(jordyns_layer_slayer_remaining_unit).state; data.nozzle_unit = id(jordyns_layer_slayer_nozzle_unit).state; data.bed_unit = id(jordyns_layer_slayer_bed_unit).state; + const int seconds_left = bambu_display::duration_seconds(data.time_left, data.remaining_unit); + const auto clock = id(ha_time).now(); + if (clock.is_valid() && seconds_left >= 0) + data.finish_time = esphome::ESPTime::from_epoch_local(clock.timestamp + seconds_left).strftime("%H:%M"); data.trays.push_back({"A1", id(jordyns_layer_slayer_tray_0_type).state, id(jordyns_layer_slayer_tray_0_color).state, id(jordyns_layer_slayer_tray_0_active).state}); data.trays.push_back({"A2", id(jordyns_layer_slayer_tray_1_type).state, id(jordyns_layer_slayer_tray_1_color).state, id(jordyns_layer_slayer_tray_1_active).state}); data.trays.push_back({"A3", id(jordyns_layer_slayer_tray_2_type).state, id(jordyns_layer_slayer_tray_2_color).state, id(jordyns_layer_slayer_tray_2_active).state}); data.trays.push_back({"A4", id(jordyns_layer_slayer_tray_3_type).state, id(jordyns_layer_slayer_tray_3_color).state, id(jordyns_layer_slayer_tray_3_active).state}); - bambu_display::render(data, {id(jordyns_layer_slayer_status_label), id(jordyns_layer_slayer_task_label), id(jordyns_layer_slayer_progress_arc), id(jordyns_layer_slayer_progress_label), id(jordyns_layer_slayer_nozzle_label), id(jordyns_layer_slayer_bed_label), id(jordyns_layer_slayer_remaining_label), id(jordyns_layer_slayer_layers_label), id(jordyns_layer_slayer_stage_label), {{id(jordyns_layer_slayer_tray_0_card), id(jordyns_layer_slayer_tray_0_swatch), id(jordyns_layer_slayer_tray_0_label)}, {id(jordyns_layer_slayer_tray_1_card), id(jordyns_layer_slayer_tray_1_swatch), id(jordyns_layer_slayer_tray_1_label)}, {id(jordyns_layer_slayer_tray_2_card), id(jordyns_layer_slayer_tray_2_swatch), id(jordyns_layer_slayer_tray_2_label)}, {id(jordyns_layer_slayer_tray_3_card), id(jordyns_layer_slayer_tray_3_swatch), id(jordyns_layer_slayer_tray_3_label)}}}); + bambu_display::render(data, {id(jordyns_layer_slayer_status_label), id(jordyns_layer_slayer_task_label), id(jordyns_layer_slayer_top_progress), id(jordyns_layer_slayer_remaining_label), id(jordyns_layer_slayer_layers_label), id(jordyns_layer_slayer_stage_label), {id(jordyns_layer_slayer_progress_arc), id(jordyns_layer_slayer_progress_label), id(jordyns_layer_slayer_progress_detail)}, {id(jordyns_layer_slayer_nozzle_arc), id(jordyns_layer_slayer_nozzle_label), id(jordyns_layer_slayer_nozzle_detail)}, {id(jordyns_layer_slayer_bed_arc), id(jordyns_layer_slayer_bed_label), id(jordyns_layer_slayer_bed_detail)}, {id(jordyns_layer_slayer_fan_arc), id(jordyns_layer_slayer_fan_label), id(jordyns_layer_slayer_fan_detail)}, {id(jordyns_layer_slayer_aux_arc), id(jordyns_layer_slayer_aux_label), id(jordyns_layer_slayer_aux_detail)}, {id(jordyns_layer_slayer_exhaust_arc), id(jordyns_layer_slayer_exhaust_label), id(jordyns_layer_slayer_exhaust_detail)}, {{id(jordyns_layer_slayer_tray_0_card), id(jordyns_layer_slayer_tray_0_swatch), id(jordyns_layer_slayer_tray_0_label)}, {id(jordyns_layer_slayer_tray_1_card), id(jordyns_layer_slayer_tray_1_swatch), id(jordyns_layer_slayer_tray_1_label)}, {id(jordyns_layer_slayer_tray_2_card), id(jordyns_layer_slayer_tray_2_swatch), id(jordyns_layer_slayer_tray_2_label)}, {id(jordyns_layer_slayer_tray_3_card), id(jordyns_layer_slayer_tray_3_swatch), id(jordyns_layer_slayer_tray_3_label)}}}); - id: constipation_orion_refresh then: - lambda: !lambda |- @@ -839,6 +869,7 @@ script: data.left_target = id(constipation_orion_left_target).state; data.right_nozzle = id(constipation_orion_right_nozzle).state; data.right_target = id(constipation_orion_right_target).state; + data.exhaust_fan = id(constipation_orion_exhaust_fan).state; data.status = id(constipation_orion_status).state; data.task = id(constipation_orion_task).state; data.stage = id(constipation_orion_stage).state; @@ -849,11 +880,15 @@ script: data.nozzle_unit = id(constipation_orion_nozzle_unit).state; data.bed_unit = id(constipation_orion_bed_unit).state; data.dual_nozzle = true; + const int seconds_left = bambu_display::duration_seconds(data.time_left, data.remaining_unit); + const auto clock = id(ha_time).now(); + if (clock.is_valid() && seconds_left >= 0) + data.finish_time = esphome::ESPTime::from_epoch_local(clock.timestamp + seconds_left).strftime("%H:%M"); data.trays.push_back({"A1", id(constipation_orion_tray_0_type).state, id(constipation_orion_tray_0_color).state, id(constipation_orion_tray_0_active).state}); data.trays.push_back({"A2", id(constipation_orion_tray_1_type).state, id(constipation_orion_tray_1_color).state, id(constipation_orion_tray_1_active).state}); data.trays.push_back({"A3", id(constipation_orion_tray_2_type).state, id(constipation_orion_tray_2_color).state, id(constipation_orion_tray_2_active).state}); data.trays.push_back({"A4", id(constipation_orion_tray_3_type).state, id(constipation_orion_tray_3_color).state, id(constipation_orion_tray_3_active).state}); - bambu_display::render(data, {id(constipation_orion_status_label), id(constipation_orion_task_label), id(constipation_orion_progress_arc), id(constipation_orion_progress_label), id(constipation_orion_nozzle_label), id(constipation_orion_bed_label), id(constipation_orion_remaining_label), id(constipation_orion_layers_label), id(constipation_orion_stage_label), {{id(constipation_orion_tray_0_card), id(constipation_orion_tray_0_swatch), id(constipation_orion_tray_0_label)}, {id(constipation_orion_tray_1_card), id(constipation_orion_tray_1_swatch), id(constipation_orion_tray_1_label)}, {id(constipation_orion_tray_2_card), id(constipation_orion_tray_2_swatch), id(constipation_orion_tray_2_label)}, {id(constipation_orion_tray_3_card), id(constipation_orion_tray_3_swatch), id(constipation_orion_tray_3_label)}}}); + bambu_display::render(data, {id(constipation_orion_status_label), id(constipation_orion_task_label), id(constipation_orion_top_progress), id(constipation_orion_remaining_label), id(constipation_orion_layers_label), id(constipation_orion_stage_label), {id(constipation_orion_progress_arc), id(constipation_orion_progress_label), id(constipation_orion_progress_detail)}, {id(constipation_orion_nozzle_arc), id(constipation_orion_nozzle_label), id(constipation_orion_nozzle_detail)}, {id(constipation_orion_bed_arc), id(constipation_orion_bed_label), id(constipation_orion_bed_detail)}, {id(constipation_orion_fan_arc), id(constipation_orion_fan_label), id(constipation_orion_fan_detail)}, {id(constipation_orion_aux_arc), id(constipation_orion_aux_label), id(constipation_orion_aux_detail)}, {id(constipation_orion_exhaust_arc), id(constipation_orion_exhaust_label), id(constipation_orion_exhaust_detail)}, {{id(constipation_orion_tray_0_card), id(constipation_orion_tray_0_swatch), id(constipation_orion_tray_0_label)}, {id(constipation_orion_tray_1_card), id(constipation_orion_tray_1_swatch), id(constipation_orion_tray_1_label)}, {id(constipation_orion_tray_2_card), id(constipation_orion_tray_2_swatch), id(constipation_orion_tray_2_label)}, {id(constipation_orion_tray_3_card), id(constipation_orion_tray_3_swatch), id(constipation_orion_tray_3_label)}}}); interval: - interval: 1s then: @@ -885,7 +920,7 @@ interval: lvgl: pages: - id: prints_charming_page - bg_color: 856859 + bg_color: 0 bg_opa: COVER pad_all: 0 scrollable: false @@ -905,598 +940,808 @@ lvgl: on_load: - script.execute: prints_charming_refresh widgets: + - bar: + id: prints_charming_top_progress + x: 0 + y: 0 + width: 800 + height: 5 + min_value: 0 + max_value: 100 + value: 0 + bg_color: 1647403 + indicator: + bg_color: 65280 + gesture_bubble: true - label: text: PrintsCharming - x: 24 - y: 16 - width: 545 - height: 36 - text_color: 15594487 - text_font: montserrat_28 + x: 16 + y: 17 + width: 485 + height: 34 + text_color: 65280 + text_font: montserrat_26 long_mode: DOT gesture_bubble: true - label: - text: P1S / Office - x: 24 - y: 53 - width: 545 + text: 1 / 5 + x: 520 + y: 24 + width: 70 height: 22 - text_color: 9544629 + text_color: 11449271 text_font: montserrat_14 long_mode: DOT gesture_bubble: true + text_align: CENTER + - label: + text: SYNCING + x: 598 + y: 21 + width: 186 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: prints_charming_status_label + text_align: RIGHT - obj: - x: 586 - y: 20 - width: 190 - height: 42 - bg_color: 1516078 - radius: 21 + x: 578 + y: 64 + width: 1 + height: 362 + bg_color: 1647403 border_width: 0 pad_all: 0 scrollable: false gesture_bubble: true - widgets: - - label: - text: SYNCING - x: 0 - y: 11 - width: 190 - height: 24 - text_color: 9544629 - text_font: montserrat_16 - long_mode: DOT - gesture_bubble: true - id: prints_charming_status_label - text_align: CENTER - - label: - text: Waiting for Home Assistant - x: 24 - y: 88 - width: 752 - height: 28 - text_color: 15594487 - text_font: montserrat_20 - long_mode: DOT - gesture_bubble: true - id: prints_charming_task_label - arc: id: prints_charming_progress_arc - x: 28 - y: 132 - width: 224 - height: 224 + x: 24 + y: 62 + width: 154 + height: 154 min_value: 0 max_value: 100 value: 0 start_angle: 135 end_angle: 45 - arc_width: 14 - arc_color: 2503746 + arc_width: 13 + arc_color: 1647403 indicator: - arc_color: 6348442 - arc_width: 14 + arc_color: 65280 + arc_width: 13 adjustable: false gesture_bubble: true - label: text: -- - x: 42 - y: 207 - width: 196 - height: 56 - text_color: 15594487 - text_font: montserrat_48 + x: 30 + y: 109 + width: 142 + height: 40 + text_color: 15658734 + text_font: montserrat_32 long_mode: DOT gesture_bubble: true id: prints_charming_progress_label text_align: CENTER - label: - text: PRINT PROGRESS - x: 42 - y: 266 - width: 196 - height: 22 - text_color: 9544629 - text_font: montserrat_14 + text: -- + x: 30 + y: 148 + width: 142 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: prints_charming_progress_detail + text_align: CENTER + - label: + text: Progress + x: 16 + y: 199 + width: 170 + height: 26 + text_color: 65280 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - arc: + id: prints_charming_nozzle_arc + x: 210 + y: 62 + width: 154 + height: 154 + min_value: 0 + max_value: 300 + value: 0 + start_angle: 135 + end_angle: 45 + arc_width: 13 + arc_color: 1647403 + indicator: + arc_color: 16755200 + arc_width: 13 + adjustable: false + gesture_bubble: true + - label: + text: -- + x: 216 + y: 109 + width: 142 + height: 40 + text_color: 15658734 + text_font: montserrat_32 + long_mode: DOT + gesture_bubble: true + id: prints_charming_nozzle_label + text_align: CENTER + - label: + text: -- + x: 216 + y: 148 + width: 142 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: prints_charming_nozzle_detail + text_align: CENTER + - label: + text: Nozzle + x: 202 + y: 199 + width: 170 + height: 26 + text_color: 16755200 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - arc: + id: prints_charming_bed_arc + x: 396 + y: 62 + width: 154 + height: 154 + min_value: 0 + max_value: 120 + value: 0 + start_angle: 135 + end_angle: 45 + arc_width: 13 + arc_color: 1647403 + indicator: + arc_color: 58853 + arc_width: 13 + adjustable: false + gesture_bubble: true + - label: + text: -- + x: 402 + y: 109 + width: 142 + height: 40 + text_color: 15658734 + text_font: montserrat_32 + long_mode: DOT + gesture_bubble: true + id: prints_charming_bed_label + text_align: CENTER + - label: + text: -- + x: 402 + y: 148 + width: 142 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: prints_charming_bed_detail + text_align: CENTER + - label: + text: Bed + x: 388 + y: 199 + width: 170 + height: 26 + text_color: 58853 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - arc: + id: prints_charming_fan_arc + x: 24 + y: 229 + width: 154 + height: 154 + min_value: 0 + max_value: 100 + value: 0 + start_angle: 135 + end_angle: 45 + arc_width: 13 + arc_color: 1647403 + indicator: + arc_color: 15658734 + arc_width: 13 + adjustable: false + gesture_bubble: true + - label: + text: -- + x: 30 + y: 276 + width: 142 + height: 40 + text_color: 15658734 + text_font: montserrat_32 + long_mode: DOT + gesture_bubble: true + id: prints_charming_fan_label + text_align: CENTER + - label: + text: -- + x: 30 + y: 315 + width: 142 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: prints_charming_fan_detail + text_align: CENTER + - label: + text: Part + x: 16 + y: 366 + width: 170 + height: 26 + text_color: 15658734 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - arc: + id: prints_charming_aux_arc + x: 210 + y: 229 + width: 154 + height: 154 + min_value: 0 + max_value: 100 + value: 0 + start_angle: 135 + end_angle: 45 + arc_width: 13 + arc_color: 1647403 + indicator: + arc_color: 15658734 + arc_width: 13 + adjustable: false + gesture_bubble: true + - label: + text: -- + x: 216 + y: 276 + width: 142 + height: 40 + text_color: 15658734 + text_font: montserrat_32 + long_mode: DOT + gesture_bubble: true + id: prints_charming_aux_label + text_align: CENTER + - label: + text: -- + x: 216 + y: 315 + width: 142 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: prints_charming_aux_detail + text_align: CENTER + - label: + text: Aux + x: 202 + y: 366 + width: 170 + height: 26 + text_color: 15658734 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - arc: + id: prints_charming_exhaust_arc + x: 396 + y: 229 + width: 154 + height: 154 + min_value: 0 + max_value: 100 + value: 0 + start_angle: 135 + end_angle: 45 + arc_width: 13 + arc_color: 1647403 + indicator: + arc_color: 65280 + arc_width: 13 + adjustable: false + gesture_bubble: true + - label: + text: -- + x: 402 + y: 276 + width: 142 + height: 40 + text_color: 15658734 + text_font: montserrat_32 + long_mode: DOT + gesture_bubble: true + id: prints_charming_exhaust_label + text_align: CENTER + - label: + text: -- + x: 402 + y: 315 + width: 142 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: prints_charming_exhaust_detail + text_align: CENTER + - label: + text: Exhaust + x: 388 + y: 366 + width: 170 + height: 26 + text_color: 65280 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - label: + text: -- + x: 16 + y: 401 + width: 544 + height: 34 + text_color: 65280 + text_font: montserrat_26 + long_mode: DOT + gesture_bubble: true + id: prints_charming_remaining_label + text_align: CENTER + - label: + text: Telemetry unavailable + x: 16 + y: 430 + width: 544 + height: 20 + text_color: 11449271 + text_font: montserrat_12 + long_mode: DOT + gesture_bubble: true + id: prints_charming_stage_label + text_align: CENTER + - label: + text: -- + x: 594 + y: 397 + width: 190 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: prints_charming_layers_label + text_align: CENTER + - label: + text: AMS A + x: 594 + y: 70 + width: 190 + height: 28 + text_color: 11449271 + text_font: montserrat_20 long_mode: DOT gesture_bubble: true text_align: CENTER - - obj: - x: 282 - y: 132 - width: 238 - height: 118 - bg_color: 1516078 - radius: 16 - border_width: 0 - pad_all: 0 - scrollable: false - gesture_bubble: true - widgets: - - label: - text: NOZZLE / TARGET - x: 16 - y: 12 - width: 206 - height: 22 - text_color: 9544629 - text_font: montserrat_14 - long_mode: DOT - gesture_bubble: true - - label: - text: -- - x: 16 - y: 38 - width: 206 - height: 76 - text_color: 15594487 - text_font: montserrat_26 - long_mode: DOT - gesture_bubble: true - id: prints_charming_nozzle_label - - obj: - x: 538 - y: 132 - width: 238 - height: 118 - bg_color: 1516078 - radius: 16 - border_width: 0 - pad_all: 0 - scrollable: false - gesture_bubble: true - widgets: - - label: - text: BED / TARGET - x: 16 - y: 12 - width: 206 - height: 22 - text_color: 9544629 - text_font: montserrat_14 - long_mode: DOT - gesture_bubble: true - - label: - text: -- - x: 16 - y: 38 - width: 206 - height: 76 - text_color: 15594487 - text_font: montserrat_26 - long_mode: DOT - gesture_bubble: true - id: prints_charming_bed_label - - obj: - x: 282 - y: 262 - width: 238 - height: 86 - bg_color: 1516078 - radius: 16 - border_width: 0 - pad_all: 0 - scrollable: false - gesture_bubble: true - widgets: - - label: - text: REMAINING - x: 16 - y: 12 - width: 206 - height: 22 - text_color: 9544629 - text_font: montserrat_14 - long_mode: DOT - gesture_bubble: true - - label: - text: -- - x: 16 - y: 38 - width: 206 - height: 44 - text_color: 15594487 - text_font: montserrat_26 - long_mode: DOT - gesture_bubble: true - id: prints_charming_remaining_label - - obj: - x: 538 - y: 262 - width: 238 - height: 86 - bg_color: 1516078 - radius: 16 - border_width: 0 - pad_all: 0 - scrollable: false - gesture_bubble: true - widgets: - - label: - text: LAYER - x: 16 - y: 12 - width: 206 - height: 22 - text_color: 9544629 - text_font: montserrat_14 - long_mode: DOT - gesture_bubble: true - - label: - text: -- - x: 16 - y: 38 - width: 206 - height: 44 - text_color: 15594487 - text_font: montserrat_26 - long_mode: DOT - gesture_bubble: true - id: prints_charming_layers_label - - label: - text: Telemetry unavailable - x: 24 - y: 358 - width: 752 - height: 24 - text_color: 9544629 - text_font: montserrat_16 - long_mode: DOT - gesture_bubble: true - id: prints_charming_stage_label - - label: - text: FILAMENT / ACTIVE SLOT OUTLINED IN GREEN - x: 24 - y: 383 - width: 752 - height: 20 - text_color: 9544629 - text_font: montserrat_12 - long_mode: DOT - gesture_bubble: true - obj: id: prints_charming_tray_0_card - x: 24 - y: 401 - width: 87 - height: 32 - bg_color: 1516078 - radius: 6 + x: 594 + y: 102 + width: 44 + height: 82 + bg_color: 0 + radius: 5 border_width: 1 - border_color: 2503746 + border_color: 1647403 pad_all: 0 scrollable: false gesture_bubble: true widgets: - obj: id: prints_charming_tray_0_swatch - x: 1 - y: 1 - width: 83 - height: 5 - bg_color: 2503746 - radius: 2 + x: 3 + y: 3 + width: 36 + height: 40 + bg_color: 1647403 + radius: 4 border_width: 0 pad_all: 0 scrollable: false gesture_bubble: true - label: - text: A1 -- - x: 6 - y: 11 - width: 75 - height: 20 - text_color: 15594487 + text: 'A1 + + --' + x: 1 + y: 46 + width: 40 + height: 34 + text_color: 15658734 text_font: montserrat_12 long_mode: DOT gesture_bubble: true id: prints_charming_tray_0_label + text_align: CENTER - obj: id: prints_charming_tray_1_card - x: 119 - y: 401 - width: 87 - height: 32 - bg_color: 1516078 - radius: 6 + x: 642 + y: 102 + width: 44 + height: 82 + bg_color: 0 + radius: 5 border_width: 1 - border_color: 2503746 + border_color: 1647403 pad_all: 0 scrollable: false gesture_bubble: true widgets: - obj: id: prints_charming_tray_1_swatch - x: 1 - y: 1 - width: 83 - height: 5 - bg_color: 2503746 - radius: 2 + x: 3 + y: 3 + width: 36 + height: 40 + bg_color: 1647403 + radius: 4 border_width: 0 pad_all: 0 scrollable: false gesture_bubble: true - label: - text: A2 -- - x: 6 - y: 11 - width: 75 - height: 20 - text_color: 15594487 + text: 'A2 + + --' + x: 1 + y: 46 + width: 40 + height: 34 + text_color: 15658734 text_font: montserrat_12 long_mode: DOT gesture_bubble: true id: prints_charming_tray_1_label + text_align: CENTER - obj: id: prints_charming_tray_2_card - x: 214 - y: 401 - width: 87 - height: 32 - bg_color: 1516078 - radius: 6 + x: 690 + y: 102 + width: 44 + height: 82 + bg_color: 0 + radius: 5 border_width: 1 - border_color: 2503746 + border_color: 1647403 pad_all: 0 scrollable: false gesture_bubble: true widgets: - obj: id: prints_charming_tray_2_swatch - x: 1 - y: 1 - width: 83 - height: 5 - bg_color: 2503746 - radius: 2 + x: 3 + y: 3 + width: 36 + height: 40 + bg_color: 1647403 + radius: 4 border_width: 0 pad_all: 0 scrollable: false gesture_bubble: true - label: - text: A3 -- - x: 6 - y: 11 - width: 75 - height: 20 - text_color: 15594487 + text: 'A3 + + --' + x: 1 + y: 46 + width: 40 + height: 34 + text_color: 15658734 text_font: montserrat_12 long_mode: DOT gesture_bubble: true id: prints_charming_tray_2_label + text_align: CENTER - obj: id: prints_charming_tray_3_card - x: 309 - y: 401 - width: 87 - height: 32 - bg_color: 1516078 - radius: 6 + x: 738 + y: 102 + width: 44 + height: 82 + bg_color: 0 + radius: 5 border_width: 1 - border_color: 2503746 + border_color: 1647403 pad_all: 0 scrollable: false gesture_bubble: true widgets: - obj: id: prints_charming_tray_3_swatch - x: 1 - y: 1 - width: 83 - height: 5 - bg_color: 2503746 - radius: 2 + x: 3 + y: 3 + width: 36 + height: 40 + bg_color: 1647403 + radius: 4 border_width: 0 pad_all: 0 scrollable: false gesture_bubble: true - label: - text: A4 -- - x: 6 - y: 11 - width: 75 - height: 20 - text_color: 15594487 + text: 'A4 + + --' + x: 1 + y: 46 + width: 40 + height: 34 + text_color: 15658734 text_font: montserrat_12 long_mode: DOT gesture_bubble: true id: prints_charming_tray_3_label + text_align: CENTER + - label: + text: AMS B + x: 594 + y: 215 + width: 190 + height: 28 + text_color: 11449271 + text_font: montserrat_20 + long_mode: DOT + gesture_bubble: true + text_align: CENTER - obj: id: prints_charming_tray_4_card - x: 404 - y: 401 - width: 87 - height: 32 - bg_color: 1516078 - radius: 6 + x: 594 + y: 247 + width: 44 + height: 82 + bg_color: 0 + radius: 5 border_width: 1 - border_color: 2503746 + border_color: 1647403 pad_all: 0 scrollable: false gesture_bubble: true widgets: - obj: id: prints_charming_tray_4_swatch - x: 1 - y: 1 - width: 83 - height: 5 - bg_color: 2503746 - radius: 2 + x: 3 + y: 3 + width: 36 + height: 40 + bg_color: 1647403 + radius: 4 border_width: 0 pad_all: 0 scrollable: false gesture_bubble: true - label: - text: B1 -- - x: 6 - y: 11 - width: 75 - height: 20 - text_color: 15594487 + text: 'B1 + + --' + x: 1 + y: 46 + width: 40 + height: 34 + text_color: 15658734 text_font: montserrat_12 long_mode: DOT gesture_bubble: true id: prints_charming_tray_4_label + text_align: CENTER - obj: id: prints_charming_tray_5_card - x: 499 - y: 401 - width: 87 - height: 32 - bg_color: 1516078 - radius: 6 + x: 642 + y: 247 + width: 44 + height: 82 + bg_color: 0 + radius: 5 border_width: 1 - border_color: 2503746 + border_color: 1647403 pad_all: 0 scrollable: false gesture_bubble: true widgets: - obj: id: prints_charming_tray_5_swatch - x: 1 - y: 1 - width: 83 - height: 5 - bg_color: 2503746 - radius: 2 + x: 3 + y: 3 + width: 36 + height: 40 + bg_color: 1647403 + radius: 4 border_width: 0 pad_all: 0 scrollable: false gesture_bubble: true - label: - text: B2 -- - x: 6 - y: 11 - width: 75 - height: 20 - text_color: 15594487 + text: 'B2 + + --' + x: 1 + y: 46 + width: 40 + height: 34 + text_color: 15658734 text_font: montserrat_12 long_mode: DOT gesture_bubble: true id: prints_charming_tray_5_label + text_align: CENTER - obj: id: prints_charming_tray_6_card - x: 594 - y: 401 - width: 87 - height: 32 - bg_color: 1516078 - radius: 6 + x: 690 + y: 247 + width: 44 + height: 82 + bg_color: 0 + radius: 5 border_width: 1 - border_color: 2503746 + border_color: 1647403 pad_all: 0 scrollable: false gesture_bubble: true widgets: - obj: id: prints_charming_tray_6_swatch - x: 1 - y: 1 - width: 83 - height: 5 - bg_color: 2503746 - radius: 2 + x: 3 + y: 3 + width: 36 + height: 40 + bg_color: 1647403 + radius: 4 border_width: 0 pad_all: 0 scrollable: false gesture_bubble: true - label: - text: B3 -- - x: 6 - y: 11 - width: 75 - height: 20 - text_color: 15594487 + text: 'B3 + + --' + x: 1 + y: 46 + width: 40 + height: 34 + text_color: 15658734 text_font: montserrat_12 long_mode: DOT gesture_bubble: true id: prints_charming_tray_6_label + text_align: CENTER - obj: id: prints_charming_tray_7_card - x: 689 - y: 401 - width: 87 - height: 32 - bg_color: 1516078 - radius: 6 + x: 738 + y: 247 + width: 44 + height: 82 + bg_color: 0 + radius: 5 border_width: 1 - border_color: 2503746 + border_color: 1647403 pad_all: 0 scrollable: false gesture_bubble: true widgets: - obj: id: prints_charming_tray_7_swatch - x: 1 - y: 1 - width: 83 - height: 5 - bg_color: 2503746 - radius: 2 + x: 3 + y: 3 + width: 36 + height: 40 + bg_color: 1647403 + radius: 4 border_width: 0 pad_all: 0 scrollable: false gesture_bubble: true - label: - text: B4 -- - x: 6 - y: 11 - width: 75 - height: 20 - text_color: 15594487 + text: 'B4 + + --' + x: 1 + y: 46 + width: 40 + height: 34 + text_color: 15658734 text_font: montserrat_12 long_mode: DOT gesture_bubble: true id: prints_charming_tray_7_label + text_align: CENTER - button: - x: 24 - y: 444 - width: 88 + x: 16 + y: 446 + width: 64 height: 30 - bg_color: 1516078 + bg_color: 1647403 radius: 8 border_width: 0 pad_all: 0 gesture_bubble: true widgets: - label: - text: < PREV + text: < align: CENTER - text_font: montserrat_12 + text_color: 15658734 + text_font: montserrat_18 on_click: - lvgl.page.previous: {} - button: - x: 688 - y: 444 - width: 88 + x: 720 + y: 446 + width: 64 height: 30 - bg_color: 1516078 + bg_color: 1647403 radius: 8 border_width: 0 pad_all: 0 gesture_bubble: true widgets: - label: - text: NEXT > + text: '>' align: CENTER - text_font: montserrat_12 + text_color: 15658734 + text_font: montserrat_18 on_click: - lvgl.page.next: {} - label: - text: 1 / 5 SWIPE LEFT / RIGHT - x: 130 - y: 451 - width: 540 + text: Waiting for Home Assistant + x: 94 + y: 449 + width: 612 height: 22 - text_color: 9544629 + text_color: 15658734 text_font: montserrat_14 long_mode: DOT gesture_bubble: true + id: prints_charming_task_label text_align: CENTER - id: polly_pocket_page - bg_color: 856859 + bg_color: 0 bg_opa: COVER pad_all: 0 scrollable: false @@ -1516,339 +1761,517 @@ lvgl: on_load: - script.execute: polly_pocket_refresh widgets: + - bar: + id: polly_pocket_top_progress + x: 0 + y: 0 + width: 800 + height: 5 + min_value: 0 + max_value: 100 + value: 0 + bg_color: 1647403 + indicator: + bg_color: 65280 + gesture_bubble: true - label: text: Polly-Pocket - x: 24 - y: 16 - width: 545 - height: 36 - text_color: 15594487 - text_font: montserrat_28 + x: 16 + y: 17 + width: 485 + height: 34 + text_color: 65280 + text_font: montserrat_26 long_mode: DOT gesture_bubble: true - label: - text: A1 mini / Office - x: 24 - y: 53 - width: 545 + text: 2 / 5 + x: 520 + y: 24 + width: 70 height: 22 - text_color: 9544629 + text_color: 11449271 text_font: montserrat_14 long_mode: DOT gesture_bubble: true + text_align: CENTER + - label: + text: SYNCING + x: 598 + y: 21 + width: 186 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: polly_pocket_status_label + text_align: RIGHT - obj: - x: 586 - y: 20 - width: 190 - height: 42 - bg_color: 1516078 - radius: 21 + x: 578 + y: 64 + width: 1 + height: 362 + bg_color: 1647403 border_width: 0 pad_all: 0 scrollable: false gesture_bubble: true - widgets: - - label: - text: SYNCING - x: 0 - y: 11 - width: 190 - height: 24 - text_color: 9544629 - text_font: montserrat_16 - long_mode: DOT - gesture_bubble: true - id: polly_pocket_status_label - text_align: CENTER - - label: - text: Waiting for Home Assistant - x: 24 - y: 88 - width: 752 - height: 28 - text_color: 15594487 - text_font: montserrat_20 - long_mode: DOT - gesture_bubble: true - id: polly_pocket_task_label - arc: id: polly_pocket_progress_arc - x: 28 - y: 132 - width: 224 - height: 224 + x: 24 + y: 62 + width: 154 + height: 154 min_value: 0 max_value: 100 value: 0 start_angle: 135 end_angle: 45 - arc_width: 14 - arc_color: 2503746 + arc_width: 13 + arc_color: 1647403 indicator: - arc_color: 6348442 - arc_width: 14 + arc_color: 65280 + arc_width: 13 adjustable: false gesture_bubble: true - label: text: -- - x: 42 - y: 207 - width: 196 - height: 56 - text_color: 15594487 - text_font: montserrat_48 + x: 30 + y: 109 + width: 142 + height: 40 + text_color: 15658734 + text_font: montserrat_32 long_mode: DOT gesture_bubble: true id: polly_pocket_progress_label text_align: CENTER - label: - text: PRINT PROGRESS - x: 42 - y: 266 - width: 196 - height: 22 - text_color: 9544629 - text_font: montserrat_14 + text: -- + x: 30 + y: 148 + width: 142 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: polly_pocket_progress_detail + text_align: CENTER + - label: + text: Progress + x: 16 + y: 199 + width: 170 + height: 26 + text_color: 65280 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - arc: + id: polly_pocket_nozzle_arc + x: 210 + y: 62 + width: 154 + height: 154 + min_value: 0 + max_value: 300 + value: 0 + start_angle: 135 + end_angle: 45 + arc_width: 13 + arc_color: 1647403 + indicator: + arc_color: 16755200 + arc_width: 13 + adjustable: false + gesture_bubble: true + - label: + text: -- + x: 216 + y: 109 + width: 142 + height: 40 + text_color: 15658734 + text_font: montserrat_32 + long_mode: DOT + gesture_bubble: true + id: polly_pocket_nozzle_label + text_align: CENTER + - label: + text: -- + x: 216 + y: 148 + width: 142 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: polly_pocket_nozzle_detail + text_align: CENTER + - label: + text: Nozzle + x: 202 + y: 199 + width: 170 + height: 26 + text_color: 16755200 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - arc: + id: polly_pocket_bed_arc + x: 396 + y: 62 + width: 154 + height: 154 + min_value: 0 + max_value: 120 + value: 0 + start_angle: 135 + end_angle: 45 + arc_width: 13 + arc_color: 1647403 + indicator: + arc_color: 58853 + arc_width: 13 + adjustable: false + gesture_bubble: true + - label: + text: -- + x: 402 + y: 109 + width: 142 + height: 40 + text_color: 15658734 + text_font: montserrat_32 + long_mode: DOT + gesture_bubble: true + id: polly_pocket_bed_label + text_align: CENTER + - label: + text: -- + x: 402 + y: 148 + width: 142 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: polly_pocket_bed_detail + text_align: CENTER + - label: + text: Bed + x: 388 + y: 199 + width: 170 + height: 26 + text_color: 58853 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - arc: + id: polly_pocket_fan_arc + x: 24 + y: 229 + width: 154 + height: 154 + min_value: 0 + max_value: 100 + value: 0 + start_angle: 135 + end_angle: 45 + arc_width: 13 + arc_color: 1647403 + indicator: + arc_color: 15658734 + arc_width: 13 + adjustable: false + gesture_bubble: true + - label: + text: -- + x: 30 + y: 276 + width: 142 + height: 40 + text_color: 15658734 + text_font: montserrat_32 + long_mode: DOT + gesture_bubble: true + id: polly_pocket_fan_label + text_align: CENTER + - label: + text: -- + x: 30 + y: 315 + width: 142 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: polly_pocket_fan_detail + text_align: CENTER + - label: + text: Part + x: 16 + y: 366 + width: 170 + height: 26 + text_color: 15658734 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - arc: + id: polly_pocket_aux_arc + x: 210 + y: 229 + width: 154 + height: 154 + min_value: 0 + max_value: 100 + value: 0 + start_angle: 135 + end_angle: 45 + arc_width: 13 + arc_color: 1647403 + indicator: + arc_color: 15658734 + arc_width: 13 + adjustable: false + gesture_bubble: true + - label: + text: -- + x: 216 + y: 276 + width: 142 + height: 40 + text_color: 15658734 + text_font: montserrat_32 + long_mode: DOT + gesture_bubble: true + id: polly_pocket_aux_label + text_align: CENTER + - label: + text: -- + x: 216 + y: 315 + width: 142 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: polly_pocket_aux_detail + text_align: CENTER + - label: + text: Aux + x: 202 + y: 366 + width: 170 + height: 26 + text_color: 15658734 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - arc: + id: polly_pocket_exhaust_arc + x: 396 + y: 229 + width: 154 + height: 154 + min_value: 0 + max_value: 100 + value: 0 + start_angle: 135 + end_angle: 45 + arc_width: 13 + arc_color: 1647403 + indicator: + arc_color: 65280 + arc_width: 13 + adjustable: false + gesture_bubble: true + - label: + text: -- + x: 402 + y: 276 + width: 142 + height: 40 + text_color: 15658734 + text_font: montserrat_32 + long_mode: DOT + gesture_bubble: true + id: polly_pocket_exhaust_label + text_align: CENTER + - label: + text: -- + x: 402 + y: 315 + width: 142 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: polly_pocket_exhaust_detail + text_align: CENTER + - label: + text: Exhaust + x: 388 + y: 366 + width: 170 + height: 26 + text_color: 65280 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - label: + text: -- + x: 16 + y: 401 + width: 544 + height: 34 + text_color: 65280 + text_font: montserrat_26 + long_mode: DOT + gesture_bubble: true + id: polly_pocket_remaining_label + text_align: CENTER + - label: + text: Telemetry unavailable + x: 16 + y: 430 + width: 544 + height: 20 + text_color: 11449271 + text_font: montserrat_12 + long_mode: DOT + gesture_bubble: true + id: polly_pocket_stage_label + text_align: CENTER + - label: + text: -- + x: 594 + y: 397 + width: 190 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: polly_pocket_layers_label + text_align: CENTER + - label: + text: EXTERNAL SPOOL + x: 594 + y: 70 + width: 190 + height: 28 + text_color: 11449271 + text_font: montserrat_20 long_mode: DOT gesture_bubble: true text_align: CENTER - - obj: - x: 282 - y: 132 - width: 238 - height: 118 - bg_color: 1516078 - radius: 16 - border_width: 0 - pad_all: 0 - scrollable: false - gesture_bubble: true - widgets: - - label: - text: NOZZLE / TARGET - x: 16 - y: 12 - width: 206 - height: 22 - text_color: 9544629 - text_font: montserrat_14 - long_mode: DOT - gesture_bubble: true - - label: - text: -- - x: 16 - y: 38 - width: 206 - height: 76 - text_color: 15594487 - text_font: montserrat_26 - long_mode: DOT - gesture_bubble: true - id: polly_pocket_nozzle_label - - obj: - x: 538 - y: 132 - width: 238 - height: 118 - bg_color: 1516078 - radius: 16 - border_width: 0 - pad_all: 0 - scrollable: false - gesture_bubble: true - widgets: - - label: - text: BED / TARGET - x: 16 - y: 12 - width: 206 - height: 22 - text_color: 9544629 - text_font: montserrat_14 - long_mode: DOT - gesture_bubble: true - - label: - text: -- - x: 16 - y: 38 - width: 206 - height: 76 - text_color: 15594487 - text_font: montserrat_26 - long_mode: DOT - gesture_bubble: true - id: polly_pocket_bed_label - - obj: - x: 282 - y: 262 - width: 238 - height: 86 - bg_color: 1516078 - radius: 16 - border_width: 0 - pad_all: 0 - scrollable: false - gesture_bubble: true - widgets: - - label: - text: REMAINING - x: 16 - y: 12 - width: 206 - height: 22 - text_color: 9544629 - text_font: montserrat_14 - long_mode: DOT - gesture_bubble: true - - label: - text: -- - x: 16 - y: 38 - width: 206 - height: 44 - text_color: 15594487 - text_font: montserrat_26 - long_mode: DOT - gesture_bubble: true - id: polly_pocket_remaining_label - - obj: - x: 538 - y: 262 - width: 238 - height: 86 - bg_color: 1516078 - radius: 16 - border_width: 0 - pad_all: 0 - scrollable: false - gesture_bubble: true - widgets: - - label: - text: LAYER - x: 16 - y: 12 - width: 206 - height: 22 - text_color: 9544629 - text_font: montserrat_14 - long_mode: DOT - gesture_bubble: true - - label: - text: -- - x: 16 - y: 38 - width: 206 - height: 44 - text_color: 15594487 - text_font: montserrat_26 - long_mode: DOT - gesture_bubble: true - id: polly_pocket_layers_label - - label: - text: Telemetry unavailable - x: 24 - y: 358 - width: 752 - height: 24 - text_color: 9544629 - text_font: montserrat_16 - long_mode: DOT - gesture_bubble: true - id: polly_pocket_stage_label - - label: - text: FILAMENT / ACTIVE SLOT OUTLINED IN GREEN - x: 24 - y: 383 - width: 752 - height: 20 - text_color: 9544629 - text_font: montserrat_12 - long_mode: DOT - gesture_bubble: true - obj: id: polly_pocket_tray_0_card - x: 24 - y: 401 - width: 752 - height: 32 - bg_color: 1516078 - radius: 6 + x: 594 + y: 102 + width: 44 + height: 82 + bg_color: 0 + radius: 5 border_width: 1 - border_color: 2503746 + border_color: 1647403 pad_all: 0 scrollable: false gesture_bubble: true widgets: - obj: id: polly_pocket_tray_0_swatch - x: 1 - y: 1 - width: 748 - height: 5 - bg_color: 2503746 - radius: 2 + x: 3 + y: 3 + width: 36 + height: 40 + bg_color: 1647403 + radius: 4 border_width: 0 pad_all: 0 scrollable: false gesture_bubble: true - label: - text: EXT -- - x: 6 - y: 11 - width: 740 - height: 20 - text_color: 15594487 + text: 'EXT + + --' + x: 1 + y: 46 + width: 40 + height: 34 + text_color: 15658734 text_font: montserrat_12 long_mode: DOT gesture_bubble: true id: polly_pocket_tray_0_label + text_align: CENTER - button: - x: 24 - y: 444 - width: 88 + x: 16 + y: 446 + width: 64 height: 30 - bg_color: 1516078 + bg_color: 1647403 radius: 8 border_width: 0 pad_all: 0 gesture_bubble: true widgets: - label: - text: < PREV + text: < align: CENTER - text_font: montserrat_12 + text_color: 15658734 + text_font: montserrat_18 on_click: - lvgl.page.previous: {} - button: - x: 688 - y: 444 - width: 88 + x: 720 + y: 446 + width: 64 height: 30 - bg_color: 1516078 + bg_color: 1647403 radius: 8 border_width: 0 pad_all: 0 gesture_bubble: true widgets: - label: - text: NEXT > + text: '>' align: CENTER - text_font: montserrat_12 + text_color: 15658734 + text_font: montserrat_18 on_click: - lvgl.page.next: {} - label: - text: 2 / 5 SWIPE LEFT / RIGHT - x: 130 - y: 451 - width: 540 + text: Waiting for Home Assistant + x: 94 + y: 449 + width: 612 height: 22 - text_color: 9544629 + text_color: 15658734 text_font: montserrat_14 long_mode: DOT gesture_bubble: true + id: polly_pocket_task_label text_align: CENTER - id: ds_turd_flinger_page - bg_color: 856859 + bg_color: 0 bg_opa: COVER pad_all: 0 scrollable: false @@ -1868,450 +2291,637 @@ lvgl: on_load: - script.execute: ds_turd_flinger_refresh widgets: + - bar: + id: ds_turd_flinger_top_progress + x: 0 + y: 0 + width: 800 + height: 5 + min_value: 0 + max_value: 100 + value: 0 + bg_color: 1647403 + indicator: + bg_color: 65280 + gesture_bubble: true - label: text: Ds-Turd-Flinger - x: 24 - y: 16 - width: 545 - height: 36 - text_color: 15594487 - text_font: montserrat_28 + x: 16 + y: 17 + width: 485 + height: 34 + text_color: 65280 + text_font: montserrat_26 long_mode: DOT gesture_bubble: true - label: - text: A1 / Upstairs - x: 24 - y: 53 - width: 545 + text: 3 / 5 + x: 520 + y: 24 + width: 70 height: 22 - text_color: 9544629 + text_color: 11449271 text_font: montserrat_14 long_mode: DOT gesture_bubble: true + text_align: CENTER + - label: + text: SYNCING + x: 598 + y: 21 + width: 186 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: ds_turd_flinger_status_label + text_align: RIGHT - obj: - x: 586 - y: 20 - width: 190 - height: 42 - bg_color: 1516078 - radius: 21 + x: 578 + y: 64 + width: 1 + height: 362 + bg_color: 1647403 border_width: 0 pad_all: 0 scrollable: false gesture_bubble: true - widgets: - - label: - text: SYNCING - x: 0 - y: 11 - width: 190 - height: 24 - text_color: 9544629 - text_font: montserrat_16 - long_mode: DOT - gesture_bubble: true - id: ds_turd_flinger_status_label - text_align: CENTER - - label: - text: Waiting for Home Assistant - x: 24 - y: 88 - width: 752 - height: 28 - text_color: 15594487 - text_font: montserrat_20 - long_mode: DOT - gesture_bubble: true - id: ds_turd_flinger_task_label - arc: id: ds_turd_flinger_progress_arc - x: 28 - y: 132 - width: 224 - height: 224 + x: 24 + y: 62 + width: 154 + height: 154 min_value: 0 max_value: 100 value: 0 start_angle: 135 end_angle: 45 - arc_width: 14 - arc_color: 2503746 + arc_width: 13 + arc_color: 1647403 indicator: - arc_color: 6348442 - arc_width: 14 + arc_color: 65280 + arc_width: 13 adjustable: false gesture_bubble: true - label: text: -- - x: 42 - y: 207 - width: 196 - height: 56 - text_color: 15594487 - text_font: montserrat_48 + x: 30 + y: 109 + width: 142 + height: 40 + text_color: 15658734 + text_font: montserrat_32 long_mode: DOT gesture_bubble: true id: ds_turd_flinger_progress_label text_align: CENTER - label: - text: PRINT PROGRESS - x: 42 - y: 266 - width: 196 - height: 22 - text_color: 9544629 - text_font: montserrat_14 + text: -- + x: 30 + y: 148 + width: 142 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: ds_turd_flinger_progress_detail + text_align: CENTER + - label: + text: Progress + x: 16 + y: 199 + width: 170 + height: 26 + text_color: 65280 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - arc: + id: ds_turd_flinger_nozzle_arc + x: 210 + y: 62 + width: 154 + height: 154 + min_value: 0 + max_value: 300 + value: 0 + start_angle: 135 + end_angle: 45 + arc_width: 13 + arc_color: 1647403 + indicator: + arc_color: 16755200 + arc_width: 13 + adjustable: false + gesture_bubble: true + - label: + text: -- + x: 216 + y: 109 + width: 142 + height: 40 + text_color: 15658734 + text_font: montserrat_32 + long_mode: DOT + gesture_bubble: true + id: ds_turd_flinger_nozzle_label + text_align: CENTER + - label: + text: -- + x: 216 + y: 148 + width: 142 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: ds_turd_flinger_nozzle_detail + text_align: CENTER + - label: + text: Nozzle + x: 202 + y: 199 + width: 170 + height: 26 + text_color: 16755200 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - arc: + id: ds_turd_flinger_bed_arc + x: 396 + y: 62 + width: 154 + height: 154 + min_value: 0 + max_value: 120 + value: 0 + start_angle: 135 + end_angle: 45 + arc_width: 13 + arc_color: 1647403 + indicator: + arc_color: 58853 + arc_width: 13 + adjustable: false + gesture_bubble: true + - label: + text: -- + x: 402 + y: 109 + width: 142 + height: 40 + text_color: 15658734 + text_font: montserrat_32 + long_mode: DOT + gesture_bubble: true + id: ds_turd_flinger_bed_label + text_align: CENTER + - label: + text: -- + x: 402 + y: 148 + width: 142 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: ds_turd_flinger_bed_detail + text_align: CENTER + - label: + text: Bed + x: 388 + y: 199 + width: 170 + height: 26 + text_color: 58853 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - arc: + id: ds_turd_flinger_fan_arc + x: 24 + y: 229 + width: 154 + height: 154 + min_value: 0 + max_value: 100 + value: 0 + start_angle: 135 + end_angle: 45 + arc_width: 13 + arc_color: 1647403 + indicator: + arc_color: 15658734 + arc_width: 13 + adjustable: false + gesture_bubble: true + - label: + text: -- + x: 30 + y: 276 + width: 142 + height: 40 + text_color: 15658734 + text_font: montserrat_32 + long_mode: DOT + gesture_bubble: true + id: ds_turd_flinger_fan_label + text_align: CENTER + - label: + text: -- + x: 30 + y: 315 + width: 142 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: ds_turd_flinger_fan_detail + text_align: CENTER + - label: + text: Part + x: 16 + y: 366 + width: 170 + height: 26 + text_color: 15658734 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - arc: + id: ds_turd_flinger_aux_arc + x: 210 + y: 229 + width: 154 + height: 154 + min_value: 0 + max_value: 100 + value: 0 + start_angle: 135 + end_angle: 45 + arc_width: 13 + arc_color: 1647403 + indicator: + arc_color: 15658734 + arc_width: 13 + adjustable: false + gesture_bubble: true + - label: + text: -- + x: 216 + y: 276 + width: 142 + height: 40 + text_color: 15658734 + text_font: montserrat_32 + long_mode: DOT + gesture_bubble: true + id: ds_turd_flinger_aux_label + text_align: CENTER + - label: + text: -- + x: 216 + y: 315 + width: 142 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: ds_turd_flinger_aux_detail + text_align: CENTER + - label: + text: Aux + x: 202 + y: 366 + width: 170 + height: 26 + text_color: 15658734 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - arc: + id: ds_turd_flinger_exhaust_arc + x: 396 + y: 229 + width: 154 + height: 154 + min_value: 0 + max_value: 100 + value: 0 + start_angle: 135 + end_angle: 45 + arc_width: 13 + arc_color: 1647403 + indicator: + arc_color: 65280 + arc_width: 13 + adjustable: false + gesture_bubble: true + - label: + text: -- + x: 402 + y: 276 + width: 142 + height: 40 + text_color: 15658734 + text_font: montserrat_32 + long_mode: DOT + gesture_bubble: true + id: ds_turd_flinger_exhaust_label + text_align: CENTER + - label: + text: -- + x: 402 + y: 315 + width: 142 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: ds_turd_flinger_exhaust_detail + text_align: CENTER + - label: + text: Exhaust + x: 388 + y: 366 + width: 170 + height: 26 + text_color: 65280 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - label: + text: -- + x: 16 + y: 401 + width: 544 + height: 34 + text_color: 65280 + text_font: montserrat_26 + long_mode: DOT + gesture_bubble: true + id: ds_turd_flinger_remaining_label + text_align: CENTER + - label: + text: Telemetry unavailable + x: 16 + y: 430 + width: 544 + height: 20 + text_color: 11449271 + text_font: montserrat_12 + long_mode: DOT + gesture_bubble: true + id: ds_turd_flinger_stage_label + text_align: CENTER + - label: + text: -- + x: 594 + y: 397 + width: 190 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: ds_turd_flinger_layers_label + text_align: CENTER + - label: + text: AMS A + x: 594 + y: 70 + width: 190 + height: 28 + text_color: 11449271 + text_font: montserrat_20 long_mode: DOT gesture_bubble: true text_align: CENTER - - obj: - x: 282 - y: 132 - width: 238 - height: 118 - bg_color: 1516078 - radius: 16 - border_width: 0 - pad_all: 0 - scrollable: false - gesture_bubble: true - widgets: - - label: - text: NOZZLE / TARGET - x: 16 - y: 12 - width: 206 - height: 22 - text_color: 9544629 - text_font: montserrat_14 - long_mode: DOT - gesture_bubble: true - - label: - text: -- - x: 16 - y: 38 - width: 206 - height: 76 - text_color: 15594487 - text_font: montserrat_26 - long_mode: DOT - gesture_bubble: true - id: ds_turd_flinger_nozzle_label - - obj: - x: 538 - y: 132 - width: 238 - height: 118 - bg_color: 1516078 - radius: 16 - border_width: 0 - pad_all: 0 - scrollable: false - gesture_bubble: true - widgets: - - label: - text: BED / TARGET - x: 16 - y: 12 - width: 206 - height: 22 - text_color: 9544629 - text_font: montserrat_14 - long_mode: DOT - gesture_bubble: true - - label: - text: -- - x: 16 - y: 38 - width: 206 - height: 76 - text_color: 15594487 - text_font: montserrat_26 - long_mode: DOT - gesture_bubble: true - id: ds_turd_flinger_bed_label - - obj: - x: 282 - y: 262 - width: 238 - height: 86 - bg_color: 1516078 - radius: 16 - border_width: 0 - pad_all: 0 - scrollable: false - gesture_bubble: true - widgets: - - label: - text: REMAINING - x: 16 - y: 12 - width: 206 - height: 22 - text_color: 9544629 - text_font: montserrat_14 - long_mode: DOT - gesture_bubble: true - - label: - text: -- - x: 16 - y: 38 - width: 206 - height: 44 - text_color: 15594487 - text_font: montserrat_26 - long_mode: DOT - gesture_bubble: true - id: ds_turd_flinger_remaining_label - - obj: - x: 538 - y: 262 - width: 238 - height: 86 - bg_color: 1516078 - radius: 16 - border_width: 0 - pad_all: 0 - scrollable: false - gesture_bubble: true - widgets: - - label: - text: LAYER - x: 16 - y: 12 - width: 206 - height: 22 - text_color: 9544629 - text_font: montserrat_14 - long_mode: DOT - gesture_bubble: true - - label: - text: -- - x: 16 - y: 38 - width: 206 - height: 44 - text_color: 15594487 - text_font: montserrat_26 - long_mode: DOT - gesture_bubble: true - id: ds_turd_flinger_layers_label - - label: - text: Telemetry unavailable - x: 24 - y: 358 - width: 752 - height: 24 - text_color: 9544629 - text_font: montserrat_16 - long_mode: DOT - gesture_bubble: true - id: ds_turd_flinger_stage_label - - label: - text: FILAMENT / ACTIVE SLOT OUTLINED IN GREEN - x: 24 - y: 383 - width: 752 - height: 20 - text_color: 9544629 - text_font: montserrat_12 - long_mode: DOT - gesture_bubble: true - obj: id: ds_turd_flinger_tray_0_card - x: 24 - y: 401 - width: 182 - height: 32 - bg_color: 1516078 - radius: 6 + x: 594 + y: 102 + width: 44 + height: 82 + bg_color: 0 + radius: 5 border_width: 1 - border_color: 2503746 + border_color: 1647403 pad_all: 0 scrollable: false gesture_bubble: true widgets: - obj: id: ds_turd_flinger_tray_0_swatch - x: 1 - y: 1 - width: 178 - height: 5 - bg_color: 2503746 - radius: 2 + x: 3 + y: 3 + width: 36 + height: 40 + bg_color: 1647403 + radius: 4 border_width: 0 pad_all: 0 scrollable: false gesture_bubble: true - label: - text: A1 -- - x: 6 - y: 11 - width: 170 - height: 20 - text_color: 15594487 + text: 'A1 + + --' + x: 1 + y: 46 + width: 40 + height: 34 + text_color: 15658734 text_font: montserrat_12 long_mode: DOT gesture_bubble: true id: ds_turd_flinger_tray_0_label + text_align: CENTER - obj: id: ds_turd_flinger_tray_1_card - x: 214 - y: 401 - width: 182 - height: 32 - bg_color: 1516078 - radius: 6 + x: 642 + y: 102 + width: 44 + height: 82 + bg_color: 0 + radius: 5 border_width: 1 - border_color: 2503746 + border_color: 1647403 pad_all: 0 scrollable: false gesture_bubble: true widgets: - obj: id: ds_turd_flinger_tray_1_swatch - x: 1 - y: 1 - width: 178 - height: 5 - bg_color: 2503746 - radius: 2 + x: 3 + y: 3 + width: 36 + height: 40 + bg_color: 1647403 + radius: 4 border_width: 0 pad_all: 0 scrollable: false gesture_bubble: true - label: - text: A2 -- - x: 6 - y: 11 - width: 170 - height: 20 - text_color: 15594487 + text: 'A2 + + --' + x: 1 + y: 46 + width: 40 + height: 34 + text_color: 15658734 text_font: montserrat_12 long_mode: DOT gesture_bubble: true id: ds_turd_flinger_tray_1_label + text_align: CENTER - obj: id: ds_turd_flinger_tray_2_card - x: 404 - y: 401 - width: 182 - height: 32 - bg_color: 1516078 - radius: 6 + x: 690 + y: 102 + width: 44 + height: 82 + bg_color: 0 + radius: 5 border_width: 1 - border_color: 2503746 + border_color: 1647403 pad_all: 0 scrollable: false gesture_bubble: true widgets: - obj: id: ds_turd_flinger_tray_2_swatch - x: 1 - y: 1 - width: 178 - height: 5 - bg_color: 2503746 - radius: 2 + x: 3 + y: 3 + width: 36 + height: 40 + bg_color: 1647403 + radius: 4 border_width: 0 pad_all: 0 scrollable: false gesture_bubble: true - label: - text: A3 -- - x: 6 - y: 11 - width: 170 - height: 20 - text_color: 15594487 + text: 'A3 + + --' + x: 1 + y: 46 + width: 40 + height: 34 + text_color: 15658734 text_font: montserrat_12 long_mode: DOT gesture_bubble: true id: ds_turd_flinger_tray_2_label + text_align: CENTER - obj: id: ds_turd_flinger_tray_3_card - x: 594 - y: 401 - width: 182 - height: 32 - bg_color: 1516078 - radius: 6 + x: 738 + y: 102 + width: 44 + height: 82 + bg_color: 0 + radius: 5 border_width: 1 - border_color: 2503746 + border_color: 1647403 pad_all: 0 scrollable: false gesture_bubble: true widgets: - obj: id: ds_turd_flinger_tray_3_swatch - x: 1 - y: 1 - width: 178 - height: 5 - bg_color: 2503746 - radius: 2 + x: 3 + y: 3 + width: 36 + height: 40 + bg_color: 1647403 + radius: 4 border_width: 0 pad_all: 0 scrollable: false gesture_bubble: true - label: - text: A4 -- - x: 6 - y: 11 - width: 170 - height: 20 - text_color: 15594487 + text: 'A4 + + --' + x: 1 + y: 46 + width: 40 + height: 34 + text_color: 15658734 text_font: montserrat_12 long_mode: DOT gesture_bubble: true id: ds_turd_flinger_tray_3_label + text_align: CENTER - button: - x: 24 - y: 444 - width: 88 + x: 16 + y: 446 + width: 64 height: 30 - bg_color: 1516078 + bg_color: 1647403 radius: 8 border_width: 0 pad_all: 0 gesture_bubble: true widgets: - label: - text: < PREV + text: < align: CENTER - text_font: montserrat_12 + text_color: 15658734 + text_font: montserrat_18 on_click: - lvgl.page.previous: {} - button: - x: 688 - y: 444 - width: 88 + x: 720 + y: 446 + width: 64 height: 30 - bg_color: 1516078 + bg_color: 1647403 radius: 8 border_width: 0 pad_all: 0 gesture_bubble: true widgets: - label: - text: NEXT > + text: '>' align: CENTER - text_font: montserrat_12 + text_color: 15658734 + text_font: montserrat_18 on_click: - lvgl.page.next: {} - label: - text: 3 / 5 SWIPE LEFT / RIGHT - x: 130 - y: 451 - width: 540 + text: Waiting for Home Assistant + x: 94 + y: 449 + width: 612 height: 22 - text_color: 9544629 + text_color: 15658734 text_font: montserrat_14 long_mode: DOT gesture_bubble: true + id: ds_turd_flinger_task_label text_align: CENTER - id: jordyns_layer_slayer_page - bg_color: 856859 + bg_color: 0 bg_opa: COVER pad_all: 0 scrollable: false @@ -2331,450 +2941,637 @@ lvgl: on_load: - script.execute: jordyns_layer_slayer_refresh widgets: + - bar: + id: jordyns_layer_slayer_top_progress + x: 0 + y: 0 + width: 800 + height: 5 + min_value: 0 + max_value: 100 + value: 0 + bg_color: 1647403 + indicator: + bg_color: 65280 + gesture_bubble: true - label: text: Jordyns-Layer-Slayer - x: 24 - y: 16 - width: 545 - height: 36 - text_color: 15594487 - text_font: montserrat_28 + x: 16 + y: 17 + width: 485 + height: 34 + text_color: 65280 + text_font: montserrat_26 long_mode: DOT gesture_bubble: true - label: - text: A1 / Upstairs - x: 24 - y: 53 - width: 545 + text: 4 / 5 + x: 520 + y: 24 + width: 70 height: 22 - text_color: 9544629 + text_color: 11449271 text_font: montserrat_14 long_mode: DOT gesture_bubble: true + text_align: CENTER + - label: + text: SYNCING + x: 598 + y: 21 + width: 186 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: jordyns_layer_slayer_status_label + text_align: RIGHT - obj: - x: 586 - y: 20 - width: 190 - height: 42 - bg_color: 1516078 - radius: 21 + x: 578 + y: 64 + width: 1 + height: 362 + bg_color: 1647403 border_width: 0 pad_all: 0 scrollable: false gesture_bubble: true - widgets: - - label: - text: SYNCING - x: 0 - y: 11 - width: 190 - height: 24 - text_color: 9544629 - text_font: montserrat_16 - long_mode: DOT - gesture_bubble: true - id: jordyns_layer_slayer_status_label - text_align: CENTER - - label: - text: Waiting for Home Assistant - x: 24 - y: 88 - width: 752 - height: 28 - text_color: 15594487 - text_font: montserrat_20 - long_mode: DOT - gesture_bubble: true - id: jordyns_layer_slayer_task_label - arc: id: jordyns_layer_slayer_progress_arc - x: 28 - y: 132 - width: 224 - height: 224 + x: 24 + y: 62 + width: 154 + height: 154 min_value: 0 max_value: 100 value: 0 start_angle: 135 end_angle: 45 - arc_width: 14 - arc_color: 2503746 + arc_width: 13 + arc_color: 1647403 indicator: - arc_color: 6348442 - arc_width: 14 + arc_color: 65280 + arc_width: 13 adjustable: false gesture_bubble: true - label: text: -- - x: 42 - y: 207 - width: 196 - height: 56 - text_color: 15594487 - text_font: montserrat_48 + x: 30 + y: 109 + width: 142 + height: 40 + text_color: 15658734 + text_font: montserrat_32 long_mode: DOT gesture_bubble: true id: jordyns_layer_slayer_progress_label text_align: CENTER - label: - text: PRINT PROGRESS - x: 42 - y: 266 - width: 196 - height: 22 - text_color: 9544629 - text_font: montserrat_14 + text: -- + x: 30 + y: 148 + width: 142 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: jordyns_layer_slayer_progress_detail + text_align: CENTER + - label: + text: Progress + x: 16 + y: 199 + width: 170 + height: 26 + text_color: 65280 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - arc: + id: jordyns_layer_slayer_nozzle_arc + x: 210 + y: 62 + width: 154 + height: 154 + min_value: 0 + max_value: 300 + value: 0 + start_angle: 135 + end_angle: 45 + arc_width: 13 + arc_color: 1647403 + indicator: + arc_color: 16755200 + arc_width: 13 + adjustable: false + gesture_bubble: true + - label: + text: -- + x: 216 + y: 109 + width: 142 + height: 40 + text_color: 15658734 + text_font: montserrat_32 + long_mode: DOT + gesture_bubble: true + id: jordyns_layer_slayer_nozzle_label + text_align: CENTER + - label: + text: -- + x: 216 + y: 148 + width: 142 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: jordyns_layer_slayer_nozzle_detail + text_align: CENTER + - label: + text: Nozzle + x: 202 + y: 199 + width: 170 + height: 26 + text_color: 16755200 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - arc: + id: jordyns_layer_slayer_bed_arc + x: 396 + y: 62 + width: 154 + height: 154 + min_value: 0 + max_value: 120 + value: 0 + start_angle: 135 + end_angle: 45 + arc_width: 13 + arc_color: 1647403 + indicator: + arc_color: 58853 + arc_width: 13 + adjustable: false + gesture_bubble: true + - label: + text: -- + x: 402 + y: 109 + width: 142 + height: 40 + text_color: 15658734 + text_font: montserrat_32 + long_mode: DOT + gesture_bubble: true + id: jordyns_layer_slayer_bed_label + text_align: CENTER + - label: + text: -- + x: 402 + y: 148 + width: 142 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: jordyns_layer_slayer_bed_detail + text_align: CENTER + - label: + text: Bed + x: 388 + y: 199 + width: 170 + height: 26 + text_color: 58853 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - arc: + id: jordyns_layer_slayer_fan_arc + x: 24 + y: 229 + width: 154 + height: 154 + min_value: 0 + max_value: 100 + value: 0 + start_angle: 135 + end_angle: 45 + arc_width: 13 + arc_color: 1647403 + indicator: + arc_color: 15658734 + arc_width: 13 + adjustable: false + gesture_bubble: true + - label: + text: -- + x: 30 + y: 276 + width: 142 + height: 40 + text_color: 15658734 + text_font: montserrat_32 + long_mode: DOT + gesture_bubble: true + id: jordyns_layer_slayer_fan_label + text_align: CENTER + - label: + text: -- + x: 30 + y: 315 + width: 142 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: jordyns_layer_slayer_fan_detail + text_align: CENTER + - label: + text: Part + x: 16 + y: 366 + width: 170 + height: 26 + text_color: 15658734 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - arc: + id: jordyns_layer_slayer_aux_arc + x: 210 + y: 229 + width: 154 + height: 154 + min_value: 0 + max_value: 100 + value: 0 + start_angle: 135 + end_angle: 45 + arc_width: 13 + arc_color: 1647403 + indicator: + arc_color: 15658734 + arc_width: 13 + adjustable: false + gesture_bubble: true + - label: + text: -- + x: 216 + y: 276 + width: 142 + height: 40 + text_color: 15658734 + text_font: montserrat_32 + long_mode: DOT + gesture_bubble: true + id: jordyns_layer_slayer_aux_label + text_align: CENTER + - label: + text: -- + x: 216 + y: 315 + width: 142 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: jordyns_layer_slayer_aux_detail + text_align: CENTER + - label: + text: Aux + x: 202 + y: 366 + width: 170 + height: 26 + text_color: 15658734 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - arc: + id: jordyns_layer_slayer_exhaust_arc + x: 396 + y: 229 + width: 154 + height: 154 + min_value: 0 + max_value: 100 + value: 0 + start_angle: 135 + end_angle: 45 + arc_width: 13 + arc_color: 1647403 + indicator: + arc_color: 65280 + arc_width: 13 + adjustable: false + gesture_bubble: true + - label: + text: -- + x: 402 + y: 276 + width: 142 + height: 40 + text_color: 15658734 + text_font: montserrat_32 + long_mode: DOT + gesture_bubble: true + id: jordyns_layer_slayer_exhaust_label + text_align: CENTER + - label: + text: -- + x: 402 + y: 315 + width: 142 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: jordyns_layer_slayer_exhaust_detail + text_align: CENTER + - label: + text: Exhaust + x: 388 + y: 366 + width: 170 + height: 26 + text_color: 65280 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - label: + text: -- + x: 16 + y: 401 + width: 544 + height: 34 + text_color: 65280 + text_font: montserrat_26 + long_mode: DOT + gesture_bubble: true + id: jordyns_layer_slayer_remaining_label + text_align: CENTER + - label: + text: Telemetry unavailable + x: 16 + y: 430 + width: 544 + height: 20 + text_color: 11449271 + text_font: montserrat_12 + long_mode: DOT + gesture_bubble: true + id: jordyns_layer_slayer_stage_label + text_align: CENTER + - label: + text: -- + x: 594 + y: 397 + width: 190 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: jordyns_layer_slayer_layers_label + text_align: CENTER + - label: + text: AMS A + x: 594 + y: 70 + width: 190 + height: 28 + text_color: 11449271 + text_font: montserrat_20 long_mode: DOT gesture_bubble: true text_align: CENTER - - obj: - x: 282 - y: 132 - width: 238 - height: 118 - bg_color: 1516078 - radius: 16 - border_width: 0 - pad_all: 0 - scrollable: false - gesture_bubble: true - widgets: - - label: - text: NOZZLE / TARGET - x: 16 - y: 12 - width: 206 - height: 22 - text_color: 9544629 - text_font: montserrat_14 - long_mode: DOT - gesture_bubble: true - - label: - text: -- - x: 16 - y: 38 - width: 206 - height: 76 - text_color: 15594487 - text_font: montserrat_26 - long_mode: DOT - gesture_bubble: true - id: jordyns_layer_slayer_nozzle_label - - obj: - x: 538 - y: 132 - width: 238 - height: 118 - bg_color: 1516078 - radius: 16 - border_width: 0 - pad_all: 0 - scrollable: false - gesture_bubble: true - widgets: - - label: - text: BED / TARGET - x: 16 - y: 12 - width: 206 - height: 22 - text_color: 9544629 - text_font: montserrat_14 - long_mode: DOT - gesture_bubble: true - - label: - text: -- - x: 16 - y: 38 - width: 206 - height: 76 - text_color: 15594487 - text_font: montserrat_26 - long_mode: DOT - gesture_bubble: true - id: jordyns_layer_slayer_bed_label - - obj: - x: 282 - y: 262 - width: 238 - height: 86 - bg_color: 1516078 - radius: 16 - border_width: 0 - pad_all: 0 - scrollable: false - gesture_bubble: true - widgets: - - label: - text: REMAINING - x: 16 - y: 12 - width: 206 - height: 22 - text_color: 9544629 - text_font: montserrat_14 - long_mode: DOT - gesture_bubble: true - - label: - text: -- - x: 16 - y: 38 - width: 206 - height: 44 - text_color: 15594487 - text_font: montserrat_26 - long_mode: DOT - gesture_bubble: true - id: jordyns_layer_slayer_remaining_label - - obj: - x: 538 - y: 262 - width: 238 - height: 86 - bg_color: 1516078 - radius: 16 - border_width: 0 - pad_all: 0 - scrollable: false - gesture_bubble: true - widgets: - - label: - text: LAYER - x: 16 - y: 12 - width: 206 - height: 22 - text_color: 9544629 - text_font: montserrat_14 - long_mode: DOT - gesture_bubble: true - - label: - text: -- - x: 16 - y: 38 - width: 206 - height: 44 - text_color: 15594487 - text_font: montserrat_26 - long_mode: DOT - gesture_bubble: true - id: jordyns_layer_slayer_layers_label - - label: - text: Telemetry unavailable - x: 24 - y: 358 - width: 752 - height: 24 - text_color: 9544629 - text_font: montserrat_16 - long_mode: DOT - gesture_bubble: true - id: jordyns_layer_slayer_stage_label - - label: - text: FILAMENT / ACTIVE SLOT OUTLINED IN GREEN - x: 24 - y: 383 - width: 752 - height: 20 - text_color: 9544629 - text_font: montserrat_12 - long_mode: DOT - gesture_bubble: true - obj: id: jordyns_layer_slayer_tray_0_card - x: 24 - y: 401 - width: 182 - height: 32 - bg_color: 1516078 - radius: 6 + x: 594 + y: 102 + width: 44 + height: 82 + bg_color: 0 + radius: 5 border_width: 1 - border_color: 2503746 + border_color: 1647403 pad_all: 0 scrollable: false gesture_bubble: true widgets: - obj: id: jordyns_layer_slayer_tray_0_swatch - x: 1 - y: 1 - width: 178 - height: 5 - bg_color: 2503746 - radius: 2 + x: 3 + y: 3 + width: 36 + height: 40 + bg_color: 1647403 + radius: 4 border_width: 0 pad_all: 0 scrollable: false gesture_bubble: true - label: - text: A1 -- - x: 6 - y: 11 - width: 170 - height: 20 - text_color: 15594487 + text: 'A1 + + --' + x: 1 + y: 46 + width: 40 + height: 34 + text_color: 15658734 text_font: montserrat_12 long_mode: DOT gesture_bubble: true id: jordyns_layer_slayer_tray_0_label + text_align: CENTER - obj: id: jordyns_layer_slayer_tray_1_card - x: 214 - y: 401 - width: 182 - height: 32 - bg_color: 1516078 - radius: 6 + x: 642 + y: 102 + width: 44 + height: 82 + bg_color: 0 + radius: 5 border_width: 1 - border_color: 2503746 + border_color: 1647403 pad_all: 0 scrollable: false gesture_bubble: true widgets: - obj: id: jordyns_layer_slayer_tray_1_swatch - x: 1 - y: 1 - width: 178 - height: 5 - bg_color: 2503746 - radius: 2 + x: 3 + y: 3 + width: 36 + height: 40 + bg_color: 1647403 + radius: 4 border_width: 0 pad_all: 0 scrollable: false gesture_bubble: true - label: - text: A2 -- - x: 6 - y: 11 - width: 170 - height: 20 - text_color: 15594487 + text: 'A2 + + --' + x: 1 + y: 46 + width: 40 + height: 34 + text_color: 15658734 text_font: montserrat_12 long_mode: DOT gesture_bubble: true id: jordyns_layer_slayer_tray_1_label + text_align: CENTER - obj: id: jordyns_layer_slayer_tray_2_card - x: 404 - y: 401 - width: 182 - height: 32 - bg_color: 1516078 - radius: 6 + x: 690 + y: 102 + width: 44 + height: 82 + bg_color: 0 + radius: 5 border_width: 1 - border_color: 2503746 + border_color: 1647403 pad_all: 0 scrollable: false gesture_bubble: true widgets: - obj: id: jordyns_layer_slayer_tray_2_swatch - x: 1 - y: 1 - width: 178 - height: 5 - bg_color: 2503746 - radius: 2 + x: 3 + y: 3 + width: 36 + height: 40 + bg_color: 1647403 + radius: 4 border_width: 0 pad_all: 0 scrollable: false gesture_bubble: true - label: - text: A3 -- - x: 6 - y: 11 - width: 170 - height: 20 - text_color: 15594487 + text: 'A3 + + --' + x: 1 + y: 46 + width: 40 + height: 34 + text_color: 15658734 text_font: montserrat_12 long_mode: DOT gesture_bubble: true id: jordyns_layer_slayer_tray_2_label + text_align: CENTER - obj: id: jordyns_layer_slayer_tray_3_card - x: 594 - y: 401 - width: 182 - height: 32 - bg_color: 1516078 - radius: 6 + x: 738 + y: 102 + width: 44 + height: 82 + bg_color: 0 + radius: 5 border_width: 1 - border_color: 2503746 + border_color: 1647403 pad_all: 0 scrollable: false gesture_bubble: true widgets: - obj: id: jordyns_layer_slayer_tray_3_swatch - x: 1 - y: 1 - width: 178 - height: 5 - bg_color: 2503746 - radius: 2 + x: 3 + y: 3 + width: 36 + height: 40 + bg_color: 1647403 + radius: 4 border_width: 0 pad_all: 0 scrollable: false gesture_bubble: true - label: - text: A4 -- - x: 6 - y: 11 - width: 170 - height: 20 - text_color: 15594487 + text: 'A4 + + --' + x: 1 + y: 46 + width: 40 + height: 34 + text_color: 15658734 text_font: montserrat_12 long_mode: DOT gesture_bubble: true id: jordyns_layer_slayer_tray_3_label + text_align: CENTER - button: - x: 24 - y: 444 - width: 88 + x: 16 + y: 446 + width: 64 height: 30 - bg_color: 1516078 + bg_color: 1647403 radius: 8 border_width: 0 pad_all: 0 gesture_bubble: true widgets: - label: - text: < PREV + text: < align: CENTER - text_font: montserrat_12 + text_color: 15658734 + text_font: montserrat_18 on_click: - lvgl.page.previous: {} - button: - x: 688 - y: 444 - width: 88 + x: 720 + y: 446 + width: 64 height: 30 - bg_color: 1516078 + bg_color: 1647403 radius: 8 border_width: 0 pad_all: 0 gesture_bubble: true widgets: - label: - text: NEXT > + text: '>' align: CENTER - text_font: montserrat_12 + text_color: 15658734 + text_font: montserrat_18 on_click: - lvgl.page.next: {} - label: - text: 4 / 5 SWIPE LEFT / RIGHT - x: 130 - y: 451 - width: 540 + text: Waiting for Home Assistant + x: 94 + y: 449 + width: 612 height: 22 - text_color: 9544629 + text_color: 15658734 text_font: montserrat_14 long_mode: DOT gesture_bubble: true + id: jordyns_layer_slayer_task_label text_align: CENTER - id: constipation_orion_page - bg_color: 856859 + bg_color: 0 bg_opa: COVER pad_all: 0 scrollable: false @@ -2794,445 +3591,795 @@ lvgl: on_load: - script.execute: constipation_orion_refresh widgets: + - bar: + id: constipation_orion_top_progress + x: 0 + y: 0 + width: 800 + height: 5 + min_value: 0 + max_value: 100 + value: 0 + bg_color: 1647403 + indicator: + bg_color: 65280 + gesture_bubble: true - label: text: Constipation-Orion - x: 24 - y: 16 - width: 545 - height: 36 - text_color: 15594487 - text_font: montserrat_28 + x: 16 + y: 17 + width: 485 + height: 34 + text_color: 65280 + text_font: montserrat_26 long_mode: DOT gesture_bubble: true - label: - text: Dual nozzle / Office - x: 24 - y: 53 - width: 545 + text: 5 / 5 + x: 520 + y: 24 + width: 70 height: 22 - text_color: 9544629 + text_color: 11449271 text_font: montserrat_14 long_mode: DOT gesture_bubble: true + text_align: CENTER + - label: + text: SYNCING + x: 598 + y: 21 + width: 186 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: constipation_orion_status_label + text_align: RIGHT - obj: - x: 586 - y: 20 - width: 190 - height: 42 - bg_color: 1516078 - radius: 21 + x: 578 + y: 64 + width: 1 + height: 362 + bg_color: 1647403 border_width: 0 pad_all: 0 scrollable: false gesture_bubble: true - widgets: - - label: - text: SYNCING - x: 0 - y: 11 - width: 190 - height: 24 - text_color: 9544629 - text_font: montserrat_16 - long_mode: DOT - gesture_bubble: true - id: constipation_orion_status_label - text_align: CENTER - - label: - text: Waiting for Home Assistant - x: 24 - y: 88 - width: 752 - height: 28 - text_color: 15594487 - text_font: montserrat_20 - long_mode: DOT - gesture_bubble: true - id: constipation_orion_task_label - arc: id: constipation_orion_progress_arc - x: 28 - y: 132 - width: 224 - height: 224 + x: 24 + y: 62 + width: 154 + height: 154 min_value: 0 max_value: 100 value: 0 start_angle: 135 end_angle: 45 - arc_width: 14 - arc_color: 2503746 + arc_width: 13 + arc_color: 1647403 indicator: - arc_color: 6348442 - arc_width: 14 + arc_color: 65280 + arc_width: 13 adjustable: false gesture_bubble: true - label: text: -- - x: 42 - y: 207 - width: 196 - height: 56 - text_color: 15594487 - text_font: montserrat_48 + x: 30 + y: 109 + width: 142 + height: 40 + text_color: 15658734 + text_font: montserrat_32 long_mode: DOT gesture_bubble: true id: constipation_orion_progress_label text_align: CENTER - label: - text: PRINT PROGRESS - x: 42 - y: 266 - width: 196 - height: 22 - text_color: 9544629 - text_font: montserrat_14 + text: -- + x: 30 + y: 148 + width: 142 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: constipation_orion_progress_detail + text_align: CENTER + - label: + text: Progress + x: 16 + y: 199 + width: 170 + height: 26 + text_color: 65280 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - arc: + id: constipation_orion_nozzle_arc + x: 210 + y: 62 + width: 154 + height: 154 + min_value: 0 + max_value: 300 + value: 0 + start_angle: 135 + end_angle: 45 + arc_width: 13 + arc_color: 1647403 + indicator: + arc_color: 16755200 + arc_width: 13 + adjustable: false + gesture_bubble: true + - label: + text: -- + x: 216 + y: 109 + width: 142 + height: 40 + text_color: 15658734 + text_font: montserrat_32 + long_mode: DOT + gesture_bubble: true + id: constipation_orion_nozzle_label + text_align: CENTER + - label: + text: -- + x: 216 + y: 148 + width: 142 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: constipation_orion_nozzle_detail + text_align: CENTER + - label: + text: Nozzle L + x: 202 + y: 199 + width: 170 + height: 26 + text_color: 16755200 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - arc: + id: constipation_orion_bed_arc + x: 396 + y: 62 + width: 154 + height: 154 + min_value: 0 + max_value: 120 + value: 0 + start_angle: 135 + end_angle: 45 + arc_width: 13 + arc_color: 1647403 + indicator: + arc_color: 58853 + arc_width: 13 + adjustable: false + gesture_bubble: true + - label: + text: -- + x: 402 + y: 109 + width: 142 + height: 40 + text_color: 15658734 + text_font: montserrat_32 + long_mode: DOT + gesture_bubble: true + id: constipation_orion_bed_label + text_align: CENTER + - label: + text: -- + x: 402 + y: 148 + width: 142 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: constipation_orion_bed_detail + text_align: CENTER + - label: + text: Bed + x: 388 + y: 199 + width: 170 + height: 26 + text_color: 58853 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - arc: + id: constipation_orion_fan_arc + x: 24 + y: 229 + width: 154 + height: 154 + min_value: 0 + max_value: 100 + value: 0 + start_angle: 135 + end_angle: 45 + arc_width: 13 + arc_color: 1647403 + indicator: + arc_color: 15658734 + arc_width: 13 + adjustable: false + gesture_bubble: true + - label: + text: -- + x: 30 + y: 276 + width: 142 + height: 40 + text_color: 15658734 + text_font: montserrat_32 + long_mode: DOT + gesture_bubble: true + id: constipation_orion_fan_label + text_align: CENTER + - label: + text: -- + x: 30 + y: 315 + width: 142 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: constipation_orion_fan_detail + text_align: CENTER + - label: + text: Part + x: 16 + y: 366 + width: 170 + height: 26 + text_color: 15658734 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - arc: + id: constipation_orion_aux_arc + x: 210 + y: 229 + width: 154 + height: 154 + min_value: 0 + max_value: 300 + value: 0 + start_angle: 135 + end_angle: 45 + arc_width: 13 + arc_color: 1647403 + indicator: + arc_color: 16755200 + arc_width: 13 + adjustable: false + gesture_bubble: true + - label: + text: -- + x: 216 + y: 276 + width: 142 + height: 40 + text_color: 15658734 + text_font: montserrat_32 + long_mode: DOT + gesture_bubble: true + id: constipation_orion_aux_label + text_align: CENTER + - label: + text: -- + x: 216 + y: 315 + width: 142 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: constipation_orion_aux_detail + text_align: CENTER + - label: + text: Nozzle R + x: 202 + y: 366 + width: 170 + height: 26 + text_color: 16755200 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - arc: + id: constipation_orion_exhaust_arc + x: 396 + y: 229 + width: 154 + height: 154 + min_value: 0 + max_value: 100 + value: 0 + start_angle: 135 + end_angle: 45 + arc_width: 13 + arc_color: 1647403 + indicator: + arc_color: 65280 + arc_width: 13 + adjustable: false + gesture_bubble: true + - label: + text: -- + x: 402 + y: 276 + width: 142 + height: 40 + text_color: 15658734 + text_font: montserrat_32 + long_mode: DOT + gesture_bubble: true + id: constipation_orion_exhaust_label + text_align: CENTER + - label: + text: -- + x: 402 + y: 315 + width: 142 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: constipation_orion_exhaust_detail + text_align: CENTER + - label: + text: Exhaust + x: 388 + y: 366 + width: 170 + height: 26 + text_color: 65280 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - label: + text: -- + x: 16 + y: 401 + width: 544 + height: 34 + text_color: 65280 + text_font: montserrat_26 + long_mode: DOT + gesture_bubble: true + id: constipation_orion_remaining_label + text_align: CENTER + - label: + text: Telemetry unavailable + x: 16 + y: 430 + width: 544 + height: 20 + text_color: 11449271 + text_font: montserrat_12 + long_mode: DOT + gesture_bubble: true + id: constipation_orion_stage_label + text_align: CENTER + - label: + text: -- + x: 594 + y: 397 + width: 190 + height: 24 + text_color: 11449271 + text_font: montserrat_16 + long_mode: DOT + gesture_bubble: true + id: constipation_orion_layers_label + text_align: CENTER + - label: + text: AMS A + x: 594 + y: 70 + width: 190 + height: 28 + text_color: 11449271 + text_font: montserrat_20 long_mode: DOT gesture_bubble: true text_align: CENTER - - obj: - x: 282 - y: 132 - width: 238 - height: 118 - bg_color: 1516078 - radius: 16 - border_width: 0 - pad_all: 0 - scrollable: false - gesture_bubble: true - widgets: - - label: - text: NOZZLES L/R / TARGET - x: 16 - y: 12 - width: 206 - height: 22 - text_color: 9544629 - text_font: montserrat_14 - long_mode: DOT - gesture_bubble: true - - label: - text: -- - x: 16 - y: 38 - width: 206 - height: 76 - text_color: 15594487 - text_font: montserrat_18 - long_mode: DOT - gesture_bubble: true - id: constipation_orion_nozzle_label - - obj: - x: 538 - y: 132 - width: 238 - height: 118 - bg_color: 1516078 - radius: 16 - border_width: 0 - pad_all: 0 - scrollable: false - gesture_bubble: true - widgets: - - label: - text: BED / TARGET - x: 16 - y: 12 - width: 206 - height: 22 - text_color: 9544629 - text_font: montserrat_14 - long_mode: DOT - gesture_bubble: true - - label: - text: -- - x: 16 - y: 38 - width: 206 - height: 76 - text_color: 15594487 - text_font: montserrat_26 - long_mode: DOT - gesture_bubble: true - id: constipation_orion_bed_label - - obj: - x: 282 - y: 262 - width: 238 - height: 86 - bg_color: 1516078 - radius: 16 - border_width: 0 - pad_all: 0 - scrollable: false - gesture_bubble: true - widgets: - - label: - text: REMAINING - x: 16 - y: 12 - width: 206 - height: 22 - text_color: 9544629 - text_font: montserrat_14 - long_mode: DOT - gesture_bubble: true - - label: - text: -- - x: 16 - y: 38 - width: 206 - height: 44 - text_color: 15594487 - text_font: montserrat_26 - long_mode: DOT - gesture_bubble: true - id: constipation_orion_remaining_label - - obj: - x: 538 - y: 262 - width: 238 - height: 86 - bg_color: 1516078 - radius: 16 - border_width: 0 - pad_all: 0 - scrollable: false - gesture_bubble: true - widgets: - - label: - text: LAYER - x: 16 - y: 12 - width: 206 - height: 22 - text_color: 9544629 - text_font: montserrat_14 - long_mode: DOT - gesture_bubble: true - - label: - text: -- - x: 16 - y: 38 - width: 206 - height: 44 - text_color: 15594487 - text_font: montserrat_26 - long_mode: DOT - gesture_bubble: true - id: constipation_orion_layers_label - - label: - text: Telemetry unavailable - x: 24 - y: 358 - width: 752 - height: 24 - text_color: 9544629 - text_font: montserrat_16 - long_mode: DOT - gesture_bubble: true - id: constipation_orion_stage_label - - label: - text: FILAMENT / ACTIVE SLOT OUTLINED IN GREEN - x: 24 - y: 383 - width: 752 - height: 20 - text_color: 9544629 - text_font: montserrat_12 - long_mode: DOT - gesture_bubble: true - obj: id: constipation_orion_tray_0_card - x: 24 - y: 401 - width: 182 - height: 32 - bg_color: 1516078 - radius: 6 + x: 594 + y: 102 + width: 44 + height: 82 + bg_color: 0 + radius: 5 border_width: 1 - border_color: 2503746 + border_color: 1647403 pad_all: 0 scrollable: false gesture_bubble: true widgets: - obj: id: constipation_orion_tray_0_swatch - x: 1 - y: 1 - width: 178 - height: 5 - bg_color: 2503746 - radius: 2 + x: 3 + y: 3 + width: 36 + height: 40 + bg_color: 1647403 + radius: 4 border_width: 0 pad_all: 0 scrollable: false gesture_bubble: true - label: - text: A1 -- - x: 6 - y: 11 - width: 170 - height: 20 - text_color: 15594487 + text: 'A1 + + --' + x: 1 + y: 46 + width: 40 + height: 34 + text_color: 15658734 text_font: montserrat_12 long_mode: DOT gesture_bubble: true id: constipation_orion_tray_0_label + text_align: CENTER - obj: id: constipation_orion_tray_1_card - x: 214 - y: 401 - width: 182 - height: 32 - bg_color: 1516078 - radius: 6 + x: 642 + y: 102 + width: 44 + height: 82 + bg_color: 0 + radius: 5 border_width: 1 - border_color: 2503746 + border_color: 1647403 pad_all: 0 scrollable: false gesture_bubble: true widgets: - obj: id: constipation_orion_tray_1_swatch - x: 1 - y: 1 - width: 178 - height: 5 - bg_color: 2503746 - radius: 2 + x: 3 + y: 3 + width: 36 + height: 40 + bg_color: 1647403 + radius: 4 border_width: 0 pad_all: 0 scrollable: false gesture_bubble: true - label: - text: A2 -- - x: 6 - y: 11 - width: 170 - height: 20 - text_color: 15594487 + text: 'A2 + + --' + x: 1 + y: 46 + width: 40 + height: 34 + text_color: 15658734 text_font: montserrat_12 long_mode: DOT gesture_bubble: true id: constipation_orion_tray_1_label + text_align: CENTER - obj: id: constipation_orion_tray_2_card - x: 404 - y: 401 - width: 182 - height: 32 - bg_color: 1516078 - radius: 6 + x: 690 + y: 102 + width: 44 + height: 82 + bg_color: 0 + radius: 5 border_width: 1 - border_color: 2503746 + border_color: 1647403 pad_all: 0 scrollable: false gesture_bubble: true widgets: - obj: id: constipation_orion_tray_2_swatch - x: 1 - y: 1 - width: 178 - height: 5 - bg_color: 2503746 - radius: 2 + x: 3 + y: 3 + width: 36 + height: 40 + bg_color: 1647403 + radius: 4 border_width: 0 pad_all: 0 scrollable: false gesture_bubble: true - label: - text: A3 -- - x: 6 - y: 11 - width: 170 - height: 20 - text_color: 15594487 + text: 'A3 + + --' + x: 1 + y: 46 + width: 40 + height: 34 + text_color: 15658734 text_font: montserrat_12 long_mode: DOT gesture_bubble: true id: constipation_orion_tray_2_label + text_align: CENTER - obj: id: constipation_orion_tray_3_card - x: 594 - y: 401 - width: 182 - height: 32 - bg_color: 1516078 - radius: 6 + x: 738 + y: 102 + width: 44 + height: 82 + bg_color: 0 + radius: 5 border_width: 1 - border_color: 2503746 + border_color: 1647403 pad_all: 0 scrollable: false gesture_bubble: true widgets: - obj: id: constipation_orion_tray_3_swatch - x: 1 - y: 1 - width: 178 - height: 5 - bg_color: 2503746 - radius: 2 + x: 3 + y: 3 + width: 36 + height: 40 + bg_color: 1647403 + radius: 4 border_width: 0 pad_all: 0 scrollable: false gesture_bubble: true - label: - text: A4 -- - x: 6 - y: 11 - width: 170 - height: 20 - text_color: 15594487 + text: 'A4 + + --' + x: 1 + y: 46 + width: 40 + height: 34 + text_color: 15658734 text_font: montserrat_12 long_mode: DOT gesture_bubble: true id: constipation_orion_tray_3_label + text_align: CENTER - button: - x: 24 - y: 444 - width: 88 + x: 16 + y: 446 + width: 64 height: 30 - bg_color: 1516078 + bg_color: 1647403 radius: 8 border_width: 0 pad_all: 0 gesture_bubble: true widgets: - label: - text: < PREV + text: < align: CENTER - text_font: montserrat_12 + text_color: 15658734 + text_font: montserrat_18 on_click: - lvgl.page.previous: {} - button: - x: 688 - y: 444 - width: 88 + x: 720 + y: 446 + width: 64 height: 30 - bg_color: 1516078 + bg_color: 1647403 radius: 8 border_width: 0 pad_all: 0 gesture_bubble: true widgets: - label: - text: NEXT > + text: '>' align: CENTER - text_font: montserrat_12 + text_color: 15658734 + text_font: montserrat_18 on_click: - lvgl.page.next: {} - label: - text: 5 / 5 SWIPE LEFT / RIGHT - x: 130 - y: 451 - width: 540 + text: Waiting for Home Assistant + x: 94 + y: 449 + width: 612 height: 22 - text_color: 9544629 + text_color: 15658734 text_font: montserrat_14 long_mode: DOT gesture_bubble: true + id: constipation_orion_task_label text_align: CENTER + - id: color_test_page + skip: true + bg_color: 0 + bg_opa: COVER + pad_all: 0 + scrollable: false + on_swipe_left: + - lvgl.page.next: {} + on_swipe_right: + - lvgl.page.previous: {} + widgets: + - label: + text: DISPLAY COLOR TEST + x: 16 + y: 18 + width: 768 + height: 36 + text_color: 15658734 + text_font: montserrat_28 + long_mode: DOT + gesture_bubble: true + - label: + text: Each block must match its label. Swipe to return to the printers. + x: 16 + y: 62 + width: 768 + height: 26 + text_color: 15658734 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + - obj: + x: 16 + y: 118 + width: 122 + height: 200 + bg_color: 16711680 + bg_opa: COVER + border_width: 0 + scrollable: false + gesture_bubble: true + - label: + text: RED + x: 16 + y: 332 + width: 122 + height: 26 + text_color: 15658734 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - obj: + x: 145 + y: 118 + width: 122 + height: 200 + bg_color: 65280 + bg_opa: COVER + border_width: 0 + scrollable: false + gesture_bubble: true + - label: + text: GREEN + x: 145 + y: 332 + width: 122 + height: 26 + text_color: 15658734 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - obj: + x: 274 + y: 118 + width: 122 + height: 200 + bg_color: 255 + bg_opa: COVER + border_width: 0 + scrollable: false + gesture_bubble: true + - label: + text: BLUE + x: 274 + y: 332 + width: 122 + height: 26 + text_color: 15658734 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - obj: + x: 403 + y: 118 + width: 122 + height: 200 + bg_color: 16777215 + bg_opa: COVER + border_width: 0 + scrollable: false + gesture_bubble: true + - label: + text: WHITE + x: 403 + y: 332 + width: 122 + height: 26 + text_color: 15658734 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - obj: + x: 532 + y: 118 + width: 122 + height: 200 + bg_color: 65535 + bg_opa: COVER + border_width: 0 + scrollable: false + gesture_bubble: true + - label: + text: CYAN + x: 532 + y: 332 + width: 122 + height: 26 + text_color: 15658734 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER + - obj: + x: 661 + y: 118 + width: 122 + height: 200 + bg_color: 16711935 + bg_opa: COVER + border_width: 0 + scrollable: false + gesture_bubble: true + - label: + text: MAGENTA + x: 661 + y: 332 + width: 122 + height: 26 + text_color: 15658734 + text_font: montserrat_18 + long_mode: DOT + gesture_bubble: true + text_align: CENTER +button: +- platform: template + name: Display Color Test + entity_category: diagnostic + on_press: + - lvgl.page.show: color_test_page diff --git a/esphome/bambu-display/preview.py b/esphome/bambu-display/preview.py index 58537ea..d17975d 100644 --- a/esphome/bambu-display/preview.py +++ b/esphome/bambu-display/preview.py @@ -21,7 +21,7 @@ def main(): package = generate(printers) demo_values = {'progress': 67, 'nozzle': 218, 'nozzle_target': 220, 'bed': 60, 'bed_target': 60, 'time_left': 1.75, 'layer': 134, 'total_layers': 200, - 'fan': 80, 'left_nozzle': 219, 'left_target': 220, + 'fan': 80, 'aux_fan': 45, 'exhaust_fan': 30, 'left_nozzle': 219, 'left_target': 220, 'right_nozzle': 37, 'right_target': 0} demo_text = {'status': 'running', 'task': 'Workshop organizer - plate 2', 'stage': 'printing', 'online': 'on', 'print_error': 'off', 'hms_error': 'off', @@ -83,6 +83,8 @@ inline void setup() { steps += [{'lvgl.page.show': printer['id'] + '_page'}, {'script.execute': printer['id'] + '_refresh'}, {'delay': '300ms'}, {'snapshot.take': {'id': 'panel_display', 'filename': printer['id'] + '.bmp'}}] + steps += [{'lvgl.page.show': 'color_test_page'}, {'delay': '300ms'}, + {'snapshot.take': {'id': 'panel_display', 'filename': 'color_test.bmp'}}] steps += [{'lvgl.page.show': printers[0]['id'] + '_page'}, {'delay': '250ms'}, {'lambda': Lambda('bambu_preview::setup();')}] if len(printers) > 1: @@ -106,20 +108,21 @@ inline void setup() { 'includes': [str(HERE / 'dashboard.h'), str(touch_header)], 'on_boot': {'priority': -100, 'then': steps}}, 'host': {}, 'logger': {'level': 'WARN'}, + 'time': [{'platform': 'host', 'id': 'ha_time', 'timezone': 'America/New_York'}], 'display': [{'platform': 'sdl', 'id': 'panel_display', 'dimensions': '800x480', 'headless': True, 'auto_clear_enabled': False, 'update_interval': 'never'}], 'lvgl': {'id': 'dashboard', 'displays': ['panel_display'], 'buffer_size': '100%', - 'color_depth': 16, 'bg_color': 0x0D131B, 'text_color': 0xEDF3F7, + 'color_depth': 16, 'bg_color': 0x000000, 'text_color': 0xEEEEEE, 'default_font': 'montserrat_18', **package.pop('lvgl')}, **package} filename = root / 'preview.yaml' filename.write_text(yaml.dump(config, Dumper=Dumper, sort_keys=False, allow_unicode=True)) subprocess.run(['esphome', 'compile', str(filename)], check=True) binary = root / '.esphome/build/bambu-display-preview/.pioenvs/bambu-display-preview/program' subprocess.run([str(binary)], check=True, timeout=30, cwd=root) - for printer in printers: - bmp = root / '.esphome/snapshots/bambu-display-preview' / (printer['id'] + '.bmp') + for name in [printer['id'] for printer in printers] + ['color_test']: + bmp = root / '.esphome/snapshots/bambu-display-preview' / (name + '.bmp') with Image.open(bmp) as image: - image.save(args.output / (printer['id'] + '.png')) + image.save(args.output / (name + '.png')) print(f'Saved {len(printers)} demo screenshots to {args.output}') print('Passed LVGL pointer swipe tests, including wraparound and button gesture consumption.') diff --git a/esphome/bambu-display/previews/constipation_orion.png b/esphome/bambu-display/previews/constipation_orion.png index 8814633..de7dd06 100644 Binary files a/esphome/bambu-display/previews/constipation_orion.png and b/esphome/bambu-display/previews/constipation_orion.png differ diff --git a/esphome/bambu-display/previews/ds_turd_flinger.png b/esphome/bambu-display/previews/ds_turd_flinger.png index 961c5aa..01f66e3 100644 Binary files a/esphome/bambu-display/previews/ds_turd_flinger.png and b/esphome/bambu-display/previews/ds_turd_flinger.png differ diff --git a/esphome/bambu-display/previews/jordyns_layer_slayer.png b/esphome/bambu-display/previews/jordyns_layer_slayer.png index 4d38a1a..a637c28 100644 Binary files a/esphome/bambu-display/previews/jordyns_layer_slayer.png and b/esphome/bambu-display/previews/jordyns_layer_slayer.png differ diff --git a/esphome/bambu-display/previews/polly_pocket.png b/esphome/bambu-display/previews/polly_pocket.png index f15fa09..37607ea 100644 Binary files a/esphome/bambu-display/previews/polly_pocket.png and b/esphome/bambu-display/previews/polly_pocket.png differ diff --git a/esphome/bambu-display/previews/prints_charming.png b/esphome/bambu-display/previews/prints_charming.png index ff2b483..18c953c 100644 Binary files a/esphome/bambu-display/previews/prints_charming.png and b/esphome/bambu-display/previews/prints_charming.png differ diff --git a/esphome/bambu-display/printers.yaml b/esphome/bambu-display/printers.yaml index 894ab0e..b22ad07 100644 --- a/esphome/bambu-display/printers.yaml +++ b/esphome/bambu-display/printers.yaml @@ -6,6 +6,7 @@ printers: name: PrintsCharming subtitle: P1S / Office entity_prefix: p1s_01p09c470102673 + extra_fans: [aux_fan, exhaust_fan] filament_banks: - label: A entity_prefix: p1s_01p09c470102673_ams_1 @@ -41,6 +42,7 @@ printers: subtitle: Dual nozzle / Office entity_prefix: constipation_orion dual_nozzle: true + extra_fans: [exhaust_fan] filament_banks: - label: A entity_prefix: constipation_orion_ams_1 diff --git a/esphome/bambu-display/test_dashboard.cpp b/esphome/bambu-display/test_dashboard.cpp index 80dc8ce..bc0f854 100644 --- a/esphome/bambu-display/test_dashboard.cpp +++ b/esphome/bambu-display/test_dashboard.cpp @@ -13,13 +13,18 @@ int main() { assert(remaining(INFINITY, "h") == "--"); assert(number(NAN) == "--"); assert(temperature(219, 220, "°C") == "219 / 220 °C"); - assert(filament_color("#60DE9AFF") == GREEN); - assert(filament_color("60de9a") == GREEN); + assert(filament_color("#00FF00FF") == GREEN); + assert(filament_color("60de9a") == 0x60DE9A); assert(filament_color("#60DE9AZZ") == TRACK); assert(filament_color("unknown") == TRACK); assert(gauge_value(NAN, 100) == 0); assert(gauge_value(110, 100) == 100); assert(gauge_value(-10, 100) == 0); + assert(duration_seconds(1.75f, "h") == 6300); + assert(duration_seconds(105, "min") == 6300); + assert(duration_seconds(NAN, "h") == -1); + assert(duration_seconds(1, "") == -1); + assert(std::abs(celsius(392, "°F") - 200) < 0.01f); Snapshot data; data.online = "on"; diff --git a/esphome/bambu-display/test_generate.py b/esphome/bambu-display/test_generate.py index 822b82b..2d345fc 100644 --- a/esphome/bambu-display/test_generate.py +++ b/esphome/bambu-display/test_generate.py @@ -26,7 +26,7 @@ class FleetTests(unittest.TestCase): extra.update(id=f'printer_{index}', entity_prefix=f'new_printer_{index}') self.printers.append(extra) package = generate(self.printers) - self.assertEqual(len(package['lvgl']['pages']), 7) + self.assertEqual(len([page for page in package['lvgl']['pages'] if not page.get('skip')]), 7) self.assertEqual(len(package['script']), 7) subscriptions = {entry['id']: entry['entity_id'] for entry in package['sensor']} self.assertEqual(subscriptions['printer_7_progress'], 'sensor.new_printer_7_print_progress') @@ -62,6 +62,31 @@ class FleetTests(unittest.TestCase): self.assertLessEqual(props.get('x', 0) + props.get('width', 0), 800) self.assertLessEqual(props.get('y', 0) + props.get('height', 0), 480) + def test_rgb565_primaries_reach_the_correct_panel_bits(self): + # mipi_rgb emits named RGB data pins with bytes exchanged, then copies + # LVGL RGB565 bytes straight into the ESP32 little-endian framebuffer. + # Exercise red, green, blue and combined primaries through that path. + class Loader(yaml.SafeLoader): + pass + for tag in ('!secret', '!include'): + Loader.add_constructor(tag, lambda loader, node: loader.construct_scalar(node)) + config = yaml.load((HERE.parent / 'bambu-printer-display.yaml').read_text(), Loader=Loader) + display = config['display'][0] + pins = display['data_pins'] + natural = pins['blue'] + pins['green'] + pins['red'] + driver = natural[8:] + natural[:8] + order = {'big_endian': 'big', 'little_endian': 'little'}[config['lvgl']['byte_order']] + for color in (0xF800, 0x07E0, 0x001F, 0xFFFF, 0x07FF, 0xF81F): + memory_word = int.from_bytes(color.to_bytes(2, order), 'little') + panel_word = sum(((memory_word >> i) & 1) << natural.index(pin) + for i, pin in enumerate(driver)) + self.assertEqual(panel_word, color, f'RGB565 color {color:#06x} is wired incorrectly') + + def test_diagnostic_color_page_is_skipped_during_normal_navigation(self): + package = generate(self.printers) + page = next(page for page in package['lvgl']['pages'] if page['id'] == 'color_test_page') + self.assertTrue(page['skip']) + if __name__ == '__main__': unittest.main() diff --git a/esphome/bambu-printer-display.yaml b/esphome/bambu-printer-display.yaml index b34030b..46f51fe 100644 --- a/esphome/bambu-printer-display.yaml +++ b/esphome/bambu-printer-display.yaml @@ -57,7 +57,9 @@ display: model: RPI dimensions: 800x480 color_order: RGB - byte_order: little_endian + # Named RGB data_pins are byte-swapped by mipi_rgb's pin mapping. + # Send big-endian RGB565 pixels to match that wiring transformation. + byte_order: big_endian de_pin: GPIO40 hsync_pin: GPIO39 vsync_pin: GPIO41 @@ -99,6 +101,11 @@ light: restore_mode: ALWAYS_ON default_transition_length: 0s +time: + - platform: homeassistant + id: ha_time + timezone: America/New_York + packages: fleet: !include bambu-display/generated.yaml @@ -108,7 +115,7 @@ lvgl: touchscreens: [panel_touch] buffer_size: 12% color_depth: 16 - byte_order: little_endian - bg_color: 0x0D131B - text_color: 0xEDF3F7 + byte_order: big_endian # Must match mipi_rgb's named RGB pin mapping above. + bg_color: 0x000000 + text_color: 0xEEEEEE default_font: montserrat_18