Compare commits

...

11 Commits

Author SHA1 Message Date
190e952ec4 docs: update changelog and header for version v1.4.6
All checks were successful
Release Workflow / detect-provider (push) Successful in 3s
Release Workflow / github-release (push) Has been skipped
Release Workflow / gitea-release (push) Successful in 2m57s
2025-03-26 11:52:46 +01:00
89620a7f00 docs: update platformio.ini for version v1.4.6 2025-03-26 11:52:46 +01:00
536950eeb3 fix: handle potential undefined value for tray_info_idx in handleSpoolIn function, by @tugsi 2025-03-26 11:51:58 +01:00
43719aac41 docs: update changelog and header for version v1.4.5
All checks were successful
Release Workflow / detect-provider (push) Successful in 4s
Release Workflow / github-release (push) Has been skipped
Release Workflow / gitea-release (push) Successful in 3m21s
2025-03-25 12:11:56 +01:00
16d0079f7a docs: update platformio.ini for version v1.4.5 2025-03-25 12:11:56 +01:00
48b9bf7076 Merge branch 'testing' 2025-03-25 12:08:08 +01:00
b6bd4cb9ad refactor: remove unused request_topic subscription and reduce MQTT task stack size 2025-03-25 12:05:34 +01:00
e89bb1d547 fix: increase MQTT buffer size and adjust task stack size 2025-03-25 12:02:54 +01:00
f25789d703 Merge pull request #26 from tugsi/main
Fix BufferSize for larger JSONs from X-Series
2025-03-25 12:01:57 +01:00
65d8cd675f Fix BufferSize for larger JSONs from X-Series 2025-03-24 12:17:28 +01:00
9dfe75ffa2 refactor: rename report_topic to topic and update MQTT subscription logic, switched publish topic to request 2025-03-23 18:01:53 +01:00
4 changed files with 30 additions and 10 deletions

View File

@ -1,5 +1,26 @@
# Changelog
## [1.4.6] - 2025-03-26
### Changed
- update platformio.ini for version v1.4.6
### Fixed
- handle potential undefined value for tray_info_idx in handleSpoolIn function, by @tugsi
## [1.4.5] - 2025-03-25
### Changed
- update platformio.ini for version v1.4.5
- Merge branch 'testing'
- remove unused request_topic subscription and reduce MQTT task stack size
- Merge pull request #26 from tugsi/main
- rename report_topic to topic and update MQTT subscription logic, switched publish topic to request
### Fixed
- increase MQTT buffer size and adjust task stack size
- Fix BufferSize for larger JSONs from X-Series
## [1.4.4] - 2025-03-23
### Added
- add error handling for missing vendor IDs in filament data

View File

@ -490,7 +490,7 @@ function handleSpoolIn(amsId, trayId) {
nozzle_temp_max: parseInt(maxTemp),
type: selectedSpool.filament.material,
brand: selectedSpool.filament.vendor.name,
tray_info_idx: selectedSpool.filament.extra.bambu_idx.replace(/['"]+/g, '').trim(),
tray_info_idx: selectedSpool.filament.extra.bambu_idx?.replace(/['"]+/g, '').trim() || '',
cali_idx: "-1" // Default-Wert setzen
}
};

View File

@ -9,7 +9,7 @@
; https://docs.platformio.org/page/projectconf.html
[common]
version = "1.4.4"
version = "1.4.6"
to_old_version = "1.4.0"
##

View File

@ -17,7 +17,7 @@ PubSubClient client(sslClient);
TaskHandle_t BambuMqttTask;
String report_topic = "";
String topic = "";
//String request_topic = "";
const char* bambu_username = "bblp";
const char* bambu_ip = nullptr;
@ -91,7 +91,7 @@ bool loadBambuCredentials() {
bambu_accesscode = g_bambu_accesscode.c_str();
bambu_serialnr = g_bambu_serialnr.c_str();
report_topic = "device/" + String(bambu_serialnr) + "/report";
topic = "device/" + String(bambu_serialnr);
//request_topic = "device/" + String(bambu_serialnr) + "/request";
return true;
}
@ -199,7 +199,7 @@ FilamentResult findFilamentIdx(String brand, String type) {
bool sendMqttMessage(const String& payload) {
Serial.println("Sending MQTT message");
Serial.println(payload);
if (client.publish(report_topic.c_str(), payload.c_str()))
if (client.publish((String(topic) + "/request").c_str(), payload.c_str()))
{
return true;
}
@ -557,7 +557,7 @@ void reconnect() {
if (client.connect(clientId.c_str(), bambu_username, bambu_accesscode)) {
Serial.println("MQTT re/connected");
client.subscribe(report_topic.c_str());
client.subscribe((String(topic) + "/report").c_str());
bambu_connected = true;
oledShowTopRow();
} else {
@ -624,9 +624,8 @@ bool setupMqtt() {
if (client.connect(clientId.c_str(), bambu_username, bambu_accesscode))
{
client.setCallback(mqtt_callback);
client.setBufferSize(5120);
client.subscribe(report_topic.c_str());
//client.subscribe(request_topic.c_str());
client.setBufferSize(15488);
client.subscribe((String(topic) + "/report").c_str());
Serial.println("MQTT-Client initialisiert");
oledShowMessage("Bambu Connected");
@ -636,7 +635,7 @@ bool setupMqtt() {
xTaskCreatePinnedToCore(
mqtt_loop, /* Function to implement the task */
"BambuMqtt", /* Name of the task */
10240, /* Stack size in words */
8192, /* Stack size in words */
NULL, /* Task input parameter */
mqttTaskPrio, /* Priority of the task */
&BambuMqttTask, /* Task handle. */