mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 09:49:32 +02:00
merge
This commit is contained in:
commit
3d5f03823f
150 changed files with 8282 additions and 4683 deletions
|
@ -1,5 +1,6 @@
|
|||
#include "USER_SETTINGS.h"
|
||||
#include <string>
|
||||
#include "USER_SECRETS.h"
|
||||
#include "src/devboard/hal/hal.h"
|
||||
|
||||
/* This file contains all the battery settings and limits */
|
||||
|
@ -16,36 +17,29 @@ volatile CAN_Configuration can_config = {
|
|||
.battery = CAN_NATIVE, // Which CAN is your battery connected to?
|
||||
.inverter = CAN_NATIVE, // Which CAN is your inverter connected to? (No need to configure incase you use RS485)
|
||||
.battery_double = CAN_ADDON_MCP2515, // (OPTIONAL) Which CAN is your second battery connected to?
|
||||
.charger = CAN_NATIVE, // (OPTIONAL) Which CAN is your charger connected to?
|
||||
.shunt = CAN_NATIVE // (OPTIONAL) Which CAN is your charger connected to?
|
||||
.charger = CAN_NATIVE, // (OPTIONAL) Which CAN is your charger connected to?
|
||||
.shunt = CAN_NATIVE // (OPTIONAL) Which CAN is your charger connected to?
|
||||
};
|
||||
|
||||
#ifdef WIFI
|
||||
|
||||
volatile uint8_t AccessPointEnabled = true; //Set to either true/false to enable direct wifi access point
|
||||
std::string ssid = "REPLACE_WITH_YOUR_SSID"; // Maximum of 63 characters
|
||||
std::string password = "REPLACE_WITH_YOUR_PASSWORD"; // Minimum of 8 characters
|
||||
std::string ssid = WIFI_SSID; // Set in USER_SECRETS.h
|
||||
std::string password = WIFI_PASSWORD; // Set in USER_SECRETS.h
|
||||
const char* ssidAP = "Battery Emulator"; // Maximum of 63 characters, also used for device name on web interface
|
||||
const char* passwordAP = "123456789"; // Minimum of 8 characters; set to NULL if you want the access point to be open
|
||||
const uint8_t wifi_channel = 0; // Set to 0 for automatic channel selection
|
||||
const char* passwordAP = AP_PASSWORD; // Set in USER_SECRETS.h
|
||||
const uint8_t wifi_channel = 0; // Set to 0 for automatic channel selection
|
||||
|
||||
#ifdef WIFICONFIG
|
||||
// Set your Static IP address
|
||||
IPAddress local_IP(192, 168, 10, 150);
|
||||
// Set your Gateway IP address
|
||||
IPAddress gateway(192, 168, 10, 1);
|
||||
// Set your Subnet IP address
|
||||
IPAddress subnet(255, 255, 255, 0);
|
||||
#endif
|
||||
#ifdef WEBSERVER
|
||||
const char* http_username = "admin"; // username to webserver authentication;
|
||||
const char* http_password = "admin"; // password to webserver authentication;
|
||||
|
||||
const char* http_username = HTTP_USERNAME; // Set in USER_SECRETS.h
|
||||
const char* http_password = HTTP_PASSWORD; // Set in USER_SECRETS.h
|
||||
// Set your Static IP address. Only used incase WIFICONFIG is set in USER_SETTINGS.h
|
||||
IPAddress local_IP(192, 168, 10, 150);
|
||||
IPAddress gateway(192, 168, 10, 1);
|
||||
IPAddress subnet(255, 255, 255, 0);
|
||||
#endif // WEBSERVER
|
||||
|
||||
// MQTT
|
||||
#ifdef MQTT
|
||||
const char* mqtt_user = "REDACTED"; // Set NULL for no username
|
||||
const char* mqtt_password = "REDACTED"; // Set NULL for no password
|
||||
const char* mqtt_user = MQTT_USER; // Set in USER_SECRETS.h
|
||||
const char* mqtt_password = MQTT_PASSWORD; // Set in USER_SECRETS.h
|
||||
#ifdef MQTT_MANUAL_TOPIC_OBJECT_NAME
|
||||
const char* mqtt_topic_name =
|
||||
"BE"; // Custom MQTT topic name. Previously, the name was automatically set to "battery-emulator_esp32-XXXXXX"
|
||||
|
@ -55,7 +49,6 @@ const char* mqtt_device_name =
|
|||
"Battery Emulator"; // Custom device name in Home Assistant. Previously, the name was automatically set to "BatteryEmulator_esp32-XXXXXX"
|
||||
#endif // MQTT_MANUAL_TOPIC_OBJECT_NAME
|
||||
#endif // USE_MQTT
|
||||
#endif // WIFI
|
||||
|
||||
#ifdef EQUIPMENT_STOP_BUTTON
|
||||
// Equipment stop button behavior. Use NC button for safety reasons.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue