docs: Dateien verschoben und gelöscht.

This commit is contained in:
MaPaLo76 2026-03-08 10:27:54 +01:00
parent 17bde6b765
commit e964beab7c
5 changed files with 3 additions and 144 deletions

View File

@ -1,49 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width,initial-scale=1'>
<title>LaserCutter Display</title>
<style>
body { font-family: sans-serif; max-width: 480px; margin: 2rem auto; padding: 0 1rem }
h1 { color: #333 }
table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem }
td { padding: .5rem; border-bottom: 1px solid #eee }
td:first-child { color: #666; width: 50% }
.btn { display: inline-block; padding: .5rem 1.2rem; border: none; border-radius: 4px; cursor: pointer; text-decoration: none; font-size: 1rem }
.btn-primary { background: #3182ce; color: #fff }
</style>
</head>
<body>
<h1>LaserCutter Display</h1>
<table>
<tr><td>Summe Laserzeit</td><td>8 min</td></tr>
<tr><td>Aktuelle Laserzeit</td><td>423 s</td></tr>
<tr><td>Letzte Laserzeit</td><td>0 s</td></tr>
<tr><td>Laser</td><td><span style='color:orange'>aktiv</span></td></tr>
<tr><td>Maschinenlaufzeit (gesamt)</td><td>619.50 min</td></tr>
<tr><td>IP-Adresse</td><td>192.168.2.62</td></tr>
<tr><td>MQTT</td><td><span style='color:green'>&#10003;verbunden</span></td></tr>
<tr><td>Broker</td><td>mqtt.majufilo.eu:8883</td></tr>
<tr><td>Gratiszeit</td><td>10 s</td></tr>
<tr><td>Firmware</td><td>v1.3.0 (Mar 1 2026)</td></tr>
</table>
<div style='display:flex;flex-direction:column;gap:.6rem;margin-top:.5rem'>
<form action='/reset' method='post' style='width:100%' onsubmit="return confirm('Summe Laserzeit wirklich zur\u00fccksetzen?')">
<button class='btn btn-primary' type='submit' style='width:100%'>Summe Laserzeit zur &uuml;cksetzen</button>
</form>
<a href='/config' style='display:block'>
<button class='btn btn-primary' type='button' style='width:100%'>Konfiguration</button>
</a>
<a href='/update' style='display:block'>
<button class='btn btn-primary' type='button' style='width:100%'>OTA Update</button>
</a>
<a href='/log' style='display:block'>
<button class='btn btn-primary' type='button' style='width:100%'>&#128191;Log Console</button>
</a>
</div>
<script>
setTimeout( () => location.reload(), 10000)
</script>
</body>
</html>

View File

@ -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"

View File

@ -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"

View File

@ -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