Gbox 4.20
Grow box automation and monitoring - <a href='https://sites.google.com/site/growboxguy/'>https://sites.google.com/site/growboxguy/</a>
 
Loading...
Searching...
No Matches
Settings.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Settings
 
struct  Settings::AeroModuleSettings
 < AeroModule default settings More...
 
struct  Settings::ACMotorModuleSettings
 < AeroModule default settings More...
 
struct  Settings::AirPumpSettings
 < AirPump default settings More...
 
struct  Settings::DHTSensorSettings
 < DHTSensor default settings More...
 
struct  Settings::FanSettings
 < Fan default settings More...
 
struct  Settings::MainModuleSettings
 < MainModule default settings More...
 
struct  Settings::HempyModuleSettings
 < Hempy default settings More...
 
struct  Settings::LightSensorSettings
 < LightSensor default settings More...
 
struct  Settings::LightsSettings
 < Lights default settings More...
 
struct  Settings::ReservoirModuleSettings
 < ReservoirModule default settings More...
 
struct  Settings::SoundSettings
 < Sound default settings More...
 

Macros

#define PushingBoxLogRelayID   "v755877CF53383E1"
 UPDATE THIS DeviceID of the PushingBox logging scenario: https://sites.google.com/site/growboxguy/arduino/logging.
 
#define MqttPubTopic   "Gbox420/"
 Publish MQTT messages to this topic. Ends with a forward slash.
 
#define MqttSubTopic   "Gbox420CMD/#"
 Subscribe to messages of this topic and all sub-topic.
 
#define MqttLwtTopic   "Gbox420LWT/"
 When the connection is lost the MQTT broker will publish a final message to this topic. Ends with a forward slash.
 
#define MqttLwtMessage   "Gbox420 Offline"
 Subscribers will get this message under the topic specified by MqttLwtTopic when the MQTT client goes offline.
 

Functions

void saveSettings (Settings *ToSave)
 Store settings in EEPROM - Only updates changed bits.
 
SettingsloadSettings (bool ResetEEPROM=false)
 Load settings from EEPROM.
 
void restoreDefaults ()
 Load sketch default settings into EEPROM.
 

Variables

char LongMessage [MaxLongTextLength]
 Temp storage for assembling long messages (REST API, MQTT reporting)
 
char ShortMessage [MaxShotTextLength]
 Temp storage for assembling short text messages (Log entries, Error messages,etc)
 
char CurrentTime [MaxWordLength]
 Buffer for storing current time in text format.
 

Macro Definition Documentation

◆ MqttLwtMessage

#define MqttLwtMessage   "Gbox420 Offline"

Subscribers will get this message under the topic specified by MqttLwtTopic when the MQTT client goes offline.

Definition at line 45 of file Settings.h.

◆ MqttLwtTopic

#define MqttLwtTopic   "Gbox420LWT/"

When the connection is lost the MQTT broker will publish a final message to this topic. Ends with a forward slash.

Definition at line 44 of file Settings.h.

◆ MqttPubTopic

#define MqttPubTopic   "Gbox420/"

Publish MQTT messages to this topic. Ends with a forward slash.

Definition at line 42 of file Settings.h.

◆ MqttSubTopic

#define MqttSubTopic   "Gbox420CMD/#"

Subscribe to messages of this topic and all sub-topic.

Definition at line 43 of file Settings.h.

◆ PushingBoxLogRelayID

#define PushingBoxLogRelayID   "v755877CF53383E1"

UPDATE THIS DeviceID of the PushingBox logging scenario: https://sites.google.com/site/growboxguy/arduino/logging.

MQTT Server Settings - The actual MQTT server is configured on the ESP-link web interface REST/MQTT tab

Definition at line 41 of file Settings.h.

Function Documentation

◆ loadSettings()

Settings * loadSettings ( bool  ResetEEPROM)

Load settings from EEPROM.

Parameters
ResetEEPROM- Force loading the defaults from the sketch and overwriting the EEPROM with it
Returns
Reference to Settings object
Parameters
ResetEEPROMif the function contains arguments with default values, they must be declared strictly before they are called, otherwise there is a compilation error: '<function name> was not declared in this scope. https://forum.arduino.cc/index.php?topic=606678.0

Definition at line 20 of file Settings.cpp.

◆ restoreDefaults()

void restoreDefaults ( )

Load sketch default settings into EEPROM.

Attention
Restarts the Arduino sketch!

Definition at line 45 of file Settings.cpp.

◆ saveSettings()

void saveSettings ( Settings ToSave)

Store settings in EEPROM - Only updates changed bits.

Attention
Use cautiously, EEPROM has a write limit of 100.000 cycles

Definition at line 10 of file Settings.cpp.

Variable Documentation

◆ CurrentTime

char CurrentTime[MaxWordLength]
extern

Buffer for storing current time in text format.

Definition at line 30 of file Gbox420_Mega_Main.ino.

◆ LongMessage

char LongMessage[MaxLongTextLength]
extern

Temp storage for assembling long messages (REST API, MQTT reporting)

Definition at line 28 of file Gbox420_Mega_Main.ino.

◆ ShortMessage

char ShortMessage[MaxShotTextLength]
extern

Temp storage for assembling short text messages (Log entries, Error messages,etc)

Definition at line 29 of file Gbox420_Mega_Main.ino.