Compare commits

..

7 Commits

Author SHA1 Message Date
d68f6c4a89 docs: update changelog and header for version v1.4.2
All checks were successful
Release Workflow / detect-provider (push) Successful in 1m4s
Release Workflow / github-release (push) Has been skipped
Release Workflow / gitea-release (push) Successful in 3m14s
2025-03-23 11:25:52 +01:00
1702e2396e docs: update platformio.ini for version v1.4.2 2025-03-23 11:25:52 +01:00
af23b07df1 fix: use unique client ID for MQTT connection to avoid conflicts 2025-03-23 11:24:46 +01:00
dd7ba3bf5d fix: reload page after firmware update completion 2025-03-23 11:15:38 +01:00
a818dcd3c0 fix: increase WiFi connection timeout from 5 to 10 seconds 2025-03-23 11:05:10 +01:00
b5279b167a fix: ensure valid URL format and remove trailing slash in setupWebserver 2025-03-23 11:03:57 +01:00
a09fd4fda4 fix: add WiFi connection check and restart Bambu if not connected 2025-03-23 11:03:51 +01:00
7 changed files with 44 additions and 7 deletions

View File

@@ -1,5 +1,23 @@
# Changelog
## [1.4.2] - 2025-03-23
### Added
- add WiFi connection check and restart Bambu if not connected
### Changed
- update platformio.ini for version v1.4.2
- increase stack size for BambuMqtt task
- update Discord Link
- update Discord Link
- remove commented-out subscription topic in MQTT setup
### Fixed
- use unique client ID for MQTT connection to avoid conflicts
- reload page after firmware update completion
- increase WiFi connection timeout from 5 to 10 seconds
- ensure valid URL format and remove trailing slash in setupWebserver
## [1.4.1] - 2025-03-10
### Added
- added new .step, now with correct individual parts

View File

@@ -129,6 +129,7 @@
if (data.status === 'success' || lastReceivedProgress >= 98) {
clearTimeout(wsReconnectTimer);
setTimeout(() => {
window.location.reload(true);
window.location.href = '/';
}, 30000);
}
@@ -148,6 +149,7 @@
status.style.display = 'block';
clearTimeout(wsReconnectTimer);
setTimeout(() => {
window.location.reload(true);
window.location.href = '/';
}, 30000);
} else {

View File

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

View File

@@ -553,7 +553,8 @@ void reconnect() {
oledShowTopRow();
// Attempt to connect
if (client.connect(bambu_serialnr, bambu_username, bambu_accesscode)) {
String clientId = String(bambu_serialnr) + "_" + String(random(0, 100));
if (client.connect(clientId.c_str(), bambu_username, bambu_accesscode)) {
Serial.println("MQTT re/connected");
client.subscribe(report_topic.c_str());
@@ -619,7 +620,8 @@ bool setupMqtt() {
// Verbinden mit dem MQTT-Server
bool connected = true;
if (client.connect(bambu_serialnr, bambu_username, bambu_accesscode))
String clientId = String(bambu_serialnr) + "_" + String(random(0, 100));
if (client.connect(clientId.c_str(), bambu_username, bambu_accesscode))
{
client.setCallback(mqtt_callback);
client.setBufferSize(5120);

View File

@@ -92,12 +92,19 @@ void loop() {
unsigned long currentMillis = millis();
// Überprüfe regelmäßig die WLAN-Verbindung
if (intervalElapsed(currentMillis, lastWifiCheckTime, wifiCheckInterval)) {
if (intervalElapsed(currentMillis, lastWifiCheckTime, wifiCheckInterval))
{
checkWiFiConnection();
}
// Wenn Bambu auto set Spool aktiv
if (autoSendToBambu && autoSetToBambuSpoolId > 0) {
if (autoSendToBambu && autoSetToBambuSpoolId > 0)
{
if (!bambu_connected)
{
bambu_restart();
}
if (intervalElapsed(currentMillis, lastAutoSetBambuAmsTime, autoSetBambuAmsInterval))
{
if (hasReadRfidTag == 0)

View File

@@ -286,6 +286,14 @@ void setupWebserver(AsyncWebServer &server) {
}
String url = request->getParam("url")->value();
if (url.indexOf("http://") == -1 && url.indexOf("https://") == -1) {
url = "http://" + url;
}
// Remove trailing slash if exists
if (url.length() > 0 && url.charAt(url.length()-1) == '/') {
url = url.substring(0, url.length()-1);
}
bool octoEnabled = (request->getParam("octoEnabled")->value() == "true") ? true : false;
String octoUrl = request->getParam("octoUrl")->value();
String octoToken = (request->getParam("octoToken")->value() != "") ? request->getParam("octoToken")->value() : "";
@@ -300,7 +308,7 @@ void setupWebserver(AsyncWebServer &server) {
request->send(200, "application/json", jsonResponse);
});
// Route für das Überprüfen der Spoolman-Instanz
// Route für das Überprüfen der Bambu-Instanz
server.on("/api/bambu", HTTP_GET, [](AsyncWebServerRequest *request){
if (!request->hasParam("bambu_ip") || !request->hasParam("bambu_serialnr") || !request->hasParam("bambu_accesscode")) {
request->send(400, "application/json", "{\"success\": false, \"error\": \"Missing parameter\"}");

View File

@@ -59,7 +59,7 @@ void initWiFi() {
if(wm_nonblocking) wm.setConfigPortalBlocking(false);
//wm.setConfigPortalTimeout(320); // Portal nach 5min schließen
wm.setWiFiAutoReconnect(true);
wm.setConnectTimeout(5);
wm.setConnectTimeout(10);
oledShowTopRow();
oledShowMessage("WiFi Setup");