I am trying to upload my CT sensor data to the local emoncms webserver .I am getting below message at my serial monitor Message .I think it mean to say that data posted at emonserver successfully .But my emon webserver input tab is still not showing anything .M i doing something wrong .i have done lot of googling but unable to resolve .hope i will get some shed of light in this forum .please help me to resolve this problem its my humble request...
; Power L1 : 126.43
; Power L2 : 120.24
; Power L3 : 149.72
; Power N : 152.47
Connecting...
{"success":false,"message":"Username or password empty"}
Disconnecting......
Below is my sketch for HTTP Request.
// this method makes a HTTP connection to the server:
void sendData() {
// if there's a successful connection:
if (client.connect(server, 8081)) {
Serial.println("Connecting...");
// send the HTTP GET request:
client.print("GET /input/post.json?");
if (node > 0) {
client.println("node=");
client.println(node);
}
client.print("&json={");
client.print("power-L1:");
client.print(Irms1*volt);
client.print(",power-L2:");
client.print(Irms2*volt);
client.print(",power-L3:");
client.print(Irms3*volt);
client.print(",power-N:");
client.print(Irms4*volt);
client.print("}&apikey=");
client.print(apikey);
client.println(" HTTP/1.1");
client.println("Host:192.168.0.4");
client.println("User-Agent: Arduino-ethernet");
client.println("Connection: close");
client.println();
// note the time that the connection was made:
lastConnectionTime = millis();
}
else {
// if you couldn't make a connection:
Serial.println("Connection failed");
Serial.println("Disconnecting...");
client.stop();
}
}
emoncms data upload Problem
Submitted by sanjyou on Sun, 22/11/2015 - 16:31I am trying to upload my CT sensor data to the local emoncms webserver .I am getting below message at my serial monitor Message .I think it mean to say that data posted at emonserver successfully .But my emon webserver input tab is still not showing anything .M i doing something wrong .i have done lot of googling but unable to resolve .hope i will get some shed of light in this forum .please help me to resolve this problem its my humble request...
; Power L1 : 126.43
; Power L2 : 120.24
; Power L3 : 149.72
; Power N : 152.47
Connecting...
{"success":false,"message":"Username or password empty"}
Disconnecting......
Below is my sketch for HTTP Request.
// this method makes a HTTP connection to the server:
void sendData() {
// if there's a successful connection:
if (client.connect(server, 8081)) {
Serial.println("Connecting...");
// send the HTTP GET request:
client.print("GET /input/post.json?");
if (node > 0) {
client.println("node=");
client.println(node);
}
client.print("&json={");
client.print("power-L1:");
client.print(Irms1*volt);
client.print(",power-L2:");
client.print(Irms2*volt);
client.print(",power-L3:");
client.print(Irms3*volt);
client.print(",power-N:");
client.print(Irms4*volt);
client.print("}&apikey=");
client.print(apikey);
client.println(" HTTP/1.1");
client.println("Host:192.168.0.4");
client.println("User-Agent: Arduino-ethernet");
client.println("Connection: close");
client.println();
// note the time that the connection was made:
lastConnectionTime = millis();
}
else {
// if you couldn't make a connection:
Serial.println("Connection failed");
Serial.println("Disconnecting...");
client.stop();
}
}
Regards
Aryan...