Fixed 8266 build

This commit is contained in:
Gunnar Skjold
2024-01-06 19:11:22 +01:00
parent 48ab87ba50
commit b951fe9099
3 changed files with 6 additions and 3 deletions

View File

@@ -9,7 +9,9 @@
#include "crc.h"
#include "Uptime.h"
#include "hexutils.h"
#if defined(ESP32)
#include <ESPRandom.h>
#endif
CloudConnector::CloudConnector(RemoteDebug* debugger) {
this->debugger = debugger;
@@ -36,11 +38,13 @@ CloudConnector::CloudConnector(RemoteDebug* debugger) {
bool CloudConnector::setup(CloudConfig& config, MeterConfig& meter, HwTools* hw) {
bool ret = false;
#if defined(ESP32)
if(!ESPRandom::isValidV4Uuid(config.clientId)) {
ESPRandom::uuid4(config.clientId);
ret = true;
}
uuid = ESPRandom::uuidToString(config.clientId);
#endif
this->config = config;
this->hw = hw;

View File

@@ -39,7 +39,6 @@
#include "html/conf_ui_json.h"
#include "html/conf_cloud_json.h"
#include "html/firmware_html.h"
#include <ESPRandom.h>
#if defined(ESP32)
#include <esp_task_wdt.h>

View File

@@ -2,7 +2,7 @@
extra_configs = platformio-user.ini
[common]
lib_deps = EEPROM, LittleFS, DNSServer, https://github.com/256dpi/arduino-mqtt.git, OneWireNg@0.10.0, DallasTemperature@3.9.1, EspSoftwareSerial@6.14.1, https://github.com/gskjold/RemoteDebug.git, Time@1.6.1, Timezone@1.2.4, mulmer89/ESPRandom@1.5.0, FirmwareVersion, AmsConfiguration, AmsData, AmsDataStorage, HwTools, Uptime, AmsDecoder, PriceService, EnergyAccounting, AmsMqttHandler, RawMqttHandler, JsonMqttHandler, DomoticzMqttHandler, HomeAssistantMqttHandler, RealtimePlot, ConnectionHandler, SvelteUi
lib_deps = EEPROM, LittleFS, DNSServer, https://github.com/256dpi/arduino-mqtt.git, OneWireNg@0.10.0, DallasTemperature@3.9.1, EspSoftwareSerial@6.14.1, https://github.com/gskjold/RemoteDebug.git, Time@1.6.1, Timezone@1.2.4, FirmwareVersion, AmsConfiguration, AmsData, AmsDataStorage, HwTools, Uptime, AmsDecoder, PriceService, EnergyAccounting, AmsMqttHandler, RawMqttHandler, JsonMqttHandler, DomoticzMqttHandler, HomeAssistantMqttHandler, RealtimePlot, ConnectionHandler, SvelteUi
lib_ignore = OneWire
extra_scripts =
pre:scripts/addversion.py
@@ -19,7 +19,7 @@ build_flags =
-fexceptions
[esp32]
lib_deps = WiFi, Ethernet, ESPmDNS, WiFiClientSecure, HTTPClient, FS, Update, HTTPUpdate, WebServer, ESP32 Async UDP, ESP32SSDP, ${common.lib_deps}, CloudConnector
lib_deps = WiFi, Ethernet, ESPmDNS, WiFiClientSecure, HTTPClient, FS, Update, HTTPUpdate, WebServer, ESP32 Async UDP, ESP32SSDP, mulmer89/ESPRandom@1.5.0, ${common.lib_deps}, CloudConnector
[env:esp8266]
platform = espressif8266@4.2.0