Electric counter instant and total

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
rtenklooster
Posts: 36
Joined: Tuesday 23 December 2014 16:20
Target OS: Linux
Domoticz version:
Contact:

Electric counter instant and total

Post by rtenklooster »

Currently it's possible to add two types of energy counters.
1. Incremental counter (counting done by domoticz)
2. RFX meter: instant en current. (Counting must be done by client)

What I'd like to see is a new combined meter:
An incremental counter with current power use. Without the need of client side counting. This way we can add some extra functionality to our espeasy.
It would be nice to have this option:
Electricity (instant and counter)

Code: Select all

/json.htm?type=command&param=udevice&idx=IDX&nvalue=0&svalue=POWER;NRPULSES
IDX = id of your device (This number can be found in the devices tab in the column "IDX")
POWER = current power
NRPULSES = number of pulses to be added to incremental counter for total / hourly / daily use.
This way we can have one device instead of two. The functionality is already there.. the combination just isn't there yet.
User avatar
Mediacj
Posts: 74
Joined: Wednesday 11 February 2015 16:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Electric counter instant and total

Post by Mediacj »

That would be a great combination, now we only have energy(kWh) with Espeasy's pulsecounter.

When there is also the possibility to see the actual power(Watt) would make it much more useful :D

Today I received my first Nodemcu devkit that is really a perfect combination of hardware to use with Espeasy all things you need in one small print.
User avatar
andreo
Posts: 42
Joined: Friday 07 August 2015 21:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.3
Location: Anna Paulowna, Netherlands
Contact:

Re: Electric counter instant and total

Post by andreo »

Also missing the reading of actual power consumption.
Latest version of Domoticz and more running on Docker|Raspberry Pi 4-B 8GB Bookworm|RF-Link|Klik Aan Klik Uit|Nefit easy|ESPeasy|P1 power meter|S0PCM-5 through Ser2Net|Alecto WS5500|FrtizBox|Satel Integra|Solis
Greetz Andre.
Justintime
Posts: 228
Joined: Thursday 21 May 2015 9:08
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Electric counter instant and total

Post by Justintime »

That would be a great addition. That's why I stick with Mysensors at the moment.
rtenklooster
Posts: 36
Joined: Tuesday 23 December 2014 16:20
Target OS: Linux
Domoticz version:
Contact:

Re: Electric counter instant and total

Post by rtenklooster »

Hi,
I'm posting here to bring this request under the attention.
Still missing this feature in domoticz. Al lot of users on the espesasy forum are requesting this feature.
I hope this will be implemented one day..
BobS
Posts: 15
Joined: Friday 05 June 2015 11:49
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Rotterdam, NL
Contact:

Re: Electric counter instant and total

Post by BobS »

Hi,
It would be great to have that option.

As a workaround I tied two ESP inputs together and configured both as pulsecounter.
One input sends to a virtual input of type Counter Incremental, the other to a type Usage(energy).
Depending on the pulse frequency add a calculation in the EspEasy configuration to get the correct values in Domoticz.

Hope this helps.
Bob.
rmtucker
Posts: 21
Joined: Saturday 17 October 2015 23:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Electric counter instant and total

Post by rmtucker »

This option is needed,seems strange it is not there already.
I mentioned this in another post and was plainly told it will not happen.
Shame really i am having to tie two input on the pulsecounter as above to get it to work in a fashion.(electic,usage and incremental counter)
rtenklooster
Posts: 36
Joined: Tuesday 23 December 2014 16:20
Target OS: Linux
Domoticz version:
Contact:

Re: Electric counter instant and total

Post by rtenklooster »

BobS wrote:Hi,
It would be great to have that option.

As a workaround I tied two ESP inputs together and configured both as pulsecounter.
One input sends to a virtual input of type Counter Incremental, the other to a type Usage(energy).
Depending on the pulse frequency add a calculation in the EspEasy configuration to get the correct values in Domoticz.

Hope this helps.
Bob.
Thanks for the suggestion. It would be nice if you could provide an example how you did it.
I will add it to the esp wiki.
For as far as i know you'll need the time between pulses, in my case my meter gives 1000 pulses / kWh
So i can calculate the current usage by this simple formula: (60*60) / time in sec. between pulses
How did you achieve this in the default espeasy sketch?
BobS
Posts: 15
Joined: Friday 05 June 2015 11:49
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Rotterdam, NL
Contact:

Re: Electric counter instant and total

Post by BobS »

Hi Richard,

I expect the hardware part is clear, just tie two inputs together and in the devices tab define a pulscounter for each of them.
The kWh pulsecounter sends its data to a Domoticz virtual input of type Counter Incremental (Teller Incrementele), in your case where there are 1000 pulses for 1kWh you can just send this value to Domoticz without calculation.

For the actual usage you need to do a calculation. The default sketch runs once a minute so you wil receive 1000/60 pulses during this minute.
You will need to multiply the number of pulses received by 60 to get the actual usage (in fact this is the average usage over the last minute).
I added a formula like %value%*60 to the setup for this device in ESPeasy.
The calculated value is the send to a Domoticz virtual input of type energy usage (Verbruik Electra).

If you have 'only' 1000 pulses per kWh the result for actual usage may not be very acurate when usage is low.

I use this setup with a couple of modified ELRO M12 Energy monitors which give about 390k pulses per kWh so my formulas are:
%value%/390 for kWh and %value%/6.4 for usage.

