diff --git a/app/main.py b/app/main.py index 64e1486..eb23ae3 100644 --- a/app/main.py +++ b/app/main.py @@ -87,6 +87,7 @@ def clean_console_output(output: str, command: str) -> str: """ Clean meshcli console output by removing: - Prompt lines (e.g., "MarWoj|*" or "DeviceName|*[E]") + - JSON packet lines (internal mesh protocol data) - Echoed command line - Leading/trailing whitespace """ @@ -112,6 +113,10 @@ def clean_console_output(output: str, command: str) -> str: if prompt_pattern.match(stripped): continue + # Skip JSON packet lines (internal mesh protocol data) + if stripped.startswith('{') and '"payload_typename"' in stripped: + continue + cleaned_lines.append(line) # Remove leading empty lines