Commit Graph

10 Commits

Author SHA1 Message Date
ms
8f3756b1fe dodane logowanie wysyłanych danych do InfluxDB (przez --log)
wysylanie U_A, U_B, U_C do MQTT w formacie JSON podobnie jak dla innych pomiarów (np. Hz)
wysylanie U_A, U_B, U_C do InfluxDB w batchu razem z innymi pomiarami (nie osobno)
2026-02-14 23:08:04 +01:00
ms
0524e7284d Fix spike detection bug causing stuck values
When a spike was detected in voltage, current, power, energy, or frequency,
the code sent previous values but never updated the prev_* variables.
This caused the system to get stuck reporting old values indefinitely
after any significant measurement change.

Now all prev_* variables are always updated after spike detection,
ensuring values can change again after being filtered.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 21:09:30 +01:00
ms
2b16211ef2 Fix sprintf overflows, integer sign handling, and clean up dead code
- Replace all sprintf with snprintf for buffer safety
- Fix rgI32/rgI16 sign extension using int32_t/int16_t casts
- Fix rgU32/rgU16 to use proper uint types and %u format
- Remove unused mbReg_Orno[] array and individual influx_send_* functions
- Fix MQTT topic for voltage fluctuation to match /energy/orno/ convention

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 20:38:45 +01:00
ms
44aceebae6 jakis commit 2026-02-14 20:20:51 +01:00
ms
912878d6e6 modyfikacje przez claude 2026-02-14 19:40:38 +01:00
ms
aa31532d8c Fix multiple bugs and harden modb_orno3.c
- Fix NULL pointer dereference: move modbus_set_slave after ctx validation (ORNO)
- Fix InfluxDB line protocol: remove stray comma in voltage measurement
- Move InfluxDB token to env variable INFLUX_TOKEN with fallback to default
- Fix spike detection for negative power values using fabs()
- Read and validate HTTP response from InfluxDB after writes
- Replace all sprintf with snprintf to prevent buffer overflows
- Batch ORNO InfluxDB writes into single TCP connection (5→1)
- Fix non-portable absolute include path for modbus-rtu.h

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 19:32:04 +01:00
ms
886cecf523 gtignore 2026-02-08 21:24:03 +01:00
ms
cec575c435 dodatkowe modyfikacje dla zapobieżenia zarowym odczytow 2026-02-08 21:17:40 +01:00
ms
46dcd48309 dodaje plik gitignore 2026-02-08 18:16:22 +01:00
ms
3fd3951aa8 Pierwszy commit - inicjalizacja projektu 2026-02-08 17:31:44 +01:00