Hello,

I’m using an ACS712 and ESP8266 to obtain the values of eletric current (Amperes) of an eletric load, to monitor it on my cayenne dashboard.

I managed to send to cayenne dashboard the values of instant eletric power consumption, in W (Watts), using this documentation: Data types for Cayenne MQTT API

I’m using this function to do so:

CAYENNE_OUT(1)

{

Cayenne.virtualWrite(1, power, “pow”, “W”);

}

The values on cayenne dashboard are correct comparing to eletric load oficial caractheristics.

I want to have a graph, on my cayenne dashboard, of the eletric energy consumption, in Wh (Watts/hour). That graph will have the eletric energy consumption in the Y axis (Wh) and the time (hours or minutes or seconds) in the X axis. So, I tried this code, sending the power value in kW:

CAYENNE_OUT(1)

{

Cayenne.virtualWrite(1, power, “energy”, “kwh”);

}

And this is the result in cayenne dashboard:

Something is wrong, because the eletric load I used was of 1419 W (1,419 kW) during 5 seconds, then I used 2360 W (2,360 kW) load during 5 seconds… So the eletric energy consumption should be very low, (around 0,004 kWh) but the graph shows that I consumed around 3 KWh ?

Any opinions or problems in my logic?

Thank you.