1-phase PV router
|
Configuration values to be set by the end-user. More...
#include "config_system.h"
#include "debug.h"
#include "types.h"
#include "utils_dualtariff.h"
#include "utils_relay.h"
#include "utils_temp.h"
Go to the source code of this file.
Macros | |
#define | ENABLE_DEBUG |
#define | SERIALOUT |
#define | SERIALPRINT |
Variables | |
constexpr bool | DIVERSION_PIN_PRESENT { true } |
constexpr uint8_t | diversionPin { 15 } |
constexpr bool | DUAL_TARIFF { false } |
constexpr uint8_t | dualTariffPin { 0xff } |
constexpr bool | EMONESP_CONTROL { false } |
constexpr uint8_t | forcePin { 3 } |
constexpr int16_t | iTemperatureThreshold { 100 } |
constexpr uint8_t | loadPrioritiesAtStartup [NO_OF_DUMPLOADS] { 0 } |
constexpr uint8_t | NO_OF_DUMPLOADS { 1 } |
constexpr bool | OLD_PCB { false } |
constexpr bool | OVERRIDE_PIN_PRESENT { true } |
constexpr uint8_t | physicalLoadPin [NO_OF_DUMPLOADS] { 4 } |
constexpr bool | RELAY_DIVERSION { false } |
constexpr RelayEngine | relays { { { 0xff, 1000, 200, 1, 1 } } } |
constexpr pairForceLoad | rg_ForceLoad [NO_OF_DUMPLOADS] { { -3, 2 } } |
constexpr uint16_t | ROTATION_AFTER_SECONDS { 8u * 3600u } |
constexpr | RotationModes { RotationModes::OFF } |
constexpr uint8_t | rotationPin { 0xff } |
constexpr SerialOutputType | SERIAL_OUTPUT_TYPE = SerialOutputType::IoT |
constexpr bool | TEMP_SENSOR_PRESENT { false } |
constexpr TemperatureSensing | temperatureSensing |
constexpr DisplayType | TYPE_OF_DISPLAY { DisplayType::OLED } |
constexpr uint8_t | ul_OFF_PEAK_DURATION { 8 } |
constexpr bool | WATCHDOG_PIN_PRESENT { false } |
constexpr uint8_t | watchDogPin { 0xff } |
Configuration values to be set by the end-user.
Definition in file config.h.
#define ENABLE_DEBUG |
#define SERIALOUT |
#define SERIALPRINT |
|
inlineconstexpr |
set it to 'true' if you want to control diversion ON/OFF
Definition at line 38 of file config.h.
Referenced by checkDiversionOnOff(), getInputPins(), and initializeOldPCBPins().
|
inlineconstexpr |
if LOW, set diversion on standby
Definition at line 74 of file config.h.
Referenced by check_pins(), checkDiversionOnOff(), getInputPins(), and initializeOldPCBPins().
|
inlineconstexpr |
set it to 'true' if there's a dual tariff each day AND the router is connected to the billing meter
Definition at line 44 of file config.h.
Referenced by getInputPins(), initializeOldPCBPins(), and proceedLoadPrioritiesAndOverriding().
|
inlineconstexpr |
for 3-phase PCB, off-peak trigger
Definition at line 73 of file config.h.
Referenced by getInputPins(), initializeOldPCBPins(), and proceedLoadPrioritiesAndOverridingDualTariff().
|
inlineconstexpr |
Definition at line 37 of file config.h.
Referenced by proceedLoadPrioritiesAndOverriding().
|
inlineconstexpr |
for 3-phase PCB, force pin
Definition at line 76 of file config.h.
Referenced by check_pins(), forceFullPower(), getInputPins(), initializeOldPCBPins(), proceedLoadPrioritiesAndOverriding(), and proceedLoadPrioritiesAndOverridingDualTariff().
|
inlineconstexpr |
the temperature threshold to stop overriding in °C
Definition at line 88 of file config.h.
Referenced by printDualTariffConfiguration(), and proceedLoadPrioritiesAndOverridingDualTariff().
|
inlineconstexpr |
load priorities and states at startup
Definition at line 69 of file config.h.
Referenced by check_load_priorities(), initializeOldPCBPins(), and initializeProcessing().
|
inlineconstexpr |
number of dump loads connected to the diverter
Definition at line 35 of file config.h.
Referenced by calcBufferSize(), check_load_priorities(), initializeOldPCBPins(), initializeProcessing(), nextLogicalLoadToBeAdded(), nextLogicalLoadToBeRemoved(), printDualTariffConfiguration(), proceedHighEnergyLevel(), proceedLoadPrioritiesAndOverridingDualTariff(), proceedLowEnergyLevel(), processDataLogging(), updatePhysicalLoadStates(), and updatePortsStates().
|
inlineconstexpr |
set it to 'true' if the old PCB is used
Definition at line 49 of file config.h.
Referenced by initializeProcessing().
|
inlineconstexpr |
set it to 'true' if there's a override pin
Definition at line 40 of file config.h.
Referenced by forceFullPower(), getInputPins(), initializeOldPCBPins(), and proceedLoadPrioritiesAndOverriding().
|
inlineconstexpr |
for 1-phase PCB - "trigger" port is pin 4, "mode" port is pin 3
Definition at line 68 of file config.h.
Referenced by check_pins(), getOutputPins(), initializeOldPCBPins(), and updatePortsStates().
|
inlineconstexpr |
set it to 'true' if a relay is used for diversion
Definition at line 43 of file config.h.
Referenced by calcBufferSize(), check_pins(), check_relay_pins(), getOutputPins(), handlePerSecondTasks(), initializeOldPCBPins(), loop(), printForJSON(), printForSerialText(), and sendTelemetryData().
|
inlineconstexpr |
config for relay diversion, see class definition for defaults and advanced options
Definition at line 79 of file config.h.
Referenced by calcBufferSize(), check_pins(), check_relay_pins(), getOutputPins(), handlePerSecondTasks(), initializeOldPCBPins(), loop(), printForJSON(), printForSerialText(), sendTelemetryData(), setUp(), test_get_importThreshold(), test_get_minOFF(), test_get_minON(), test_get_pin(), test_get_size(), test_get_surplusThreshold(), test_isRelayON(), test_relay_turnOFF(), and test_relay_turnON().
|
inlineconstexpr |
force config for load #1 ONLY for dual tariff
Definition at line 84 of file config.h.
Referenced by _rg_OffsetForce< N, OffPeakDuration >::_rg_OffsetForce(), and printDualTariffConfiguration().
|
inlineconstexpr |
rotates load priorities after this period of inactivity
Definition at line 92 of file config.h.
Referenced by proceedLoadPrioritiesAndOverriding().
|
inlineconstexpr |
|
inlineconstexpr |
if LOW, trigger a load priority rotation
Definition at line 75 of file config.h.
Referenced by check_pins(), getInputPins(), initializeOldPCBPins(), and proceedLoadPrioritiesAndOverriding().
|
inlineconstexpr |
constexpr variable to set the serial output type
Definition at line 33 of file config.h.
Referenced by printConfiguration(), sendResults(), and setup().
|
inlineconstexpr |
set it to 'true' if temperature sensing is needed
Definition at line 45 of file config.h.
Referenced by calcBufferSize(), check_pins(), TemperatureSensing< N >::initTemperatureSensors(), printForJSON(), printForSerialText(), TemperatureSensing< N >::readTemperature(), TemperatureSensing< N >::requestTemperatures(), sendTelemetryData(), setup(), and updateTemperature().
|
inlineconstexpr |
list of temperature sensor Addresses
Definition at line 89 of file config.h.
Referenced by calcBufferSize(), check_pins(), printForJSON(), printForSerialText(), sendTelemetryData(), setup(), and updateTemperature().
|
inlineconstexpr |
set it to installed display including optional additional logic chips
Definition at line 51 of file config.h.
Referenced by check_pins(), configureValueForDisplay(), displayForced(), displayOff(), initializeDisplay(), refresh7SegDisplay(), setupOLED(), updateOLED(), and updateWatchdog().
|
inlineconstexpr |
Duration of the off-peak period in hours
Definition at line 83 of file config.h.
Referenced by printDualTariffConfiguration().
|
inlineconstexpr |
set it to 'true' if there's a watch led
Definition at line 42 of file config.h.
Referenced by getOutputPins(), handlePerSecondTasks(), and initializeOldPCBPins().
|
inlineconstexpr |
watch dog LED
Definition at line 77 of file config.h.
Referenced by check_pins(), getOutputPins(), handlePerSecondTasks(), and initializeOldPCBPins().