3-phase PV router
|
Functions used for data logging and external system communication. More...
Classes | |
class | TeleInfo |
A class for managing and sending telemetry information in a structured frame format. More... | |
Functions | |
static constexpr size_t | calcBufferSize () |
Calculates the total buffer size required for the telemetry frame. | |
static constexpr size_t | lineSize (size_t tagLen, size_t valueLen) |
Calculates the size of a single telemetry line in the frame. | |
void | printForEmonCMS (const bool bOffPeak) |
Write telemetry data to Serial in EmonCMS format. | |
void | printForSerialText () |
Prints data logs to the Serial output in text format. | |
Functions used for data logging and external system communication.
This group includes functions that manage telemetry data collection and transmission. It supports integration with external systems like HomeAssistant, providing real-time data on power, voltage, temperature, and system status. Telemetry also includes diagnostic information.
|
inlinestaticconstexpr |
Calculates the total buffer size required for the telemetry frame.
This function computes the size of the buffer needed to store the entire telemetry frame, including all tags, values, and formatting characters. The calculation takes into account the presence of optional features such as relay diversion and temperature sensing.
The buffer size is calculated as follows:
NO_OF_PHASES > 1
):NO_OF_PHASES
lines for the "R" tag (signed 6 digits each).NO_OF_PHASES
lines for the "V1" tag (unsigned 5 digits each).RELAY_DIVERSION
):TEMP_SENSOR_PRESENT
):temperatureSensing.get_size()
lines for temperature tags ("T1" to "Tn", 4 digits each).Definition at line 81 of file teleinfo.h.
|
inlinestaticconstexpr |
Calculates the size of a single telemetry line in the frame.
This function computes the size of a single line in the telemetry frame, including the tag, value, and formatting characters. Each line consists of:
tagLen
bytes for the tag.valueLen
bytes for the value.tagLen | The length of the tag in bytes. |
valueLen | The length of the value in bytes. |
Definition at line 49 of file teleinfo.h.
|
inline |
Write telemetry data to Serial in EmonCMS format.
This function outputs telemetry data in a format compatible with EmonCMS, including power, voltage, load states, temperature, and tariff information.
bOffPeak | Indicates whether the system is in an off-peak tariff period. |
Definition at line 195 of file utils.h.
|
inline |
Prints data logs to the Serial output in text format.
This function outputs telemetry data in a human-readable text format to the Serial output. It includes information about power, voltage, temperature, and system performance metrics.
Definition at line 259 of file utils.h.