Compare commits
	
		
			37 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 1b4701bf76 | |||
| a2df2621e1 | |||
| 74aaedd72d | |||
| 4dff77e75d | |||
| 907765bcaa | |||
| b867aade7d | |||
| 36771235ad | |||
| 47470eb944 | |||
|  | e1da8eb525 | ||
| e943d2e70c | |||
| d7b0884d36 | |||
| 10caf06021 | |||
| e21e13efe6 | |||
| 682ed2e232 | |||
| fbbc226a7d | |||
| 76d5e7640f | |||
| 1d421930d8 | |||
| 0a6a183a38 | |||
| 6bb4384852 | |||
| 61174273fe | |||
| e604231139 | |||
| e0d641c817 | |||
| 40fdb667fa | |||
| 8f6ecb350f | |||
| 16887f5248 | |||
| a7b06c9b97 | |||
| 666c929483 | |||
| 301109c37b | |||
| d43fceebbc | |||
| 2c435e5c98 | |||
| f9aa7f2e6b | |||
| f810bc5352 | |||
| 043c2d4fa8 | |||
| f5a1debd7d | |||
| 37309da185 | |||
| bcb7c039e2 | |||
| 98ec5b9846 | 
							
								
								
									
										68
									
								
								CHANGELOG.md
									
									
									
									
									
								
							
							
						
						
									
										68
									
								
								CHANGELOG.md
									
									
									
									
									
								
							| @@ -1,5 +1,73 @@ | ||||
