Not sure if this does anything, but increased json and mqtt limits to see if Kamstrup list 3 is received

This commit is contained in:
Gunnar Skjold 2020-02-13 20:50:13 +01:00
parent b6efae656f
commit d2f93c07bd
4 changed files with 5 additions and 4 deletions

View File

@ -194,6 +194,7 @@ static void hanToJsonKamstrup3phase(int listSize, JsonObject& data, HanReader& h
{
if (listSize >= (int)Kamstrup::List3PhaseShort)
{
data["ls"] = listSize;
data["lv"] = hanReader.getString( (int)Kamstrup_List3Phase::ListVersionIdentifier);
data["id"] = hanReader.getString( (int)Kamstrup_List3Phase::MeterID);
data["type"] = hanReader.getString( (int)Kamstrup_List3Phase::MeterType);

View File

@ -202,7 +202,7 @@ void readHanPort()
if (debugger) debugger->println(time);
// Define a json object to keep the data
StaticJsonDocument<500> json;
StaticJsonDocument<1024> json;
// Any generic useful info here
json["id"] = WiFi.macAddress();

View File

@ -41,7 +41,7 @@ void AmsWebServer::loop() {
server.handleClient();
}
void AmsWebServer::setJson(StaticJsonDocument<500> json) {
void AmsWebServer::setJson(StaticJsonDocument<1024> json) {
if(!json.isNull()) {
p = json["data"]["P"].as<int>();

View File

@ -24,12 +24,12 @@ class AmsWebServer {
public:
void setup(configuration* config, Stream* debugger);
void loop();
void setJson(StaticJsonDocument<500> json);
void setJson(StaticJsonDocument<1024> json);
private:
configuration* config;
Stream* debugger;
StaticJsonDocument<500> json;
StaticJsonDocument<1024> json;
int maxPwr;
int p;
double u1, u2, u3, i1, i2, i3;