mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-03-14 14:24:34 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d777040c0a | ||
|
|
a5636a60f8 | ||
|
|
6f817b2ed5 |
@@ -362,7 +362,9 @@ bool EnergyAccounting::load() {
|
|||||||
} else if(buf[0] == 4) {
|
} else if(buf[0] == 4) {
|
||||||
EnergyAccountingData4* data = (EnergyAccountingData4*) buf;
|
EnergyAccountingData4* data = (EnergyAccountingData4*) buf;
|
||||||
this->data = { 5, data->month,
|
this->data = { 5, data->month,
|
||||||
(uint16_t) (data->costYesterday / 10), (uint16_t) (data->costThisMonth / 100), (uint16_t) (data->costLastMonth / 100),
|
data->costYesterday,
|
||||||
|
data->costThisMonth,
|
||||||
|
data->costLastMonth,
|
||||||
0,0,0, // Income from production
|
0,0,0, // Income from production
|
||||||
data->peaks[0].day, data->peaks[0].value,
|
data->peaks[0].day, data->peaks[0].value,
|
||||||
data->peaks[1].day, data->peaks[1].value,
|
data->peaks[1].day, data->peaks[1].value,
|
||||||
|
|||||||
@@ -240,12 +240,20 @@ void AmsWebServer::sysinfoJson() {
|
|||||||
UiConfig ui;
|
UiConfig ui;
|
||||||
config->getUiConfig(ui);
|
config->getUiConfig(ui);
|
||||||
|
|
||||||
|
String meterModel = meterState->getMeterModel();
|
||||||
|
meterModel.replace("\\", "\\\\");
|
||||||
|
|
||||||
|
String meterId = meterState->getMeterId();
|
||||||
|
meterId.replace("\\", "\\\\");
|
||||||
|
|
||||||
int size = snprintf_P(buf, BufferSize, SYSINFO_JSON,
|
int size = snprintf_P(buf, BufferSize, SYSINFO_JSON,
|
||||||
VERSION,
|
VERSION,
|
||||||
#if defined(CONFIG_IDF_TARGET_ESP32S2)
|
#if defined(CONFIG_IDF_TARGET_ESP32S2)
|
||||||
"esp32s2",
|
"esp32s2",
|
||||||
#elif defined(CONFIG_IDF_TARGET_ESP32C3)
|
#elif defined(CONFIG_IDF_TARGET_ESP32C3)
|
||||||
"esp32c3",
|
"esp32c3",
|
||||||
|
#elif defined(CONFIG_FREERTOS_UNICORE)
|
||||||
|
"esp32solo",
|
||||||
#elif defined(ESP32)
|
#elif defined(ESP32)
|
||||||
"esp32",
|
"esp32",
|
||||||
#elif defined(ESP8266)
|
#elif defined(ESP8266)
|
||||||
@@ -272,8 +280,8 @@ void AmsWebServer::sysinfoJson() {
|
|||||||
dns2.toString().c_str(),
|
dns2.toString().c_str(),
|
||||||
#endif
|
#endif
|
||||||
meterState->getMeterType(),
|
meterState->getMeterType(),
|
||||||
meterState->getMeterModel().c_str(),
|
meterModel.c_str(),
|
||||||
meterState->getMeterId().c_str(),
|
meterId.c_str(),
|
||||||
ui.showImport,
|
ui.showImport,
|
||||||
ui.showExport,
|
ui.showExport,
|
||||||
ui.showVoltage,
|
ui.showVoltage,
|
||||||
|
|||||||
Reference in New Issue
Block a user