Commit Graph

24 Commits

Author SHA1 Message Date
Pi Developer 6af9fcad7e feat(v2.0): Auto-discovery, correzione bug critici, e documentazione completa
Build Docker Image for Raspberry Pi / build-and-push (push) Failing after 4m42s
🆕 Funzionalità Auto-Discovery
- Aggiunto metodo AutoDiscoverBufferSizes() per rilevamento automatico QPIGS/QPIRI/QMOD/QPIWS
- Supporto variabili d'ambiente (INVERTER_DEVICE, MQTT_SERVER, etc.)
- Caching persistente buffer sizes in /cache/inverter.conf.cache
- Flag -a/--auto-discover per modalità auto-detection

🐛 Bug Fixes Critici
- **Parsing interi**: Aggiunta attemptAddSettingInt() con stoi() invece di stof()
  - Fix: stof('98') = 98.0f → 97 (int), ora stoi('98') = 98 direttamente
  - Applicato a: qpiri, qpiws, qmod, qpigs
- **Thread sync**: Aggiunto ups_qpiws_changed a main loop e condizione exit poll()
  - Fix: loop principale controllava solo 3 flag su 4, causava hang
  - Fix: thread poll() non usciva in runOnce perché mancava controllo QPIWS
- **Config accuracy**: Corretti buffer sizes (qpiri: 98→103, qpiws: 36→40)
  - Rimosso sources/inverter-cli/inverter.conf che sovrascriveva config globale
  - Validato con test: inverter_poller -1 completa in 6s con JSON completo

📚 Documentazione Completa
- Creato documentation/CODE_ARCHITECTURE.md (38KB)
  - Mappa logica variabili globali
  - Flusso esecuzione main() con diagrammi ASCII
  - Sequence diagram classe cInverter (poll, query, auto-discovery)
  - Thread synchronization diagrams
  - MQTT integration bash scripts flow
  - Mappa concettuale 5-layer system architecture
  - Error handling e performance optimizations
- Organizzati file .md in documentation/ (AUTO_DISCOVERY, IMPLEMENTATION, QUICKSTART, DEBUG)
- Aggiornato README.md con sezione v2.0 e indice documentazione
- Aggiornato .github/copilot-instructions.md con novità v2.0

🔧 Miglioramenti Build & CI/CD
- Gitea Actions per build multi-arch (arm/v6, arm/v7, arm64, amd64, 386)
- Configurazione VS Code completa (tasks, launch, debug GDB)
- Script test-autodiscovery.sh e test-device.sh

 Testing Validato
- inverter_poller -1 completa in 6 secondi
- Output JSON completo con tutte le metriche
- Exit pulito senza timeout (exit code 0)
- Tutte le 4 query QMOD/QPIGS/QPIRI/QPIWS funzionanti
2026-01-25 15:00:48 +01:00
tititg34 51b6a65973 Update mqtt-init.sh
temperature unit
2023-09-07 18:16:25 +02:00
Дилян Палаузов 730770016c inverter-cli/main.cpp: remove tautology
Closes: https://github.com/ned-kelly/docker-voltronic-homeassistant/issues/68
Related-To: https://github.com/manio/skymax-demo/issues/10
2022-03-13 11:57:19 +02:00
RSd 037ce5f37b Make the clientid configurable 2021-06-03 14:47:59 +02:00
RSd108 5ba1072099 Use client identifier 2021-06-03 12:47:37 +02:00
RSd108 a3957d0326 Use client identifier 2021-06-03 12:46:01 +02:00
RSd108 9d646bad60 Use client identifier 2021-06-03 12:44:58 +02:00
Sam e82000d76f Fix IF check space issue for INFLUX_ENABLED 2020-12-03 18:14:42 +10:30
Martin Valov 515d8196f6 Added the enabled true|false flag in mqtt.json 2020-11-22 21:53:40 +01:00
Martin Valov 313c98c119 Added the possibility to write directly to Influx
Since I am not using Influx as a DB of my HomeAssistant setup, I wanted a way to bring the data there. Another issue is that I used another script to gather the data and hence have other naming conventions on my dashboards. Therefore the name of the measurements are now part of the config JSON file. This could be an idea adopted to MQTT as well.
2020-11-08 22:38:50 +01:00
David Nedved b8e9d8ad33 include healthcheck in default actions 2020-04-01 11:42:35 +10:00
David Nedved d5dc992a62 remove duplicate battery voltage arg 2020-04-01 09:07:06 +10:00
Maxwell 6b5c5d600a Load command buffer sizes from configuration
Sets values for qpiws, qmod and qpigs from configuration file if they are available.

See commit: dfbb0ecc06
2020-03-10 10:05:45 +02:00
Maxwell de8bc8f812 Update inverter.cpp allowing the usage of configured parameters
See commit: f7896ecd7e
2020-03-10 10:02:25 +02:00
Maxwell f7896ecd7e Add additional fields to cInverter parameterized constructor
Adds the capability to use non static values for `QPIWS`, `QMOD` and `QPIGS` commands
2020-03-10 09:59:22 +02:00
Raphael Pertl b39eeb52eb fix example config, cpp errors, tested with voltronic 5000 and qpiri 102 2020-02-22 23:04:00 +01:00
Raphael Pertl 35a09bb538 add qpiri as a configurable value 2020-02-22 22:21:11 +01:00
David ebd3bbe2bc include support for MQTT username/password 2019-08-12 15:17:54 +10:00
David b1399bab57 remove retain from mqtt init message 2019-08-12 12:37:40 +10:00
David 0c2c945a96 update readme with more info around charging VLRA batteries 2019-08-09 16:17:37 +10:00
David 84cfa20aee fix missing paths and json formatting after refactor testing 2019-07-27 23:03:08 +10:00
David ccb999b8dc refactor for better support with ch341 and other unreliable rs232 adapters 2019-07-27 22:34:34 +10:00
David 5edafe0ddc update readme & add example HA config files 2019-05-29 11:37:38 +10:00
David 7a6b39bf18 initial docker support on x86 2019-05-28 14:27:57 +10:00