Skip to content

Commit

Permalink
Resolve #199. Add Escaped Double quote to the json string
Browse files Browse the repository at this point in the history
  • Loading branch information
yoavl committed Jan 2, 2019
1 parent adcd0ec commit 48f0377
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,18 @@ create_rapi_json() {
url = e_url;
data = "";
url += String(emoncms_node) + "&json={";
data += "amp:" + String(amp) + ",";
data += "\"amp\":" + String(amp) + ",";
if (volt > 0) {
data += "volt:" + String(volt) + ",";
}
data += "wh:" + String(watthour_total) + ",";
data += "temp1:" + String(temp1) + ",";
data += "temp2:" + String(temp2) + ",";
data += "temp3:" + String(temp3) + ",";
data += "pilot:" + String(pilot) + ",";
data += "state:" + String(state) + ",";
data += "freeram:" + String(ESP.getFreeHeap()) + ",";
data += "divertmode:" + String(divertmode);
data += "\"wh\":" + String(watthour_total) + ",";
data += "\"temp1\":" + String(temp1) + ",";
data += "\"temp2\":" + String(temp2) + ",";
data += "\"temp3\":" + String(temp3) + ",";
data += "\"pilot\":" + String(pilot) + ",";
data += "\"state\":" + String(state) + ",";
data += "\"freeram\":" + String(ESP.getFreeHeap()) + ",";
data += "\"divertmode\":" + String(divertmode);
url += data;
if (emoncms_server == "data.openevse.com/emoncms") {
// data.openevse uses device module
Expand Down

0 comments on commit 48f0377

Please sign in to comment.