3-phase PV router
Loading...
Searching...
No Matches
Macros | Variables
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
 
#define SERIALPRINT
 

Variables

constexpr bool DIVERSION_PIN_PRESENT { false }
 
constexpr uint8_t diversionPin { 0xff }
 
constexpr bool DUAL_TARIFF { false }
 
constexpr uint8_t dualTariffPin { 0xff }
 
constexpr bool EMONESP_CONTROL { false }
 
constexpr uint8_t forcePin { 0xff }
 
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 { { { 0xff, 1000, 200, 1, 1 } } }
 
constexpr pairForceLoad rg_ForceLoad [NO_OF_DUMPLOADS] { { -3, 2 } }
 
constexpr uint32_t ROTATION_AFTER_CYCLES { 8UL * 3600UL * SUPPLY_FREQUENCY }
 
constexpr RotationModes { RotationModes::OFF }
 
constexpr uint8_t rotationPin { 0xff }
 
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 { 0xff }
 

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 22 of file config.h.

◆ FREQ

#define FREQ   RF12_868MHZ

Definition at line 109 of file config.h.

◆ RF69_COMPAT

#define RF69_COMPAT   0

Definition at line 106 of file config.h.

◆ SERIALPRINT

#define SERIALPRINT

include 'human-friendly' print statement for commissioning - comment this line to exclude.

Definition at line 23 of file config.h.

Variable Documentation

◆ DIVERSION_PIN_PRESENT

constexpr bool DIVERSION_PIN_PRESENT { false }
inlineconstexpr

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

Definition at line 47 of file config.h.

◆ diversionPin

constexpr uint8_t diversionPin { 0xff }
inlineconstexpr

if LOW, set diversion on standby

Definition at line 79 of file config.h.

◆ DUAL_TARIFF

constexpr 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 54 of file config.h.

◆ dualTariffPin

constexpr uint8_t dualTariffPin { 0xff }
inlineconstexpr

for 3-phase PCB, off-peak trigger

Definition at line 78 of file config.h.

◆ EMONESP_CONTROL

constexpr bool EMONESP_CONTROL { false }
inlineconstexpr

Definition at line 46 of file config.h.

◆ forcePin

constexpr uint8_t forcePin { 0xff }
inlineconstexpr

for 3-phase PCB, force pin

Definition at line 81 of file config.h.

◆ iTemperatureThreshold

constexpr int16_t iTemperatureThreshold { 100 }
inlineconstexpr

the temperature threshold to stop overriding in °C

Definition at line 89 of file config.h.

◆ loadPrioritiesAtStartup

constexpr uint8_t loadPrioritiesAtStartup[NO_OF_DUMPLOADS] { 0, 1 }
inlineconstexpr

load priorities and states at startup

Definition at line 75 of file config.h.

◆ networkGroup

constexpr int networkGroup { 210 }
inlineconstexpr

wireless network group - needs to be same for all nodes

Definition at line 112 of file config.h.

◆ NO_OF_DUMPLOADS

constexpr uint8_t NO_OF_DUMPLOADS { 2 }
inlineconstexpr

number of dump loads connected to the diverter

Definition at line 38 of file config.h.

◆ nodeID

constexpr int nodeID { 10 }
inlineconstexpr

RFM12B node ID

Definition at line 111 of file config.h.

◆ OVERRIDE_PIN_PRESENT

constexpr bool OVERRIDE_PIN_PRESENT { false }
inlineconstexpr

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

Definition at line 49 of file config.h.

◆ physicalLoadPin

constexpr uint8_t physicalLoadPin[NO_OF_DUMPLOADS] { 5, 7 }
inlineconstexpr

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

Definition at line 74 of file config.h.

◆ RELAY_DIVERSION

constexpr bool RELAY_DIVERSION { false }
inlineconstexpr

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

Definition at line 53 of file config.h.

◆ relays

constexpr RelayEngine relays { { { 0xff, 1000, 200, 1, 1 } } }
inlineconstexpr

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

Definition at line 84 of file config.h.

◆ rg_ForceLoad

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

force config for load #1 ONLY for dual tariff

Definition at line 87 of file config.h.

◆ ROTATION_AFTER_CYCLES

constexpr uint32_t ROTATION_AFTER_CYCLES { 8UL * 3600UL * SUPPLY_FREQUENCY }
inlineconstexpr

rotates load priorities after this period of inactivity

Definition at line 98 of file config.h.

◆ RotationModes

constexpr RotationModes { RotationModes::OFF }
inlineconstexpr

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

Definition at line 48 of file config.h.

◆ rotationPin

constexpr uint8_t rotationPin { 0xff }
inlineconstexpr

if LOW, trigger a load priority rotation

Definition at line 80 of file config.h.

◆ temperatureSensing

constexpr TemperatureSensing temperatureSensing
inlineconstexpr
Initial value:
{ 0xff,
{ { 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 } } }

list of temperature sensor Addresses

Definition at line 91 of file config.h.

◆ ul_OFF_PEAK_DURATION

constexpr uint8_t ul_OFF_PEAK_DURATION { 8 }
inlineconstexpr

Duration of the off-peak period in hours

Definition at line 86 of file config.h.

◆ UNO

constexpr int UNO { 1 }
inlineconstexpr

for when the processor contains the UNO bootloader.

Definition at line 113 of file config.h.

◆ WATCHDOG_PIN_PRESENT

constexpr bool WATCHDOG_PIN_PRESENT { false }
inlineconstexpr

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

Definition at line 52 of file config.h.

◆ watchDogPin

constexpr uint8_t watchDogPin { 0xff }
inlineconstexpr

watch dog LED

Definition at line 82 of file config.h.