3-phase PV router
Loading...
Searching...
No Matches
config.h File Reference

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"
Include dependency graph for config.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ENABLE_DEBUG
 
#define FREQ   RF12_868MHZ
 
#define RF69_COMPAT   0
 

Variables

constexpr bool DIVERSION_PIN_PRESENT { false }
 
constexpr uint8_t diversionPin { unused_pin }
 
constexpr bool DUAL_TARIFF { false }
 
constexpr uint8_t dualTariffPin { unused_pin }
 
constexpr bool EMONESP_CONTROL { false }
 
constexpr uint8_t forcePin { unused_pin }
 
constexpr int16_t iTemperatureThreshold { 100 }
 
constexpr uint8_t loadPrioritiesAtStartup [NO_OF_DUMPLOADS] { 0, 1 }
 
constexpr int networkGroup { 210 }
 
constexpr uint8_t NO_OF_DUMPLOADS { 2 }
 
constexpr int nodeID { 10 }
 
constexpr bool OVERRIDE_PIN_PRESENT { false }
 
constexpr uint8_t physicalLoadPin [NO_OF_DUMPLOADS] { 5, 7 }
 
constexpr bool RELAY_DIVERSION { false }
 
constexpr RelayEngine relays { { { unused_pin, 1000, 200, 1, 1 } } }
 
constexpr pairForceLoad rg_ForceLoad [NO_OF_DUMPLOADS] { { -3, 2 } }
 
constexpr uint32_t ROTATION_AFTER_SECONDS { 8UL * 3600UL }
 
constexpr RotationModes { RotationModes::OFF }
 
constexpr uint8_t rotationPin { unused_pin }
 
constexpr SerialOutputType SERIAL_OUTPUT_TYPE = SerialOutputType::IoT
 
constexpr bool TEMP_SENSOR_PRESENT { false }
 
constexpr TemperatureSensing temperatureSensing
 
constexpr uint8_t ul_OFF_PEAK_DURATION { 8 }
 
constexpr int UNO { 1 }
 
constexpr bool WATCHDOG_PIN_PRESENT { false }
 
constexpr uint8_t watchDogPin { unused_pin }
 

Detailed Description

Configuration values to be set by the end-user.

Author
Frédéric Metrich (frede.nosp@m.ric..nosp@m.metri.nosp@m.ch@l.nosp@m.ive.f.nosp@m.r)
Version
0.5
Date
2023-02-09

Definition in file config.h.

Macro Definition Documentation

◆ ENABLE_DEBUG

#define ENABLE_DEBUG

enable this line to include debugging print statements

Definition at line 17 of file config.h.

◆ FREQ

#define FREQ   RF12_868MHZ

Definition at line 102 of file config.h.

◆ RF69_COMPAT

#define RF69_COMPAT   0

Definition at line 99 of file config.h.

Variable Documentation

◆ DIVERSION_PIN_PRESENT

bool DIVERSION_PIN_PRESENT { false }
inlineconstexpr

set it to 'true' if you want to control diversion ON/OFF

Definition at line 35 of file config.h.

◆ diversionPin

uint8_t diversionPin { unused_pin }
inlineconstexpr

if LOW, set diversion on standby

Definition at line 72 of file config.h.

◆ DUAL_TARIFF

bool DUAL_TARIFF { false }
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 41 of file config.h.

◆ dualTariffPin

uint8_t dualTariffPin { unused_pin }
inlineconstexpr

for 3-phase PCB, off-peak trigger

Definition at line 71 of file config.h.

◆ EMONESP_CONTROL

bool EMONESP_CONTROL { false }
inlineconstexpr

Definition at line 34 of file config.h.

◆ forcePin

uint8_t forcePin { unused_pin }
inlineconstexpr

for 3-phase PCB, force pin

Definition at line 74 of file config.h.

◆ iTemperatureThreshold

int16_t iTemperatureThreshold { 100 }
inlineconstexpr

the temperature threshold to stop overriding in °C

Definition at line 82 of file config.h.

◆ loadPrioritiesAtStartup

uint8_t loadPrioritiesAtStartup[NO_OF_DUMPLOADS] { 0, 1 }
inlineconstexpr

load priorities and states at startup

Definition at line 68 of file config.h.

◆ networkGroup

