Page 1 of 2

Measure kWh used in 1 minute.

Posted: 29 Dec 2014 18:27
by Rappo
I need to check how much kWh I have used in a powerswitch for the last 60 seconds. Using the logical rules in Home Automation I am just able to get the current kWh... Any takers?

If I could reset the kWh every 60 seconds I guess that would help. But I am not sure how to do this.

Rappo

Re: Measure kWh used in 1 minute.

Posted: 29 Dec 2014 19:51
by pz1
Rappo wrote:If I could reset the kWh every 60 seconds I guess that would help. But I am not sure how to do this.
With the Fibaro Wall plug I experienced that a "kWh reset" resulted in a short period of disconnection of the power. Haven't tested that recently.
For what purpose would you need these every minute readings?

Re: Measure kWh used in 1 minute.

Posted: 30 Dec 2014 11:43
by Rappo
I need to turn off an electric device if it uses more than X kWh in 1 minute.

I just did a manual reset of my Aeon Labs Switch. There did not seem to be a disconnection of power here.

By the way, are you using any custom javascripts in any of your automations?

Re: Measure kWh used in 1 minute.

Posted: 30 Dec 2014 12:49
by pz1
Rappo wrote:I need to turn off an electric device if it uses more than X kWh in 1 minute.
Well, in the Fibaro Wall plug you can specify the "overload wattage" where the device automatically shuts off. I don't know if Aeon has something similar.
I just did a manual reset of my Aeon Labs Switch. There did not seem to be a disconnection of power here.
Then they have made a better implementation than Fibaro! (I was measuring usage of may Pi, which badly crashed and did spoil the SD Card on a kWh reset.
By the way, are you using any custom javascripts in any of your automations?
No I haven't done anything serious. Only minor things like the early version of OpenRemoteHelpers named RaZ-OR.
More recently UDP Status send as described in the Recipes section. I haven't been able to read the electrical data there yet, as the device flooded the system with updates

Re: Measure kWh used in 1 minute.

Posted: 30 Dec 2014 12:58
by skiv71
I use the NorthQ power meter which count the pulses and I use this information to get both instantaneous kW and the kWh reading (which I offset so my value matches the real meter).

I have a sleep/wake time of 60 secs and on change I compare current to historical to determine the kW value.

I also have entries for standing charge and per unit cost so my system works out the daily cost too :)

Neil

Re: Measure kWh used in 1 minute.

Posted: 30 Dec 2014 13:01
by Rappo
I have a sleep/wake time of 60 secs and on change I compare current to historical to determine the kW value.
May I ask how you set this up? Do you do this using javascript?

Re: Measure kWh used in 1 minute.

Posted: 30 Dec 2014 13:12
by skiv71
I use BMS Link which run's the z-way-server itself so its much more stable.

I have an RPi with software (which I wrote) that turn's it into a remote device server for the RaZberry GPIO and any USB devices it has.

The BMS Link system allow's for virtual device points where its value is determined by external variable's (i.e. NorthQ meter value) and any scripting you do.

The language used is ECMAScript/Javascript.

d=x.value-x.ago(SECOND,150);
e=(d*3600)/144;
value=+e.toFixed(3);
if (value>10) value=0;
if (value<0) value=0;
return value;

Re: Measure kWh used in 1 minute.

Posted: 30 Dec 2014 13:50
by Rappo
Thanks!

Using the fibaro gateway, I am able to get my system to work like I want. Using Home Automation on the RPi however, I am not able to reproduce this simple logial rule:

Image

If anyone could help me set this up on the RPi I would be a very happy man...
I might be willing to pay for help here.

-R-

Re: Measure kWh used in 1 minute.

Posted: 06 Jan 2015 17:47
by Rappo
Let me rephrase that: I am willing to pay for help here. ;)

Re: Measure kWh used in 1 minute.

Posted: 06 Jan 2015 23:10
by Mirar
Not a direct solution, just tossing ideas:

I'm not using javascript, but I poll the JSON interface and read the 'current power' number instead of the 'kwh used'.
My AN159 switches only report with a resolution of 0.1kWh, which would need a power usage of 6kW to make a difference during 60 seconds (tricky with a limit of 3kW on the relay) - but they report power used to 10W near. I have them report on 10s basis (fastest possible), which makes it possible to read power usage from 0.003kWh per minute (10W in 10s followed by 0W for 50s).

(I currently only use it to detect when my tea kettle is boiling. For a while I used it to see if my Roomba was working or charging.)

Does the Fibaro report kWh used with higher resolution?