3-phase PV router
Loading...
Searching...
No Matches
Dual tariff feature

Functions used for managing dual tariff periods. More...

Classes

class  _rg_OffsetForce< N, OffPeakDuration >
 Template class for Load-Overriding. More...
 

Functions

uint16_t getDualTariffForcingBitmask (const int16_t currentTemperature_x100)
 Calculates the dual tariff forcing bitmask based on current conditions.
 
void printDualTariffConfiguration ()
 Print the settings for off-peak period.
 

Detailed Description

Functions used for managing dual tariff periods.

This group includes functions that detect and handle changes between off-peak and on-peak tariff periods. It adjusts load priorities and diversion strategies based on the current tariff state. Features like forced load operation during off-peak periods are also supported.

Note
The dual tariff feature helps optimize energy usage and cost savings by prioritizing energy diversion during off-peak periods.

Function Documentation

◆ getDualTariffForcingBitmask()

uint16_t getDualTariffForcingBitmask ( const int16_t currentTemperature_x100)

Calculates the dual tariff forcing bitmask based on current conditions.

This function determines which loads should be forced ON during off-peak periods based on elapsed time since off-peak start, configured time windows, and temperature conditions.

Parameters
currentTemperature_x100Current temperature multiplied by 100.
Returns
Bitmask of loads that should be forced ON due to dual tariff conditions, 0 if none.
  • Only applies during off-peak periods (both pins must be LOW).
  • Each load has its own time window defined in rg_OffsetForce.
  • Temperature must be at or below the threshold for forcing to activate.
  • Uses static variables to track dual tariff pin state changes.

Definition at line 65 of file main.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ printDualTariffConfiguration()

void printDualTariffConfiguration ( )
inline

Print the settings for off-peak period.

Definition at line 71 of file dualtariff.h.

Here is the caller graph for this function: