Calculating energy cosumption each day (Zwave power plug


I have a Neo Coolcam zwave power plug (I think is a clone of the Fibaro/Aeotec)

with following entity_ID

I do not understand the INTERVAL and PREVIOUS READING how it works, I imagine it keeps 4 intervals and 4 previuous readings? So in order to know the consumption of EACH DAY, how would I program it. I am very bad at templating


sensor.neo_coolcam_power_plug_12a_alarm_level 0
sensor.neo_coolcam_power_plug_12a_alarm_type 0
sensor.neo_coolcam_power_plug_12a_current 6.17
sensor.neo_coolcam_power_plug_12a_energy 0.14
sensor.neo_coolcam_power_plug_12a_exporting False
sensor.neo_coolcam_power_plug_12a_interval 301
sensor.neo_coolcam_power_plug_12a_interval_2 301
sensor.neo_coolcam_power_plug_12a_interval_3 301
sensor.neo_coolcam_power_plug_12a_interval_4 301
sensor.neo_coolcam_power_plug_12a_power 1264.37
sensor.neo_coolcam_power_plug_12a_power_management 0
sensor.neo_coolcam_power_plug_12a_previous_reading 0.03
sensor.neo_coolcam_power_plug_12a_previous_reading_2 1252.39
sensor.neo_coolcam_power_plug_12a_previous_reading_3 220.52
sensor.neo_coolcam_power_plug_12a_previous_reading_4 6.12
sensor.neo_coolcam_power_plug_12a_sourcenodeid 0
sensor.neo_coolcam_power_plug_12a_voltage 221.07

To me it looks like it is already doing the instantaneous power reading for you listed in kilowatts.

sensor.neo_coolcam_power_plug_12a_energy 0.14

That looks like a rough (rounded up) calculation of voltage and current, not taking power factor into consideration.

Then further down it lists

sensor.neo_coolcam_power_plug_12a_power 1264.37

which I think could be your power (in watts) WITH power factor taken into consideration…the maths works out for it anyway.

To get a DAILY calculation of consumption you would need to grab / log that power value (the 1264.37) on a regular basis and calculate kW/h’s from it. Thats my take on it anyway… someone might tell me I’m wrong

Power is Watt, the reading is correct, I have an air conditioning 1200Watt.

Energy consumption is the Watt multiplied by the time its on. This is what you pay on your bill.

I find it interesting if I am able to have a daily consumption. So it should be calculated the POWER for the time it was on from 0.00 to current time (and at 23.59 tell you how much was the consumption in the day.

Instantaneous energy i do not understand: So what is 0.14 energy, from which moment?

Yes, and how to do this?

Yes but from which moment? From last switch on, from restart of hass, from beginning of day (0.00)??

Yes, and how to do this?

That part I don’t know, sorry. I’m very new to Home Assistant and haven’t got much coding experience at all.

Yes but from which moment? From last switch on, from restart of hass, from beginning of day (0.00)??

I would say that value is an instantaneous figure, at that very moment in time. A device like that wouldn’t keep an ongoing log internally as far as I would imagine. For your recording (if someone else can help with coding) you would want it to log starting from 0:00.

No, energy cannot be instantaneous amount, that’s power.

Energy = power x timeframe

I think that’s the spirit of INTERVAL and PREVIOUS READING

True. I would only go off the Power value that it’s spitting out, as instantaneous power but maybe they are calling Energy the total power (ie: including reactive) because they didn’t want to confuse people? Is there not some manufacturers info that can tell you this?

no energy and power are 2 different things entirely. Like speed and distance (speed is energy, distance is power)

Yeah, like I said / implied, I think the manufacturer of the device just used ‘energy’ for lack of a better word to non-technical people. If you can find some manufacturers info that might clear things up. Either way, you only need Power because you can calculate using time, being 24 hours.

no, I think is the real energy, I just do not know from when it starts to count the energy

Does the manual for the device not spell out what the readings are? I have an Aeotec device and it has a cumulative reading from the beginning of time, a previous reading (last time it was turned on) and a current reading (how much it is currently consuming).

its a chinese clone of fibaro/aetoec, so I think should have same command,

you can see frokm first post I have 4 previous reading (KWh, W, V, A). But do not understand the time interval

Here is the manual
As this link is from Chris Jacksons site, You might want to search through the OpenHab forums for information on what things mean if the manual isn’t helpful.

For my switch, the current reading is the current accumulated consumption. The previous reading is as it was the last time it was turned off. I don’t use the information so I can’t tell you how I would do it. If you take a current reading as of midnight and subtract the current reading as of midnight yesterday. Using current here refers to the present not electrical.

So from the manual it looks like I was right in that ‘Energy’ is it record of kilowatt hours. I would say that is simply since it was last switched on so if you want to calculate a ‘per day’ value, simply have a calculation which subtracts the previously recorded value from the current value at a specific time. ie: 0:00. That is, as long as you don’t switch it off and clear the accumulated energy figure. In that case you would need HA to keep track of this and reset its ‘previous day’ value back to zero as well.

At least with my switch, You need to do a reset to clear the information. The values are stored in the device.

For Aeotec and Fibaro devices at least the power reading is from when they were last reset or from when the device was first included, whichever is the most recent.

I see, could you help me with the code?

I can keep my switch always ON (the air conditioner will go on and off, but switch stays on), no problem with that. Maybe since I have some power cut some values will not be accurate.

after a power cut they are all reset to zero?