Browse Source

Add files via upload

pull/1080/head
oberfritze 2 years ago
committed by GitHub
parent
commit
7d54eaa29f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 30
      src/CHANGES.md
  2. 159
      src/app.cpp
  3. 31
      src/app.h
  4. 5
      src/appInterface.h
  5. 7
      src/defines.h
  6. 148
      src/platformio.ini

30
src/CHANGES.md

@ -1,15 +1,17 @@
Changelog v0.6.9
Changelog for ahoy-all-in-one compared to 0.6.9 of the main project
* improved MqTT
* fix WiFi hostname during boot up
* improved login: only one session at the same time is possible
* fix UI: login screen for small displays; burger menu height; small modifications for import button (in setup)
* improved WiFi reconnect
* optimized performance: browser caching was improved to reduce requests from ESP
* improved NRF24 communication for more stable data transmission
* added / fixed MqTT subscription `ctrl/power/[IV-ID]`
* improved save settings
* improved UI in setup: now `.` and `,` are allowed as floating point seperator
* fix zero yield day functionality
* LEDs are now configurable to show if 1st inverter is available and if MqTT is connected
* LED are configurable to active high or low
- read SML/OBIS from UART (stream parser with min resources needed); Connections 9600,8,n,1, GND-GND, VCC-3V3, TX-TX, RX-RX
- prepared to show chart of grid power and total solar ac power for current days daylight period (6 a.m. to 8 p.m.)
- show current grid power
- show max solar ac/dc power
- improved radio retransmit (complete retransmit if nothing was received, but only when inverter ought to be active)
- shortcut radio traces a little bit
DRAWBACKS:
- MQTT Source is commented out (except 1 var which is used for other purpose as well)
- only up to 2 Inverters (was: 10)
- RX/TX of UART0 is used for serial interface to IR sensor.
But: Currently there is enough heap available for stable operation on a ESP8266 plattform (WEMOS D1 R1). So adjust to your needs and see if the AHOY-DTU is still stable in operation with your hw plattform.
To update firmware via USB, unplug serial connection to IR sensor first. Surprisingly during normal operation it seems that one can use a full connected USB cable (for power supply). But I'm not sure, if this allways will be true.
Of course you cannot operate a display that uses RX/TX pins of UART0, simultanously.
- Due to not matching licence of the chart lib certain parts of visualization.html are commented out. See comments there.

159
src/app.cpp

