Skip to content

Commit

Permalink
turn off hard coded serial number
Browse files Browse the repository at this point in the history
  • Loading branch information
spuder committed Nov 2, 2024
1 parent 71bd46f commit b837ce8
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 9 deletions.
5 changes: 5 additions & 0 deletions firmware/conf.d/bambu_printer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ text:
icon: mdi:barcode
web_server:
sorting_group_id: sorting_group_printer_settings
# on_value:
# then:
# lambda: |-
# id(bambu_printer_status).topic = "device/" + x + "/report";

- platform: template
id: bambu_lan_access_code
Expand Down Expand Up @@ -91,4 +95,5 @@ button:
# 19: "Calibrating Extrusion Flow",
# 20: "Paused due to nozzle temperature malfunction",
# 21: "Paused due to heat bed temperature malfunction"
# 255: A1 mini uses this, most likely as idle
# }
41 changes: 32 additions & 9 deletions firmware/conf.d/mqtt_bambu_lan.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
substitutions:
bambu_serial_number: !secret bambu_serial_number
base_topic: "device/%s/report"

mqtt:
id: bambu_mqtt
Expand Down Expand Up @@ -52,15 +52,38 @@ mqtt:
# - platform: mqtt_subscribe
# name: "Bambu Printer Status"
# id: bambu_printer_status
# topic: device/${bambu_serial_number}/report
# topic: "" # Set by text.bambu_serial_number
# state_topic:
# internal: true
# on_value:
# then:
# - logger.log:
# format: "Received status: %s"
# args: ["x.c_str()"]
# level: INFO
# # internal: true
# # web_server:
# # sorting_group_id: sorting_group_printer_settings
# filters:
# - lambda: |-
# DynamicJsonDocument doc(4096);
# deserializeJson(doc, x);

# if (doc["print"]["wifi_signal"]) {
# return {};
# }
# if (doc["print"]["command"] == "push_status") {
# return {};
# }
# if (doc["info"]["command"] == "get_version") {
# return {};
# }
# if (doc["system"]["command"] == "get_access_code") {
# return {};
# }
# if (doc["system"]["upgrade_state"]) {
# return {};
# }
# if (doc["print"]["ipcam"]) {
# return {};
# }
# return x;
# # # on_value:
# # # then:
# # # - lambda: |-

binary_sensor:
- platform: status
Expand Down

0 comments on commit b837ce8

Please sign in to comment.