mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-03-09 12:31:48 +00:00
Fixed cloud bugs
This commit is contained in:
@@ -46,9 +46,9 @@ bool CloudConnector::setup(CloudConfig& config, MeterConfig& meter, HwTools* hw)
|
||||
this->hw = hw;
|
||||
|
||||
this->maxPwr = 0;
|
||||
this->distributionSystem = distributionSystem;
|
||||
this->mainFuse = mainFuse;
|
||||
this->productionCapacity = productionCapacity;
|
||||
this->distributionSystem = meter.distributionSystem;
|
||||
this->mainFuse = meter.mainFuse;
|
||||
this->productionCapacity = meter.productionCapacity;
|
||||
|
||||
this->initialized = false;
|
||||
|
||||
@@ -286,7 +286,7 @@ void CloudConnector::update(AmsData& data, EnergyAccounting& ea) {
|
||||
meterManufacturer(data.getMeterType()).c_str(),
|
||||
data.getMeterModel().c_str(),
|
||||
data.getMeterId().c_str(),
|
||||
distributionSystemStr(distributionSystem),
|
||||
distributionSystemStr(distributionSystem).c_str(),
|
||||
mainFuse,
|
||||
maxPwr,
|
||||
productionCapacity
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
t: '', h: '', n: ''
|
||||
},
|
||||
c: {
|
||||
e: false, i: null, s: null, es: null
|
||||
e: false, i: null, es: null
|
||||
}
|
||||
};
|
||||
configurationStore.subscribe(update => {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"c": {
|
||||
"e" : %s,
|
||||
"i" : "%s",
|
||||
"es": %s
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#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>
|
||||
@@ -1094,7 +1095,6 @@ void AmsWebServer::configurationJson() {
|
||||
server.sendContent(buf);
|
||||
snprintf_P(buf, BufferSize, CONF_CLOUD_JSON,
|
||||
cloud.enabled ? "true" : "false",
|
||||
cloud.clientId,
|
||||
#if defined(ESP32) && defined(ENERGY_SPEEDOMETER_PASS)
|
||||
sysConfig.energyspeedometer == 7 ? "true" : "false"
|
||||
#else
|
||||
|
||||
@@ -312,7 +312,6 @@ void setup() {
|
||||
bool shared = false;
|
||||
Serial.flush();
|
||||
Serial.end();
|
||||
MeterConfig meterConfig;
|
||||
config.getMeterConfig(meterConfig);
|
||||
if(meterConfig.rxPin == 3) {
|
||||
shared = true;
|
||||
@@ -682,7 +681,6 @@ void loop() {
|
||||
}
|
||||
|
||||
if(config.isMeterChanged()) {
|
||||
MeterConfig meterConfig;
|
||||
config.getMeterConfig(meterConfig);
|
||||
if(meterConfig.source = METER_SOURCE_SERIAL) {
|
||||
switch(meterConfig.parser) {
|
||||
@@ -1099,7 +1097,6 @@ bool readHanPort() {
|
||||
return false;
|
||||
}
|
||||
if(mc->isConfigChanged()) {
|
||||
MeterConfig meterConfig;
|
||||
mc->getCurrentConfig(meterConfig);
|
||||
config.setMeterConfig(meterConfig);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user