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