92 lines
3.0 KiB
Plaintext
92 lines
3.0 KiB
Plaintext
/*
|
|
* Copyright (c) 2017 Martin Jäger / Libre Solar
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#ifndef CONFIG_H
|
|
#define CONFIG_H
|
|
|
|
#include "pcb.h"
|
|
|
|
/** @file
|
|
*
|
|
* @brief
|
|
* Used to define personal settings, e.g. which type of interface at the UEXT port should be used.
|
|
*/
|
|
|
|
// PWM charge controller
|
|
#define CONFIG_PWM_TERMINAL_SOLAR CONFIG_HAS_PWM_SWITCH
|
|
|
|
// MPPT buck/boost or nanogrid mode
|
|
#define CONFIG_HV_TERMINAL_SOLAR CONFIG_HAS_DCDC_CONVERTER
|
|
#define CONFIG_HV_TERMINAL_NANOGRID 0
|
|
|
|
// battery always assumed to be at low-voltage terminal (might need to be changed for boost mode)
|
|
#define CONFIG_LV_TERMINAL_BATTERY 1
|
|
|
|
// basic battery configuration
|
|
#define BATTERY_TYPE BAT_TYPE_GEL ///< GEL most suitable for general batteries (see bat_charger.h for other types)
|
|
#define BATTERY_NUM_CELLS 6 ///< For lead-acid batteries: 6 for 12V system, 12 for 24V system
|
|
#define BATTERY_CAPACITY 40 ///< Cell capacity or sum of parallel cells capacity (Ah)
|
|
|
|
#define CONFIG_DEVICE_ID 12345678
|
|
|
|
// This enables a safety-feature for the MPPT charge controllers to blow the fuse and disable
|
|
// charging in case the HS MOSFET was shorted (e.g. by someone connecting a solar panel with
|
|
// too high voltage).
|
|
#define CONFIG_HS_MOSFET_FAIL_SAFE_PROTECTION 1
|
|
|
|
#define THINGSET_USER_PASSWORD "user123"
|
|
#define THINGSET_MAKER_PASSWORD "maker456"
|
|
|
|
// can be used to configure custom data objects in separate file instead (e.g. data_objects_custom.cpp)
|
|
//#define CUSTOM_DATA_OBJECTS_FILE
|
|
|
|
// OLED display at UEXT port
|
|
#define CONFIG_EXT_OLED_DISPLAY 1
|
|
// OLED Brightness (value 0x01-0xff or 1-255)
|
|
// leave undefined to use default
|
|
#define OLED_BRIGHTNESS 0x1
|
|
|
|
// UART serial at SWD connector
|
|
#define CONFIG_EXT_THINGSET_SERIAL 1
|
|
|
|
// CAN bus drivers (not supported by all charge controllers)
|
|
//#define CAN_ENABLED
|
|
|
|
// LoRa board RFM9x connected to UEXT port
|
|
// https://github.com/LibreSolar/UEXT_LoRa
|
|
//#define LORA_ENABLED
|
|
|
|
// GSM board based on SIM800L connected to UEXT port
|
|
// https://github.com/LibreSolar/UEXT_GSM
|
|
//#define GSM_ENABLED
|
|
#define GSM_APN "internet.t-d1.de" // Access point name of network provider
|
|
#define GSM_NUMBER "" // empty if not needed
|
|
#define GSM_PIN "1234" // empty if not needed
|
|
#define GSM_USER "" // empty if not needed
|
|
#define GSM_PASS "" // empty if not needed
|
|
|
|
// WiFi board based on ESP32 connected to UEXT port
|
|
//#define WIFI_ENABLED
|
|
#define WIFI_SSID "ssid"
|
|
#define WIFI_PASS "pass"
|
|
|
|
// OpenEnergyMonitor emoncms configuration (used in WiFi interface)
|
|
#define EMONCMS_ENABLED
|
|
#define EMONCMS_HOST ""
|
|
#define EMONCMS_APIKEY "" // get from emoncms webinterface
|
|
#define EMONCMS_NODE "mppt" // name of your device
|
|
|
|
// MQTT server configuration (used in GSM or WiFi interface)
|
|
#define MQTT_ENABLED
|
|
#define MQTT_HOST "your-host-or-ip"
|
|
#define MQTT_PORT "1883"
|
|
#define MQTT_USER "you"
|
|
#define MQTT_PASS "pass"
|
|
#define MQTT_PUBLISH_TOPIC "nodes2server/report"
|
|
#define MQTT_SUBSCRIBE_TOPIC "server2node/state-req"
|
|
|
|
#endif /* CONFIG_H */
|