Implementazione supporto multi-inverter paralleli e fix comunicazione MQTT
Build Docker Image for Raspberry Pi / build-and-push (push) Failing after 1m15s
Build Docker Image for Raspberry Pi / build-and-push (push) Failing after 1m15s
- Aggiunto supporto lettura inverter paralleli tramite comandi QPGS0-QPGS9 - Implementato discovery automatico inverter con filtro duplicati e serial invalidi - Risolti bug critici comunicazione seriale: * Fix buffer ExecuteCmd da 7 a 200 bytes * Supporto terminatori CR e LF * Modalità blocking con delay 500ms * Lettura byte-by-byte per terminatore affidabile - Implementato script MQTT per pubblicazione dati multi-inverter: * mqtt-push-parallel.sh con topic separati per ogni inverter * Fix autenticazione MQTT con username/password * Aggiunto flag retain (-r) per persistenza dati - Creato test-loop-parallel.sh per simulazione completa container - Aggiornata documentazione con compatibilità MKS IV e guida test loop - Aggiornati profili debug VS Code per bash e parallel discovery - Configurazione MQTT completa con server reale (192.168.1.37:1883) Sistema testato e funzionante con 2 inverter Voltronic Axpert MKS IV
This commit is contained in:
Vendored
+153
-1
@@ -107,6 +107,116 @@
|
||||
"preLaunchTask": "build-inverter-cli-debug",
|
||||
"miDebuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
{
|
||||
"name": "(gdb) Container Mode - Auto-Discovery",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/sources/inverter-cli/bin/inverter_poller",
|
||||
"args": [
|
||||
"-d",
|
||||
"-a"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "/",
|
||||
"environment": [
|
||||
{
|
||||
"name": "INVERTER_DEVICE",
|
||||
"value": "/dev/ttyUSB0"
|
||||
}
|
||||
],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "Set Disassembly Flavor to Intel",
|
||||
"text": "-gdb-set disassembly-flavor intel",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"preLaunchTask": "build-inverter-cli-debug",
|
||||
"miDebuggerPath": "/usr/bin/gdb",
|
||||
"logging": {
|
||||
"engineLogging": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "(gdb) Container Mode - Run Once",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/sources/inverter-cli/bin/inverter_poller",
|
||||
"args": [
|
||||
"-d",
|
||||
"-1"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "/",
|
||||
"environment": [
|
||||
{
|
||||
"name": "INVERTER_DEVICE",
|
||||
"value": "/dev/ttyUSB0"
|
||||
}
|
||||
],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "Set Disassembly Flavor to Intel",
|
||||
"text": "-gdb-set disassembly-flavor intel",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"preLaunchTask": "build-inverter-cli-debug",
|
||||
"miDebuggerPath": "/usr/bin/gdb",
|
||||
"logging": {
|
||||
"engineLogging": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "(gdb) Container Mode - Loop Continuous",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/sources/inverter-cli/bin/inverter_poller",
|
||||
"args": [
|
||||
"-d"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "/",
|
||||
"environment": [
|
||||
{
|
||||
"name": "INVERTER_DEVICE",
|
||||
"value": "/dev/ttyUSB0"
|
||||
}
|
||||
],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "Set Disassembly Flavor to Intel",
|
||||
"text": "-gdb-set disassembly-flavor intel",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"preLaunchTask": "build-inverter-cli-debug",
|
||||
"miDebuggerPath": "/usr/bin/gdb",
|
||||
"logging": {
|
||||
"engineLogging": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "(gdb) Attach to running inverter_poller",
|
||||
"type": "cppdbg",
|
||||
@@ -122,6 +232,48 @@
|
||||
}
|
||||
],
|
||||
"miDebuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
{
|
||||
"name": "(gdb) Parallel Discovery - Container Mode",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "/home/pi/Progetti/sources/inverter-cli/bin/inverter_poller",
|
||||
"args": [
|
||||
"-p"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "/",
|
||||
"environment": [
|
||||
{
|
||||
"name": "INVERTER_DEVICE",
|
||||
"value": "/dev/ttyUSB0"
|
||||
}
|
||||
],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"preLaunchTask": "build-inverter-cli",
|
||||
"miDebuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
{
|
||||
"name": "(bash) Test MQTT Parallel - Container Simulation",
|
||||
"type": "node-terminal",
|
||||
"request": "launch",
|
||||
"command": "bash /home/pi/Progetti/sources/inverter-mqtt/mqtt-push-parallel.sh",
|
||||
"cwd": "/home/pi/Progetti"
|
||||
},
|
||||
{
|
||||
"name": "(bash) Test Loop - Full Simulation",
|
||||
"type": "node-terminal",
|
||||
"request": "launch",
|
||||
"command": "LOOP_INTERVAL=10 MAX_ITERATIONS=3 bash /home/pi/Progetti/sources/inverter-mqtt/test-loop-parallel.sh",
|
||||
"cwd": "/home/pi/Progetti"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user