Page 1 of 1
Electric counter instant and total
Posted: Tuesday 15 September 2015 21:04
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¶m=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.
Re: Electric counter instant and total
Posted: Wednesday 16 September 2015 20:33
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
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.
Re: Electric counter instant and total
Posted: Sunday 20 September 2015 0:31
by andreo
Also missing the reading of actual power consumption.
Re: Electric counter instant and total
Posted: Sunday 20 September 2015 8:30
by Justintime
That would be a great addition. That's why I stick with Mysensors at the moment.
Re: Electric counter instant and total
Posted: Tuesday 13 October 2015 21:17
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..
Re: Electric counter instant and total
Posted: Wednesday 14 October 2015 15:30
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.
Re: Electric counter instant and total
Posted: Monday 19 October 2015 15:27
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)
Re: Electric counter instant and total
Posted: Thursday 22 October 2015 16:23
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?
Re: Electric counter instant and total
Posted: Thursday 22 October 2015 17:18
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.
Re: Electric counter instant and total
Posted: Thursday 22 October 2015 17:25
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.
Re: Electric counter instant and total
Posted: Thursday 22 October 2015 17:29
by rmtucker
Just a screenshot of the result

- v01.jpg (76.17 KiB) Viewed 11373 times
Re: Electric counter instant and total
Posted: Thursday 22 October 2015 19:16
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 (148.28 KiB) Viewed 11362 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

Re: Electric counter instant and total
Posted: Thursday 22 October 2015 21:11
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???

Re: Electric counter instant and total
Posted: Thursday 22 October 2015 21:36
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.
Re: Electric counter instant and total
Posted: Thursday 22 October 2015 21:43
by rmtucker
So how in the graph above is rtenklooster showing changes in data less than 5 minute intervals?
I am really confused now??
Re: Electric counter instant and total
Posted: Thursday 17 December 2015 10:10
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.
Re: Electric counter instant and total
Posted: Friday 18 December 2015 17:38
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.
Re: Electric counter instant and total
Posted: Saturday 04 March 2017 20:37
by journeyman
If my Counter have 6400 pulses per kwh what rule (calculation) should i put in esp easy?
Re: Electric counter instant and total
Posted: Wednesday 04 September 2019 9:13
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.