Skip to content

Commit

Permalink
Merge pull request OpenEVSE#200 from yoavl/double_quotes_for_json_keys
Browse files Browse the repository at this point in the history
Resolve OpenEVSE#199. Add escaped double-quote to the json string
  • Loading branch information
glynhudson authored Jan 7, 2019
2 parents fb7902a + 3fdd8bc commit ac3240f
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 ac3240f

Please sign in to comment.