diff --git a/ESP32-Webinterface-Bibliotheken.md b/doc/ESP32-Webinterface-Bibliotheken.md similarity index 100% rename from ESP32-Webinterface-Bibliotheken.md rename to doc/ESP32-Webinterface-Bibliotheken.md diff --git a/html-template/Laser-Cutter-Display.html b/html-template/Laser-Cutter-Display.html deleted file mode 100644 index 757e9f6..0000000 --- a/html-template/Laser-Cutter-Display.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - LaserCutter Display - - - -

LaserCutter Display

- - - - - - - - - - - -
Summe Laserzeit8 min
Aktuelle Laserzeit423 s
Letzte Laserzeit0 s
Laseraktiv
Maschinenlaufzeit (gesamt)619.50 min
IP-Adresse192.168.2.62
MQTT✓verbunden
Brokermqtt.majufilo.eu:8883
Gratiszeit10 s
Firmwarev1.3.0 (Mar 1 2026)
-
-
- -
- - - - - - - - - -
- - - diff --git a/parser/shelly_parser.py b/parser/shelly_parser.py deleted file mode 100644 index 1f45db9..0000000 --- a/parser/shelly_parser.py +++ /dev/null @@ -1,81 +0,0 @@ -"""Shelly PM Mini G3 Parser - extracts power data from MQTT messages.""" - -from datetime import datetime - -import structlog - -from exceptions import ParserError - -logger = structlog.get_logger() - - -class ShellyParser: - """Parser for Shelly PM Mini G3 MQTT Messages.""" - - def parse_message(self, topic: str, payload: dict) -> dict | None: - """ - Parse Shelly MQTT message. - - Args: - topic: MQTT topic - payload: Message payload (already JSON parsed) - - Returns: - Dict with parsed data or None - """ - try: - # Only parse status messages - if "/status/pm1:0" in topic: - return self._parse_status_message(topic, payload) - - return None - - except Exception as e: - logger.debug("shelly_parse_error", topic=topic, error=str(e)) - return None - - def _parse_status_message(self, topic: str, data: dict) -> dict | None: - """ - Parse Shelly PM status message. - Topic: shaperorigin/status/pm1:0 - - Payload format: - { - "id": 0, - "voltage": 230.0, - "current": 0.217, - "apower": 50.0, - "freq": 50.0, - "aenergy": {"total": 12345.6}, - "temperature": {"tC": 35.2} - } - """ - try: - device_id = self._extract_device_id(topic) - - result = { - "message_type": "status", - "device_id": device_id, - "timestamp": datetime.utcnow().isoformat() + "Z", - "voltage": data.get("voltage"), - "current": data.get("current"), - "apower": data.get("apower", 0), # Active Power in Watts - "frequency": data.get("freq"), - "total_energy": data.get("aenergy", {}).get("total"), - "temperature": data.get("temperature", {}).get("tC"), - } - - logger.debug("shelly_parsed_status", device_id=device_id, apower=result["apower"]) - return result - - except Exception as e: - logger.error("shelly_status_parse_error", error=str(e)) - return None - - def _extract_device_id(self, topic: str) -> str: - """Extract device ID from topic path.""" - # Example: shaperorigin/status/pm1:0 -> shaperorigin - parts = topic.split("/") - if len(parts) > 0: - return parts[0] - return "unknown" diff --git a/platformio.ini b/platformio.ini index d2627a0..af78daa 100644 --- a/platformio.ini +++ b/platformio.ini @@ -23,7 +23,7 @@ build_flags = -DCORE_DEBUG_LEVEL=1 ; 0=keine, 1=Fehler, 3=Info, 5=Verbose -DARDUINO_LOOP_STACK_SIZE=8192 -DELEGANTOTA_USE_ASYNC_WEBSERVER=1 - -DFIRMWARE_VERSION='"1.5.2"' ; Semantic Versioning – hier erhöhen bei neuem Release + -DFIRMWARE_VERSION='"1.6.1"' ; Semantic Versioning – hier erhöhen bei neuem Release lib_deps = majicDesigns/MD_Parola @ ^3.7.3 majicDesigns/MD_MAX72XX @ ^3.5.1 @@ -56,8 +56,8 @@ monitor_rts = 0 ; upload_flags = --auth=${sysenv.LASERCUTTER_OTA_PW} ; ============================================================================= [env:az-delivery-devkit-v4-ota] -upload_port = 172.30.30.90 -;upload_port = 192.168.2.62 +;upload_port = 172.30.30.90 +upload_port = 192.168.2.62 upload_protocol = espota #upload_flags = --auth=${sysenv.LASERCUTTER_OTA_PW} --timeout=60 ; Vor dem Upload in PowerShell: $env:LASERCUTTER_OTA_PW = "DeinPasswort" diff --git a/test/README b/test/README deleted file mode 100644 index 9b1e87b..0000000 --- a/test/README +++ /dev/null @@ -1,11 +0,0 @@ - -This directory is intended for PlatformIO Test Runner and project tests. - -Unit Testing is a software testing method by which individual units of -source code, sets of one or more MCU program modules together with associated -control data, usage procedures, and operating procedures, are tested to -determine whether they are fit for use. Unit testing finds problems early -in the development cycle. - -More information about PlatformIO Unit Testing: -- https://docs.platformio.org/en/latest/advanced/unit-testing/index.html