mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-25 20:06:08 +00:00
Cloud config in config print
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
|
||||
#include "AmsConfiguration.h"
|
||||
#include "hexutils.h"
|
||||
#if defined(ESP32)
|
||||
#include "ESPRandom.h"
|
||||
#endif
|
||||
|
||||
bool AmsConfiguration::getSystemConfig(SystemConfig& config) {
|
||||
EEPROM.begin(EEPROM_SIZE);
|
||||
@@ -1291,6 +1294,16 @@ void AmsConfiguration::print(Print* debugger)
|
||||
debugger->printf_P(PSTR("Language: %s\r\n"), ui.language);
|
||||
}
|
||||
|
||||
CloudConfig cc;
|
||||
if(getCloudConfig(cc)) {
|
||||
String uuid = ESPRandom::uuidToString(cc.clientId);;
|
||||
debugger->println(F("--UI configuration--"));
|
||||
debugger->printf_P(PSTR("Enabled: %s\r\n"), cc.enabled ? "Yes" : "No");
|
||||
debugger->printf_P(PSTR("Hostname: %s\r\n"), cc.hostname);
|
||||
debugger->printf_P(PSTR("Client ID: %s\r\n"), uuid.c_str());
|
||||
debugger->printf_P(PSTR("Interval: %d\r\n"), cc.interval);
|
||||
}
|
||||
|
||||
debugger->println(F("-----------------------------------------------"));
|
||||
debugger->flush();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user