Measure kWh used in 1 minute.

Discussions about RaZberry - Z-Wave board for Raspberry computer
Rappo
Posts: 26
Joined: 01 Dec 2014 15:25

Measure kWh used in 1 minute.

Post 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
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Measure kWh used in 1 minute.

Post 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?
Since 29-12-2016 I am no longer a moderator for this forum
Rappo
Posts: 26
Joined: 01 Dec 2014 15:25

Re: Measure kWh used in 1 minute.

Post 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?
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Measure kWh used in 1 minute.

Post 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
Since 29-12-2016 I am no longer a moderator for this forum
skiv71
Posts: 124
Joined: 01 May 2014 13:46
Location: United Kingdom
Contact:

Re: Measure kWh used in 1 minute.

Post 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
Rappo
Posts: 26
Joined: 01 Dec 2014 15:25

Re: Measure kWh used in 1 minute.

Post 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?
skiv71
Posts: 124
Joined: 01 May 2014 13:46
Location: United Kingdom
Contact:

Re: Measure kWh used in 1 minute.

Post 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;
Rappo
Posts: 26
Joined: 01 Dec 2014 15:25

Re: Measure kWh used in 1 minute.

Post 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-
Rappo
Posts: 26
Joined: 01 Dec 2014 15:25

Re: Measure kWh used in 1 minute.

Post by Rappo »

Let me rephrase that: I am willing to pay for help here. ;)
Mirar
Posts: 113
Joined: 19 Oct 2014 16:54
Location: Stockholm

Re: Measure kWh used in 1 minute.

Post 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?
Post Reply