int networkGroup { 210 }
inlineconstexpr

wireless network group - needs to be same for all nodes

Definition at line 105 of file config.h.

◆ NO_OF_DUMPLOADS

uint8_t NO_OF_DUMPLOADS { 2 }
inlineconstexpr

number of dump loads connected to the diverter

Definition at line 32 of file config.h.

◆ nodeID

int nodeID { 10 }
inlineconstexpr

RFM12B node ID

Definition at line 104 of file config.h.

◆ OVERRIDE_PIN_PRESENT

bool OVERRIDE_PIN_PRESENT { false }
inlineconstexpr

set it to 'true' if there's a override pin

Definition at line 37 of file config.h.

◆ physicalLoadPin

uint8_t physicalLoadPin[NO_OF_DUMPLOADS] { 5, 7 }
inlineconstexpr

for 3-phase PCB, Load #1/#2/#3 (Rev 2 PCB)

Definition at line 67 of file config.h.

◆ RELAY_DIVERSION

bool RELAY_DIVERSION { false }
inlineconstexpr

set it to 'true' if a relay is used for diversion

Definition at line 40 of file config.h.

◆ relays

RelayEngine relays { { { unused_pin, 1000, 200, 1, 1 } } }
inlineconstexpr

config for relay diversion, see class definition for defaults and advanced options

Definition at line 77 of file config.h.

◆ rg_ForceLoad

pairForceLoad rg_ForceLoad[NO_OF_DUMPLOADS] { { -3, 2 } }
inlineconstexpr

force config for load #1 ONLY for dual tariff

Definition at line 80 of file config.h.

◆ ROTATION_AFTER_SECONDS

uint32_t ROTATION_AFTER_SECONDS { 8UL * 3600UL }
inlineconstexpr

rotates load priorities after this period of inactivity

Definition at line 91 of file config.h.

◆ RotationModes

RotationModes { RotationModes::OFF }
inlineconstexpr

set it to 'OFF/AUTO/PIN' if you want manual/automatic rotation of priorities

Definition at line 36 of file config.h.

◆ rotationPin

uint8_t rotationPin { unused_pin }
inlineconstexpr

if LOW, trigger a load priority rotation

Definition at line 73 of file config.h.

◆ SERIAL_OUTPUT_TYPE

SerialOutputType SERIAL_OUTPUT_TYPE = SerialOutputType::IoT
inlineconstexpr

constexpr variable to set the serial output type

Definition at line 27 of file config.h.

◆ TEMP_SENSOR_PRESENT

bool TEMP_SENSOR_PRESENT { false }
inlineconstexpr

set it to 'true' if temperature sensing is needed

Definition at line 42 of file config.h.

◆ temperatureSensing

TemperatureSensing temperatureSensing
inlineconstexpr
Initial value:
{ { 0x28, 0xBE, 0x41, 0x6B, 0x09, 0x00, 0x00, 0xA4 },
{ 0x28, 0xED, 0x5B, 0x6A, 0x09, 0x00, 0x00, 0x9D },
{ 0x28, 0xDB, 0x6D, 0x6A, 0x09, 0x00, 0x00, 0xDA },
{ 0x28, 0x59, 0x1F, 0x6A, 0x09, 0x00, 0x00, 0xB0 },
{ 0x28, 0x1B, 0xD7, 0x6A, 0x09, 0x00, 0x00, 0xB7 } } }
constexpr uint8_t unused_pin
Definition utils_pins.h:17

list of temperature sensor Addresses

Definition at line 84 of file config.h.

◆ ul_OFF_PEAK_DURATION

uint8_t ul_OFF_PEAK_DURATION { 8 }
inlineconstexpr

Duration of the off-peak period in hours

Definition at line 79 of file config.h.

◆ UNO

int UNO { 1 }
inlineconstexpr

for when the processor contains the UNO bootloader.

Definition at line 106 of file config.h.

◆ WATCHDOG_PIN_PRESENT

bool WATCHDOG_PIN_PRESENT { false }
inlineconstexpr

set it to 'true' if there's a watch led

Definition at line 39 of file config.h.

◆ watchDogPin

uint8_t watchDogPin { unused_pin }
inlineconstexpr

watch dog LED

Definition at line 75 of file config.h.