@ -6,21 +6,32 @@
#include "app.h"
#include <ArduinoJson.h>
#include "utils/sun.h"
#include "plugins/SML_OBIS_Parser.h"
#ifndef min
#define min(a,b) (((a) < (b)) ? (a) : (b))
#endif
//-----------------------------------------------------------------------------
app::app() : ah::Scheduler() {}
//-----------------------------------------------------------------------------
void app::setup() {
#ifdef AHOY_SML_OBIS_SUPPORT
/* Assumptions made:
Electricity meter sends SML telegrams via IR interface (9600,8,n,1) without being asked (typical behaviour).
An IR sensor is connected to the UART0 of AHOY DTU. Connected pins: GND-GND, 3V3-VCC, RX-RX, TX-TX.
*/
Serial.begin(9600, SERIAL_8N1, SERIAL_RX_ONLY);
#else
Serial.begin(115200);
#endif
while (!Serial)
yield();
ah::Scheduler::setup();
resetSystem();
mSettings.setup();
mSettings.getPtr(mConfig);
DPRINT(DBG_INFO, F("Settings valid: "));
@ -30,7 +41,7 @@ void app::setup() {
DBGPRINTLN(F("false"));
mSys.enableDebug();
mSys.setup(mConfig->nrf.amplifierPower, mConfig->nrf.pinIrq, mConfig->nrf.pinCe, mConfig->nrf.pinCs, mConfig->nrf.pinSclk, mConfig->nrf.pinMosi, mConfig->nrf.pinMiso);
mSys.setup(&mTimestamp, mConfig->nrf.amplifierPower, mConfig->nrf.pinIrq, mConfig->nrf.pinCe, mConfig->nrf.pinCs, mConfig->nrf.pinSclk, mConfig->nrf.pinMosi, mConfig->nrf.pinMiso);
#if defined(AP_ONLY)
mInnerLoopCb = std::bind(&app::loopStandard, this);
@ -62,7 +73,7 @@ void app::setup() {
DPRINTLN(DBG_WARN, F("WARNING! your NRF24 module can't be reached, check the wiring"));
// when WiFi is in client mode, then enable mqtt broker
#if !defined(AP_ONLY)
#if !defined(AP_ONLY) && defined (AHOY_MQTT_SUPPORT)
mMqttEnabled = (mConfig->mqtt.broker[0] > 0);
if (mMqttEnabled) {
mMqtt.setup(&mConfig->mqtt, mConfig->sys.deviceName, mVersion, &mSys, &mTimestamp);
@ -84,8 +95,11 @@ void app::setup() {
mPubSerial.setup(mConfig, &mSys, &mTimestamp);
regularTickers();
#ifdef AHOY_SML_OBIS_SUPPORT
sml_setup (this, &mTimestamp);
#endif
regularTickers();
// DBGPRINTLN("--- end setup");
// DBGPRINTLN(String(ESP.getFreeHeap()));
@ -109,11 +123,16 @@ void app::loopStandard(void) {
if (mConfig->serial.debug) {
DPRINT(DBG_INFO, F("RX "));
DBGPRINT(String(p->len));
#ifdef undef
DBGPRINT(F("B Ch"));
DBGPRINT(String(p->ch));
DBGPRINT(F(" | "));
mSys.Radio.dumpBuf(p->packet, p->len);
#else
DBGPRINTLN(" Bytes");
#endif
}
mStat.frmCnt++;
Inverter<> *iv = mSys.findInverter(&p->packet[1]);
@ -132,8 +151,15 @@ void app::loopStandard(void) {
mPayload.loop();
mMiPayload.loop();
if (mMqttEnabled)
#ifdef AHOY_MQTT_SUPPORT
if (mMqttEnabled) {
mMqtt.loop();
}
#endif
#ifdef AHOY_SML_OBIS_SUPPORT
sml_loop ();
#endif
}
//-----------------------------------------------------------------------------
@ -150,11 +176,15 @@ void app::onWifi(bool gotIp) {
if (gotIp) {
mInnerLoopCb = std::bind(&app::loopStandard, this);
every(std::bind(&app::tickSend, this), mConfig->nrf.sendInterval, "tSend");
mMqttReconnect = true;
mSunrise = 0; // needs to be set to 0, to reinstall sunrise and ivComm tickers!
once(std::bind(&app::tickNtpUpdate, this), 2, "ntp2");
if (WIFI_AP == WiFi.getMode()) {
#ifdef AHOY_MQTT_SUPPORT
mMqttEnabled = false;
#endif
everySec(std::bind(&ahoywifi::tickWifiLoop, &mWifi), "wifiL");
}
} else {
@ -178,21 +208,27 @@ void app::tickNtpUpdate(void) {
uint32_t nxtTrig = 5; // default: check again in 5 sec
bool isOK = mWifi.getNtpTime();
if (isOK || mTimestamp != 0) {
#ifdef AHOY_MQTT_SUPPORT
if (mMqttReconnect && mMqttEnabled) {
mMqtt.tickerSecond();
everySec(std::bind(&PubMqttType::tickerSecond, &mMqtt), "mqttS");
everyMin(std::bind(&PubMqttType::tickerMinute, &mMqtt), "mqttM");
}
#endif
// only install schedulers once even if NTP wasn't successful in first loop
if (mMqttReconnect) { // @TODO: mMqttReconnect is variable which scope has changed
if (mConfig->inst.rstValsNotAvail)
everyMin(std::bind(&app::tickMinute, this), "tMin");
if (mConfig->inst.rstYieldMidNight) {
uint32_t localTime = gTimezone.toLocal(mTimestamp);
uint32_t midTrig = gTimezone.toUTC(localTime - (localTime % 86400) + 86400); // next midnight local time
onceAt(std::bind(&app::tickMidnight, this), midTrig, "midNi");
}
uint32_t localTime = gTimezone.toLocal(mTimestamp);
uint32_t midTrig = gTimezone.toUTC(localTime - (localTime % 86400) + 86400); // next midnight local time
onceAt(std::bind(&app::tickMidnight, this), midTrig, "midNi");
mSys.cleanup_history();
#ifdef AHOY_SML_OBIS_SUPPORT
sml_cleanup_history ();
#endif
}
nxtTrig = isOK ? 43200 : 60; // depending on NTP update success check again in 12 h or in 1 min
@ -226,8 +262,10 @@ void app::tickCalcSunrise(void) {
uint32_t nxtTrig = mSunset + mConfig->sun.offsetSec + 60; // set next trigger to communication stop, +60 for safety that it is certain past communication stop
onceAt(std::bind(&app::tickCalcSunrise, this), nxtTrig, "Sunri");
#ifdef AHOY_MQTT_SUPPORT
if (mMqttEnabled)
tickSun();
#endif
}
//-----------------------------------------------------------------------------
@ -251,22 +289,26 @@ void app::tickIVCommunication(void) {
tickComm();
}
#ifdef AHOY_MQTT_SUPPORT
//-----------------------------------------------------------------------------
void app::tickSun(void) {
// only used and enabled by MQTT (see setup())
if (!mMqtt.tickerSun(mSunrise, mSunset, mConfig->sun.offsetSec, mConfig->sun.disNightCom))
once(std::bind(&app::tickSun, this), 1, "mqSun"); // MQTT not connected, retry
}
#endif
//-----------------------------------------------------------------------------
void app::tickComm(void) {
if ((!mIVCommunicationOn) && (mConfig->inst.rstValsCommStop))
once(std::bind(&app::tickZeroValues, this), mConfig->nrf.sendInterval, "tZero");
#ifdef AHOY_MQTT_SUPPORT
if (mMqttEnabled) {
if (!mMqtt.tickerComm(!mIVCommunicationOn))
once(std::bind(&app::tickComm, this), 5, "mqCom"); // MQTT not connected, retry after 5s
}
#endif
}
//-----------------------------------------------------------------------------
@ -300,24 +342,31 @@ void app::tickMinute(void) {
//-----------------------------------------------------------------------------
void app::tickMidnight(void) {
// only triggered if 'reset values at midnight is enabled'
uint32_t localTime = gTimezone.toLocal(mTimestamp);
uint32_t nxtTrig = gTimezone.toUTC(localTime - (localTime % 86400) + 86400); // next midnight local time
onceAt(std::bind(&app::tickMidnight, this), nxtTrig, "mid2");
Inverter<> *iv;
// set values to zero, except yield total
for (uint8_t id = 0; id < mSys.getNumInverters(); id++) {
iv = mSys.getInverterByPos(id);
if (NULL == iv)
continue; // skip to next inverter
if (mConfig->inst.rstYieldMidNight) {
// only if 'reset values at midnight is enabled'
uint32_t localTime = gTimezone.toLocal(mTimestamp);
uint32_t nxtTrig = gTimezone.toUTC(localTime - (localTime % 86400) + 86400); // next midnight local time
onceAt(std::bind(&app::tickMidnight, this), nxtTrig, "mid2");
Inverter<> *iv;
// set values to zero, except yield total
for (uint8_t id = 0; id < mSys.getNumInverters(); id++) {
iv = mSys.getInverterByPos(id);
if (NULL == iv)
continue; // skip to next inverter
mPayload.zeroInverterValues(iv);
mPayload.zeroYieldDay(iv);
mPayload.zeroInverterValues(iv);
mPayload.zeroYieldDay(iv);
}
#ifdef AHOY_MQTT_SUPPORT
if (mMqttEnabled)
mMqtt.tickerMidnight();
#endif
}
if (mMqttEnabled)
mMqtt.tickerMidnight();
mSys.cleanup_history ();
#ifdef AHOY_SML_OBIS_SUPPORT
sml_cleanup_history();
#endif
}
//-----------------------------------------------------------------------------
@ -329,7 +378,7 @@ void app::tickSend(void) {
if (mIVCommunicationOn) {
if (!mSys.Radio.mBufCtrl.empty()) {
if (mConfig->serial.debug) {
DPRINT(DBG_DEBUG, F("recbuf not empty! #"));
DPRINT(DBG_INFO, F("recbuf not empty! #"));
DBGPRINTLN(String(mSys.Radio.mBufCtrl.size()));
}
}
@ -343,11 +392,15 @@ void app::tickSend(void) {
if (NULL != iv) {
if (iv->config->enabled) {
if (iv->ivGen == IV_HM)
mPayload.ivSend(iv);
else
mMiPayload.ivSend(iv);
if (iv->ivGen == IV_HM)
mPayload.ivSend(iv);
else
mMiPayload.ivSend(iv);
} else {
DPRINTLN (DBG_INFO, "iv not enabled");
}
} else {
DPRINTLN (DBG_INFO, "no inverter");
}
} else {
if (mConfig->serial.debug)
@ -371,7 +424,9 @@ void app::resetSystem(void) {
mSunrise = 0;
mSunset = 0;
#ifdef AHOY_MQTT_SUPPORT
mMqttEnabled = false;
#endif
mSendLastIvId = 0;
mShowRebootRequest = false;
@ -382,10 +437,12 @@ void app::resetSystem(void) {
memset(&mStat, 0, sizeof(statistics_t));
}
#ifdef AHOY_MQTT_SUPPORT
//-----------------------------------------------------------------------------
void app::mqttSubRxCb(JsonObject obj) {
mApi.ctrlRequest(obj);
}
#endif
//-----------------------------------------------------------------------------
void app::setupLed(void) {
@ -416,6 +473,7 @@ void app::updateLed(void) {
}
}
#ifdef AHOY_MQTT_SUPPORT
if (mConfig->led.led1 != 0xff) {
if (getMqttIsConnected()) {
digitalWrite(mConfig->led.led1, led_on);
@ -423,4 +481,41 @@ void app::updateLed(void) {
digitalWrite(mConfig->led.led1, led_off);
}
}
#endif
}
//-----------------------------------------------------------------------------
void app::check_hist_file (File file)
{
if (file) {
uint16_t exp_index = AHOY_MIN_PAC_SUN_HOUR * 60 / AHOY_PAC_INTERVAL, index;
unsigned char data[4];
while (file.read (data, sizeof (data)) == sizeof (data)) {
index = data[0] + (data[1] << 8);
if (index != exp_index) {
DPRINTLN (DBG_WARN, "Unexpected " + String (index) + " <-> " + String (exp_index));
}
exp_index = index + 1;
}
file.close();
}
}
//-----------------------------------------------------------------------------
void app::show_history (String path)
{
Dir dir = LittleFS.openDir (path);
DPRINTLN (DBG_INFO, "Enter Dir: " + path);
while (dir.next()) {
if (dir.isDirectory ()) {
show_history (path + "/" + dir.fileName());
} else {
DPRINTLN (DBG_INFO, "file " + dir.fileName() +
", Size: " + String (dir.fileSize()));
check_hist_file (dir.openFile ("r"));
}
}
DPRINTLN (DBG_INFO, "Leave Dir: " + path);
}

31
src/app.h

@ -37,12 +37,15 @@ typedef HmPayload<HmSystemType> PayloadType;
typedef MiPayload<HmSystemType> MiPayloadType;
typedef Web<HmSystemType> WebType;
typedef RestApi<HmSystemType> RestApiType;
#ifdef AHOY_MQTT_SUPPORT
typedef PubMqtt<HmSystemType> PubMqttType;
#endif
typedef PubSerial<HmSystemType> PubSerialType;
// PLUGINS
#include "plugins/Display/Display.h"
typedef Display<HmSystemType> DisplayType;
// #include <SoftwareSerial.h>
class app : public IApp, public ah::Scheduler {
public:
@ -54,6 +57,7 @@ class app : public IApp, public ah::Scheduler {
void loopStandard(void);
void loopWifi(void);
void onWifi(bool gotIp);
void cleanup_history(void);
void regularTickers(void);
void handleIntr(void) {
@ -135,7 +139,7 @@ class app : public IApp, public ah::Scheduler {
bool getRebootRequestState() {
return mShowRebootRequest;
}
#ifdef AHOY_MQTT_SUPPORT
void setMqttDiscoveryFlag() {
once(std::bind(&PubMqttType::sendDiscoveryConfig, &mMqtt), 1, "disCf");
}
@ -143,7 +147,7 @@ class app : public IApp, public ah::Scheduler {
void setMqttPowerLimitAck(Inverter<> *iv) {
mMqtt.setPowerLimitAck(iv);
}
#endif
void ivSendHighPrio(Inverter<> *iv) {
if(mIVCommunicationOn) { // only send commands if communcation is enabled
if (iv->ivGen == IV_HM)
@ -152,7 +156,7 @@ class app : public IApp, public ah::Scheduler {
mMiPayload.ivSendHighPrio(iv);
}
}
#ifdef AHOY_MQTT_SUPPORT
bool getMqttIsConnected() {
return mMqtt.isConnected();
}
@ -164,7 +168,7 @@ class app : public IApp, public ah::Scheduler {
uint32_t getMqttRxCnt() {
return mMqtt.getRxCnt();
}
#endif
bool getProtection(AsyncWebServerRequest *request) {
return mWeb.isProtected(request);
}
@ -205,21 +209,23 @@ class app : public IApp, public ah::Scheduler {
HmSystemType mSys;
private:
typedef std::function<void()> innerLoopCb;
void resetSystem(void);
void payloadEventListener(uint8_t cmd) {
#if !defined(AP_ONLY)
#if !defined(AP_ONLY) && defined(AHOY_MQTT_SUPPORT)
if (mMqttEnabled)
mMqtt.payloadEventListener(cmd);
#endif
if(mConfig->plugin.display.type != 0)
mDisplay.payloadEventListener(cmd);
}
#ifdef AHOY_MQTT_SUPPORT
void mqttSubRxCb(JsonObject obj);
#endif
void setupLed();
void updateLed();
@ -251,7 +257,11 @@ class app : public IApp, public ah::Scheduler {
void tickMinute(void);
void tickZeroValues(void);
void tickMidnight(void);
/*void tickSerial(void) {
void check_hist_file (File file);
void show_history (String path);
/* void tickSerial(void) {
if(Serial.available() == 0)
return;
@ -264,7 +274,7 @@ class app : public IApp, public ah::Scheduler {
DBGPRINT(String(buf[i], HEX) + " ");
}
DBGPRINTLN("");
}*/
} */
innerLoopCb mInnerLoopCb;
@ -283,16 +293,19 @@ class app : public IApp, public ah::Scheduler {
settings_t *mConfig;
bool mSavePending;
bool mSaveReboot;
bool mCritical;
uint8_t mSendLastIvId;
bool mSendFirst;
statistics_t mStat;
#ifdef AHOY_MQTT_SUPPORT
// mqtt
PubMqttType mMqtt;
bool mMqttReconnect;
bool mMqttEnabled;
#endif
bool mMqttReconnect;
// sun
int32_t mCalculatedTimezoneOffset;

5
src/appInterface.h

@ -40,14 +40,17 @@ class IApp {
virtual bool getRebootRequestState() = 0;
virtual bool getSettingsValid() = 0;
#ifdef AHOY_MQTT_SUPPORT
virtual void setMqttDiscoveryFlag() = 0;
virtual void setMqttPowerLimitAck(Inverter<> *iv) = 0;
#endif
virtual void ivSendHighPrio(Inverter<> *iv) = 0;
#ifdef AHOY_MQTT_SUPPORT
virtual bool getMqttIsConnected() = 0;
virtual uint32_t getMqttRxCnt() = 0;
virtual uint32_t getMqttTxCnt() = 0;
#endif
virtual bool getProtection(AsyncWebServerRequest *request) = 0;
};

7
src/defines.h

@ -69,10 +69,17 @@ union serial_u {
uint8_t b[8];
};
#define MIN_SERIAL_INTERVAL 2 // 5
#define MIN_SEND_INTERVAL 15
#define MIN_MQTT_INTERVAL 60
#define AHOY_HIST_PATH "/hist"
// reduce resources and increase clarity for statistic output
#define AHOY_MIN_PAC_SUN_HOUR 6
#define AHOY_MAX_PAC_SUN_HOUR 20
// average power interval in minutes
#define AHOY_PAC_INTERVAL 10
#define MQTT_STATUS_NOT_AVAIL_NOT_PROD 0
#define MQTT_STATUS_AVAIL_NOT_PROD 1

148
src/platformio.ini

@ -9,146 +9,30 @@
; https://docs.platformio.org/page/projectconf.html
[platformio]
src_dir = .
include_dir = .
src_dir = c:\AhoiDTU\src
include_dir = c:\AhoiDTU\src
[env]
board = d1_mini
board_build.f_cpu = 80000000L
platform=https://github.com/platformio/platform-espressif8266.git@^4.2.0
framework = arduino
board_build.filesystem = littlefs
upload_speed = 921600
monitor_speed = 115200
extra_scripts =
pre:../scripts/auto_firmware_version.py
pre:web/html/convert.py
pre:../scripts/auto_firmware_version.py
pre:web/html/convert.py
lib_deps =
https://github.com/yubox-node-org/ESPAsyncWebServer
nrf24/RF24 @ ^1.4.5
paulstoffregen/Time @ ^1.6.1
https://github.com/bertmelis/espMqttClient#v1.4.2
bblanchon/ArduinoJson @ ^6.21.2
https://github.com/JChristensen/Timezone @ ^1.2.4
olikraus/U8g2 @ ^2.34.17
zinggjm/GxEPD2 @ ^1.5.0
https://github.com/yubox-node-org/ESPAsyncWebServer
nrf24/RF24@1.4.5
paulstoffregen/Time @ ^1.6.1
https://github.com/bertmelis/espMqttClient#v1.4.2
bblanchon/ArduinoJson @ ^6.21.2
https://github.com/JChristensen/Timezone @ ^1.2.4
olikraus/U8g2 @ ^2.34.17
zinggjm/GxEPD2 @ ^1.5.0
[env:esp8266-release]
platform = espressif8266
board = esp12e
board_build.f_cpu = 80000000L
build_flags = -D RELEASE
;-Wl,-Map,output.map
monitor_filters =
;default ; Remove typical terminal control codes from input
;time ; Add timestamp with milliseconds for each new line
;log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
esp8266_exception_decoder
[env:esp8266-release-prometheus]
platform = espressif8266
board = esp12e
board_build.f_cpu = 80000000L
build_flags = -D RELEASE -DENABLE_PROMETHEUS_EP
monitor_filters =
;default ; Remove typical terminal control codes from input
;time ; Add timestamp with milliseconds for each new line
;log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
esp8266_exception_decoder
[env:esp8266-debug]
platform = espressif8266
board = esp12e
board_build.f_cpu = 80000000L
build_flags = -DDEBUG_LEVEL=DBG_DEBUG -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_OOM -DDEBUG_ESP_PORT=Serial -DPIO_FRAMEWORK_ARDUINO_MMU_CACHE16_IRAM48
build_type = debug
monitor_filters =
;default ; Remove typical terminal control codes from input
time ; Add timestamp with milliseconds for each new line
log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
[env:esp8285-release]
platform = espressif8266
board = esp8285
board_build.ldscript = eagle.flash.1m64.ld
board_build.f_cpu = 80000000L
build_flags = -D RELEASE
monitor_filters =
;default ; Remove typical terminal control codes from input
time ; Add timestamp with milliseconds for each new line
;log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
[env:esp8285-debug]
platform = espressif8266
board = esp8285
board_build.ldscript = eagle.flash.1m64.ld
board_build.f_cpu = 80000000L
build_flags = -DDEBUG_LEVEL=DBG_DEBUG
-DDEBUG_ESP_CORE
-DDEBUG_ESP_WIFI
-DDEBUG_ESP_HTTP_CLIENT
-DDEBUG_ESP_HTTP_SERVER
-DDEBUG_ESP_OOM
-DDEBUG_ESP_PORT=Serial
build_type = debug
monitor_filters =
;default ; Remove typical terminal control codes from input
time ; Add timestamp with milliseconds for each new line
log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
[env:esp32-wroom32-release]
platform = espressif32@>=6.1.0
board = lolin_d32
build_flags = -D RELEASE -std=gnu++14
build_unflags = -std=gnu++11
monitor_filters =
;default ; Remove typical terminal control codes from input
;time ; Add timestamp with milliseconds for each new line
;log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
esp32_exception_decoder
[env:esp32-wroom32-release-prometheus]
platform = espressif32@>=6.1.0
board = lolin_d32
build_flags = -D RELEASE
-std=gnu++14
-DENABLE_PROMETHEUS_EP
build_unflags = -std=gnu++11
monitor_filters =
;default ; Remove typical terminal control codes from input
;time ; Add timestamp with milliseconds for each new line
;log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
esp32_exception_decoder
[env:esp32-wroom32-debug]
platform = espressif32@>=6.1.0
board = lolin_d32
build_flags = -DDEBUG_LEVEL=DBG_DEBUG
-DDEBUG_ESP_CORE
-DDEBUG_ESP_WIFI
-DDEBUG_ESP_HTTP_CLIENT
-DDEBUG_ESP_HTTP_SERVER
-DDEBUG_ESP_OOM
-DDEBUG_ESP_PORT=Serial
-std=gnu++14
build_unflags = -std=gnu++11
build_type = debug
monitor_filters =
;default ; Remove typical terminal control codes from input
time ; Add timestamp with milliseconds for each new line
log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
[env:opendtufusionv1-release]
platform = espressif32@>=6.1.0
board = esp32-s3-devkitc-1
upload_protocol = esp-builtin
upload_speed = 115200
debug_tool = esp-builtin
debug_speed = 12000
build_flags = -D RELEASE -std=gnu++14
build_unflags = -std=gnu++11
monitor_filters =
;default ; Remove typical terminal control codes from input
time ; Add timestamp with milliseconds for each new line
;log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
monitor_filters = esp8266_exception_decoder

Loading…
Cancel
Save