| # Changelog | ||||
|  | ||||
| ## [2.0.10] - 2025-10-15 | ||||
| ### Fixed | ||||
| - fix typo | ||||
|  | ||||
|  | ||||
| ## [2.0.9] - 2025-10-15 | ||||
|  | ||||
| ## [2.0.8] - 2025-10-15 | ||||
| ### Added | ||||
| - Fix: Add NULL checks to prevent crash without RFID module | ||||
|  | ||||
| ### Changed | ||||
| - Merge pull request #51 from Anzarion/main | ||||
|  | ||||
|  | ||||
| ## [2.0.7] - 2025-09-13 | ||||
| ### Added | ||||
| - add HTTP service to mDNS responder | ||||
| - add additional information about Recycling Fabrik in README files | ||||
| - add Recycling Fabrik section with logo and information | ||||
| - add RF logo image | ||||
| - add support information for Recycling Fabrik | ||||
|  | ||||
| ### Changed | ||||
| - remove unnecessary separator in Recycling Fabrik section | ||||
|  | ||||
| ### Fixed | ||||
| - update Recycling Fabrik logo display format in README | ||||
| - prevent weight display during NFC write operations | ||||
|  | ||||
|  | ||||
| ## [2.0.6-beta1] - 2025-09-03 | ||||
| ### Fixed | ||||
| - prevent weight display during NFC write operations | ||||
|  | ||||
|  | ||||
| ## [2.0.6] - 2025-09-03 | ||||
| ### Fixed | ||||
| - correct progress bar message and update tare function description | ||||
|  | ||||
|  | ||||
| ## [2.0.5] - 2025-09-03 | ||||
| ### Changed | ||||
| - adjust auto tare counter threshold and reposition tare check in scale loop | ||||
| - improve auto tare logic and reset conditions in scale handling | ||||
|  | ||||
| ### Fixed | ||||
| - update progress bar message from 'Tare scale' to 'Searching scale'  | ||||
| - Scale tare function after boot | ||||
|  | ||||
|  | ||||
| ## [2.0.4-beta2] - 2025-09-03 | ||||
| ### Changed | ||||
| - adjust auto tare counter threshold and reposition tare check in scale loop | ||||
| - improve auto tare logic and reset conditions in scale handling | ||||
|  | ||||
|  | ||||
| ## [2.0.4-beta1] - 2025-09-03 | ||||
| ### Changed | ||||
| - improve auto tare logic and reset conditions in scale handling | ||||
|  | ||||
|  | ||||
| ## [2.0.4] - 2025-09-02 | ||||
| ### Changed | ||||
| - filter out automatic release documentation commits in changelog categorization | ||||
| - disable auto tare and weight filter reset in scale loop | ||||
|  | ||||
|  | ||||
| ## [2.0.3] - 2025-09-02 | ||||
| ### Added | ||||
| - add updateOctoSpoolId for OctoPrint integration and change autoSetToBambuSpoolId type to uint16_t | ||||
|   | ||||
							
								
								
									
										20
									
								
								README.de.md
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								README.de.md
									
									
									
									
									
								
							| @@ -11,6 +11,26 @@ oder auf meiner Website: [FilaMan Website](https://www.filaman.app) | ||||
| Deutsches Erklärvideo: [Youtube](https://youtu.be/uNDe2wh9SS8?si=b-jYx4I1w62zaOHU)   | ||||
| Discord Server: [https://discord.gg/my7Gvaxj2v](https://discord.gg/my7Gvaxj2v) | ||||
|  | ||||
| ## NEU: Recycling Fabrik | ||||
|  | ||||
| <a href="https://www.recyclingfabrik.com" target="_blank"> | ||||
|     <img src="img/rf-logo.png" alt="Recycling Fabrik" width="200"> | ||||
| </a> | ||||
|  | ||||
| FilaMan wird von [Recycling Fabrik](https://www.recyclingfabrik.com) unterstützt. | ||||
| Recycling Fabrik wird demnächst auf seinen Spulen einen FilaMan tauglichen NFC Tag anbieten. Das hat den Vorteil, | ||||
| dass die Spulen direkt über FilaMan, ganz automatisch, erkannt und in Spoolman importiert werden können. | ||||
|  | ||||
| **Was ist Recycling Fabrik?** | ||||
|  | ||||
| Die Recycling Fabrik ist ein deutsches Unternehmen, das sich der Entwicklung und Herstellung von nachhaltigem 3D-Druck-Filament verschrieben hat.  | ||||
| Ihre Filamente bestehen zu 100 % aus recyceltem Material, welches sowohl vom Endkunden, als auch aus der Industrie stammt – für eine umweltbewusste und ressourcenschonende Zukunft. | ||||
|  | ||||
| Mehr Informationen und Produkte findest du hier: [www.recyclingfabrik.com](https://www.recyclingfabrik.com) | ||||
|  | ||||
| --- | ||||
|  | ||||
|  | ||||
| ### Es gibt jetzt auch ein Wiki, dort sind nochmal alle Funktionen beschrieben: [Wiki](https://github.com/ManuelW77/Filaman/wiki) | ||||
|  | ||||
| ### ESP32 Hardware-Funktionen | ||||
|   | ||||
							
								
								
									
										19
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								README.md
									
									
									
									
									
								
							| @@ -15,6 +15,25 @@ or my website: [FilaMan Website](https://www.filaman.app) | ||||
| german explanatory video: [Youtube](https://youtu.be/uNDe2wh9SS8?si=b-jYx4I1w62zaOHU)   | ||||
| Discord Server: [https://discord.gg/my7Gvaxj2v](https://discord.gg/my7Gvaxj2v) | ||||
|  | ||||
| ## NEW: Recycling Fabrik | ||||
|  | ||||
| <a href="https://www.recyclingfabrik.com" target="_blank"> | ||||
|     <img src="img/rf-logo.png" alt="Recycling Fabrik" width="200"> | ||||
| </a> | ||||
|  | ||||
| FilaMan is supported by [Recycling Fabrik](https://www.recyclingfabrik.com). | ||||
| Recycling Fabrik will soon offer a FilaMan-compatible NFC tag on their spools. This has the advantage | ||||
| that the spools can be automatically recognized and imported into Spoolman directly via FilaMan. | ||||
|  | ||||
| **What is Recycling Fabrik?** | ||||
|  | ||||
| Recycling Fabrik is a German company dedicated to developing and manufacturing sustainable 3D printing filament.  | ||||
| Their filaments are made from 100% recycled material from both end customers and industry – for an environmentally conscious and resource-saving future. | ||||
|  | ||||
| More information and products can be found here: [www.recyclingfabrik.com](https://www.recyclingfabrik.com) | ||||
|  | ||||
| --- | ||||
|  | ||||
| ### Now more detailed informations about the usage: [Wiki](https://github.com/ManuelW77/Filaman/wiki) | ||||
|  | ||||
| ### ESP32 Hardware Features | ||||
|   | ||||
							
								
								
									
										
											BIN
										
									
								
								img/rf-logo.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								img/rf-logo.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 18 KiB | 
| @@ -9,7 +9,7 @@ | ||||
| ; https://docs.platformio.org/page/projectconf.html | ||||
|  | ||||
| [common] | ||||
| version = "2.0.3" | ||||
| version = "2.0.10" | ||||
| to_old_version = "1.5.10" | ||||
|  | ||||
| ## | ||||
|   | ||||
| @@ -42,6 +42,12 @@ def categorize_commit(commit_msg): | ||||
|     """Categorize commit messages based on conventional commits""" | ||||
|     lower_msg = commit_msg.lower() | ||||
|      | ||||
|     # Filter out automatic release documentation commits | ||||
|     if ('docs:' in lower_msg and  | ||||
|         ('update changelog and header for version' in lower_msg or  | ||||
|          'update platformio.ini for' in lower_msg)): | ||||
|         return None  # Skip these commits | ||||
|      | ||||
|     # Check for breaking changes first | ||||
|     if ('!' in commit_msg and any(x in lower_msg for x in ['feat!', 'fix!', 'chore!', 'refactor!'])) or \ | ||||
|        'breaking change' in lower_msg or 'breaking:' in lower_msg: | ||||
| @@ -77,11 +83,12 @@ def get_changes_from_git(): | ||||
|         for commit in commits: | ||||
|             if commit: | ||||
|                 category = categorize_commit(commit) | ||||
|                 # Clean up commit message | ||||
|                 clean_msg = re.sub(r'^(feat|fix|chore|docs|style|refactor|perf|test)(\(.*\))?!?:', '', commit).strip() | ||||
|                 # Remove BREAKING CHANGE prefix if present | ||||
|                 clean_msg = re.sub(r'^breaking change:\s*', '', clean_msg, flags=re.IGNORECASE).strip() | ||||
|                 changes[category].append(clean_msg) | ||||
|                 if category is not None:  # Skip commits that return None (filtered out) | ||||
|                     # Clean up commit message | ||||
|                     clean_msg = re.sub(r'^(feat|fix|chore|docs|style|refactor|perf|test)(\(.*\))?!?:', '', commit).strip() | ||||
|                     # Remove BREAKING CHANGE prefix if present | ||||
|                     clean_msg = re.sub(r'^breaking change:\s*', '', clean_msg, flags=re.IGNORECASE).strip() | ||||
|                     changes[category].append(clean_msg) | ||||
|                  | ||||
|     except subprocess.CalledProcessError: | ||||
|         print("Error: Failed to get git commits") | ||||
|   | ||||
							
								
								
									
										30
									
								
								src/main.cpp
									
									
									
									
									
								
							
							
						
						
									
										30
									
								
								src/main.cpp
									
									
									
									
									
								
							| @@ -135,7 +135,7 @@ void loop() { | ||||
|   } | ||||
|  | ||||
|   // Wenn Bambu auto set Spool aktiv | ||||
|   if (bambuCredentials.autosend_enable && autoSetToBambuSpoolId > 0)  | ||||
|   if (bambuCredentials.autosend_enable && autoSetToBambuSpoolId > 0 && !nfcWriteInProgress)  | ||||
|   { | ||||
|     if (!bambuDisabled && !bambu_connected)  | ||||
|     { | ||||
| @@ -154,7 +154,9 @@ void loop() { | ||||
|         { | ||||
|           autoSetToBambuSpoolId = 0; | ||||
|           autoAmsCounter = 0; | ||||
|           oledShowWeight(weight); | ||||
|           if (!nfcWriteInProgress) { | ||||
|             oledShowWeight(weight); | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|       else | ||||
| @@ -176,7 +178,8 @@ void loop() { | ||||
|   else  | ||||
|   { | ||||
|     // Ausgabe der Waage auf Display | ||||
|     if(pauseMainTask == 0) | ||||
|     // Block weight display during NFC write operations | ||||
|     if(pauseMainTask == 0 && !nfcWriteInProgress) | ||||
|     { | ||||
|       // Use filtered weight for smooth display, but still check API weight for significant changes | ||||
|       int16_t displayWeight = getFilteredDisplayWeight(); | ||||
| @@ -197,25 +200,14 @@ void loop() { | ||||
|     { | ||||
|       lastWeightReadTime = currentMillis; | ||||
|  | ||||
|       // Prüfen ob die Waage korrekt genullt ist | ||||
|       // Abweichung von 2g ignorieren | ||||
|       if (autoTare && (weight > 2 && weight < 7) || weight < -2) | ||||
|       { | ||||
|         scale_tare_counter++; | ||||
|       } | ||||
|       else | ||||
|       { | ||||
|         scale_tare_counter = 0; | ||||
|       } | ||||
|  | ||||
|       // Prüfen ob das Gewicht gleich bleibt und dann senden | ||||
|       if (abs(weight - lastWeight) <= 2 && weight > 5) | ||||
|       { | ||||
|         weigthCouterToApi++; | ||||
|         weightCounterToApi++; | ||||
|       }  | ||||
|       else  | ||||
|       { | ||||
|         weigthCouterToApi = 0; | ||||
|         weightCounterToApi = 0; | ||||
|         weightSend = 0; | ||||
|       } | ||||
|     } | ||||
| @@ -223,13 +215,13 @@ void loop() { | ||||
|     // reset weight counter after writing tag | ||||
|     if (currentMillis - lastWeightReadTime >= weightReadInterval && nfcReaderState != NFC_IDLE && nfcReaderState != NFC_READ_SUCCESS) | ||||
|     { | ||||
|       weigthCouterToApi = 0; | ||||
|       weightCounterToApi = 0; | ||||
|     } | ||||
|      | ||||
|     lastWeight = weight; | ||||
|  | ||||
|     // Wenn ein Tag mit SM id erkannte wurde und der Waage Counter anspricht an SM Senden | ||||
|     if (activeSpoolId != "" && weigthCouterToApi > 3 && weightSend == 0 && nfcReaderState == NFC_READ_SUCCESS && tagProcessed == false && spoolmanApiState == API_IDLE)  | ||||
|     if (activeSpoolId != "" && weightCounterToApi > 3 && weightSend == 0 && nfcReaderState == NFC_READ_SUCCESS && tagProcessed == false && spoolmanApiState == API_IDLE)  | ||||
|     { | ||||
|       // set the current tag as processed to prevent it beeing processed again | ||||
|       tagProcessed = true; | ||||
| @@ -256,7 +248,7 @@ void loop() { | ||||
|     } | ||||
|  | ||||
|     // Handle successful tag write: Send weight to Spoolman but NEVER auto-send to Bambu | ||||
|     if (activeSpoolId != "" && weigthCouterToApi > 3 && weightSend == 0 && nfcReaderState == NFC_WRITE_SUCCESS && tagProcessed == false && spoolmanApiState == API_IDLE)  | ||||
|     if (activeSpoolId != "" && weightCounterToApi > 3 && weightSend == 0 && nfcReaderState == NFC_WRITE_SUCCESS && tagProcessed == false && spoolmanApiState == API_IDLE)  | ||||
|     { | ||||
|       // set the current tag as processed to prevent it beeing processed again | ||||
|       tagProcessed = true; | ||||
|   | ||||
| @@ -28,7 +28,7 @@ int16_t lastDisplayedWeight = 0; | ||||
| int16_t lastStableWeight = 0;        // For API/action triggering | ||||
| unsigned long lastMeasurementTime = 0; | ||||
|  | ||||
| uint8_t weigthCouterToApi = 0; | ||||
| uint8_t weightCounterToApi = 0; | ||||
| uint8_t scale_tare_counter = 0; | ||||
| bool scaleTareRequest = false; | ||||
| uint8_t pauseMainTask = 0; | ||||
| @@ -163,17 +163,8 @@ void scale_loop(void * parameter) { | ||||
|     if (currentTime - lastMeasurementTime >= MEASUREMENT_INTERVAL_MS) { | ||||
|       if (scale.is_ready())  | ||||
|       { | ||||
|         // Waage automatisch Taren, wenn zu lange Abweichung | ||||
|         if (autoTare && scale_tare_counter >= 5)  | ||||
|         { | ||||
|           Serial.println("Auto Tare scale"); | ||||
|           scale.tare(); | ||||
|           resetWeightFilter(); // Reset filter after auto tare | ||||
|           scale_tare_counter = 0; | ||||
|         } | ||||
|  | ||||
|         // Waage manuell Taren | ||||
|         if (scaleTareRequest == true)  | ||||
|         if (scaleTareRequest == true || (autoTare && scale_tare_counter >= 20))  | ||||
|         { | ||||
|           Serial.println("Re-Tare scale"); | ||||
|           oledShowMessage("TARE Scale"); | ||||
| @@ -183,6 +174,8 @@ void scale_loop(void * parameter) { | ||||
|           vTaskDelay(pdMS_TO_TICKS(1000)); | ||||
|           oledShowWeight(0); | ||||
|           scaleTareRequest = false; | ||||
|           scale_tare_counter = 0; | ||||
|           weight = 0; // Reset global weight variable after tare | ||||
|         } | ||||
|  | ||||
|         // Get raw weight reading | ||||
| @@ -196,6 +189,17 @@ void scale_loop(void * parameter) { | ||||
|           weight = stabilizedWeight; | ||||
|         } | ||||
|          | ||||
|         // Prüfen ob die Waage korrekt genullt ist | ||||
|         // Abweichung von 2g ignorieren | ||||
|         if (autoTare && (rawWeight > 2 && rawWeight < 7) || rawWeight < -2) | ||||
|         { | ||||
|           scale_tare_counter++; | ||||
|         } | ||||
|         else | ||||
|         { | ||||
|           scale_tare_counter = 0; | ||||
|         } | ||||
|  | ||||
|         // Debug output for monitoring (can be removed in production) | ||||
|         static unsigned long lastDebugTime = 0; | ||||
|         if (currentTime - lastDebugTime > 2000) { // Print every 2 seconds | ||||
| @@ -238,7 +242,7 @@ void start_scale(bool touchSensorConnected) { | ||||
|  | ||||
|   scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN); | ||||
|  | ||||
|   oledShowProgressBar(6, 7, DISPLAY_BOOT_TEXT, "Tare scale"); | ||||
|   oledShowProgressBar(6, 7, DISPLAY_BOOT_TEXT, "Serching scale"); | ||||
|   for (uint16_t i = 0; i < 3000; i++) { | ||||
|     yield(); | ||||
|     vTaskDelay(pdMS_TO_TICKS(1)); | ||||
| @@ -281,8 +285,8 @@ uint8_t calibrate_scale() { | ||||
|  | ||||
|   scaleCalibrationActive = true; | ||||
|  | ||||
|   vTaskSuspend(RfidReaderTask); | ||||
|   vTaskSuspend(ScaleTask); | ||||
|   if (RfidReaderTask != NULL) vTaskSuspend(RfidReaderTask); | ||||
|   if (ScaleTask != NULL) vTaskSuspend(ScaleTask); | ||||
|  | ||||
|   pauseBambuMqttTask = true; | ||||
|   pauseMainTask = 1; | ||||
| @@ -389,8 +393,8 @@ uint8_t calibrate_scale() { | ||||
|     returnState = 0; | ||||
|   } | ||||
|  | ||||
|   vTaskResume(RfidReaderTask); | ||||
|   vTaskResume(ScaleTask); | ||||
|   if (RfidReaderTask != NULL) vTaskResume(RfidReaderTask); | ||||
|   if (ScaleTask != NULL) vTaskResume(ScaleTask); | ||||
|   pauseBambuMqttTask = false; | ||||
|   pauseMainTask = 0; | ||||
|   scaleCalibrationActive = false; | ||||
|   | ||||
| @@ -18,7 +18,7 @@ int16_t getFilteredDisplayWeight(); | ||||
|  | ||||
| extern HX711 scale; | ||||
| extern int16_t weight; | ||||
| extern uint8_t weigthCouterToApi; | ||||
| extern uint8_t weightCounterToApi; | ||||
| extern uint8_t scale_tare_counter; | ||||
| extern uint8_t scaleTareRequest; | ||||
| extern uint8_t pauseMainTask; | ||||
|   | ||||
| @@ -36,6 +36,7 @@ void startMDNS() { | ||||
|       vTaskDelay(1000 / portTICK_PERIOD_MS); | ||||
|     } | ||||
|   } | ||||
|   MDNS.addService("http", "tcp", 80); | ||||
|   Serial.println("mDNS responder started"); | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user