Hope this helps.
Bob.
rmtucker
Posts: 21
Joined: Saturday 17 October 2015 23:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Electric counter instant and total

Post by rmtucker »

Had this running for a few days now.
My meter is flashing 1000 per kwh
I have 2 inputs Tied together GPIO12 and GPIO13:
1) The first pulsecounter is passed to Domoticz incremental counter for KWh
2) is a second pulsecounter which in my case is * 12 and passed to Domoticz as Usage (electric as watts)

I push data to Domoticz every 5mins so 3600/300secs = 12

This gives a resolution of 12watts which is great.
rmtucker
Posts: 21
Joined: Saturday 17 October 2015 23:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Electric counter instant and total

Post by rmtucker »

Just a screenshot of the result
v01.jpg
v01.jpg (76.17 KiB) Viewed 11014 times
rtenklooster
Posts: 36
Joined: Tuesday 23 December 2014 16:20
Target OS: Linux
Domoticz version:
Contact:

Re: Electric counter instant and total

Post by rtenklooster »

Thanks for sharing this with me. Now I get how you meant it.
I was thinking about the way I implemented it in my one situation, what i did was a request every pulse... of course that might not be the best solution.. this isn't either.
The whole point of me wanting to see my actual consumption is to determinate what device is using how much.. so i want both, accuracy and fast response times.
Especially because its the small devices making the difference... i only see the impact of my phone charger when i'm not using a lot of other electrical devices.
Schermafbeelding 2015-10-22 om 19.18.17.png
Schermafbeelding 2015-10-22 om 19.18.17.png (148.28 KiB) Viewed 11003 times
That's why i'm thinking to modify the esp sketch and add another device that's capable of updating two idx devices at once.
By keeping track of the average pulse times, i can have both accuracy and fast response times.

At the moment i'm pretty busy but when i have time i will dig into this ;) We have to find something if domoticz developers don't see why a combined counter would come in handy ;)
rmtucker
Posts: 21
Joined: Saturday 17 October 2015 23:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Electric counter instant and total

Post by rmtucker »

Well i have only been using Domoticz for a few days so i am not sure.
But as far as i can see you would not get the resolution from Domoticz?.
If i send 3 sets of data to domoticz in 5 mins,the only one that shows is the last one?
So is domoticz only logging the last data every 5 mins?
It has me very confused??? :?
BobS
Posts: 15
Joined: Friday 05 June 2015 11:49
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Rotterdam, NL
Contact:

Re: Electric counter instant and total

Post by BobS »

The shortlog is updated every 5 minutes so in the logging you will only see 5 minute samples.
In the display you will see the actual (last received) value for the actual usage.
It looks like the counter data (total usage and usage today) are also updated and logged once every 5 minutes.
rmtucker
Posts: 21
Joined: Saturday 17 October 2015 23:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Electric counter instant and total

Post by rmtucker »

So how in the graph above is rtenklooster showing changes in data less than 5 minute intervals?
I am really confused now??
elmortero
Posts: 247
Joined: Sunday 29 November 2015 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.9639
Location: Spain
Contact:

Re: Electric counter instant and total

Post by elmortero »

BobS wrote:The shortlog is updated every 5 minutes so in the logging you will only see 5 minute samples.
In the display you will see the actual (last received) value for the actual usage.
It looks like the counter data (total usage and usage today) are also updated and logged once every 5 minutes.
Right now mine shows a zero current usage
Could you please explain how to do this? It might be clear and obvious for the more experienced Domoticz users but to me it is not
I think the OP in viewtopic.php?f=24&t=7692&p=52039&hilit ... 021#p52039 would also appreciate it a lot.
BobS
Posts: 15
Joined: Friday 05 June 2015 11:49
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Rotterdam, NL
Contact:

Re: Electric counter instant and total

Post by BobS »

Hi,
I am not at home for the moment so just a short reply:
To see the actual usage and the 5 minute log you must use a virtual input of type Usage (electric) and put the actual value in there (watts). This item should show up in the utility page as type: usage,electric.
The guy in the link you gave uses another type of input at the moment I cannot comment on that.
Hope this helps.
Bob.
journeyman
Posts: 23
Joined: Sunday 04 December 2016 16:21
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Poland
Contact:

Re: Electric counter instant and total

Post by journeyman »

If my Counter have 6400 pulses per kwh what rule (calculation) should i put in esp easy?
jasonfoy123
Posts: 1
Joined: Wednesday 04 September 2019 9:08
Target OS: Windows
Domoticz version:
Contact:

Re: Electric counter instant and total

Post by jasonfoy123 »

In a DC circuit, the power fed on is in reality the fabricated from the DC voltage instances the DC present day, given in watts. However, for AC circuits with reactive additives we must calculate the ate up strength otherwise.

Electrical power is the “price” at which electricity is being fed on in a circuit and as such all electrical and digital components and gadgets have a restrict to the amount of electrical electricity that they could thoroughly handle. For instance, a 1/four watt resistor or a 20 watt amplifier.

Electrical electricity may be time-various both as a DC quantity or as an AC quantity. The amount of energy in a circuit at any immediate of time is known as the instantaneous electricity and is given by way of the famous relationship of energy equals volts instances amps (P = V*I). So one watt (which is the fee of expending electricity at one joule in keeping with second) will be same to the volt-ampere made from one volt instances one ampere.

Then the electricity absorbed or provided by a circuit element is the fabricated from the voltage, V throughout the detail, and the modern-day, I flowing through it.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest