Page 1 of 1
electric instant+counter - update device with new total value instead of incremental?
Posted: Monday 20 April 2020 0:41
by jake
I have a dummy 'electric instant+counter' device which I update with dzvents with the command updateElectricity(power, energy)
The Wiki doesn't state whether 'energy' is incremental or total. However, in the JSON documentation of Domoticz it is states:
"Electricity (instant and counter)
/json.htm?type=command¶m=udevice&idx=IDX&nvalue=0&svalue=POWER;ENERGY
IDX = id of your device (This number can be found in the devices tab in the column "IDX")
POWER = current power
ENERGY = cumulative energy in Watt-hours (Wh) This is an incrementing counter. (if you choose as type "Energy read : Computed", this is just a "dummy" counter, not updatable because it's the result of DomoticZ calculs from POWER)"
So I expected it to work in dzVents also as incremental. Since my meter was not updating as expected, I finally decided to feed it with a new total, so old value + energy = new total. Now it works as expected.
If I am correct, please update the wiki page, so it mentions/warns that 'energy' is to supplied as a new total value. This will save other people the trouble!
Re: electric instant+counter - update device with new total value instead of incremental?
Posted: Monday 20 April 2020 1:11
by waaren
jake wrote: ↑Monday 20 April 2020 0:41
If I am correct, please update the wiki page, so it mentions/warns that 'energy' is to supplied as a new total value. This will save other people the trouble!
The dzVents command does the same as the JSON.
So if you set the device as Computed the energy is ignored because the energy is internally computed based on what is send as Power and the time. If you set it as Device you have to enter the cumulative energy. The line 'This is an incrementing counter" can be interpreted as you should only send the delta but that is not what is meant in the JSON documentation. Also when using the JSON to update the device you should send the actual total.
Please feel free to edit the
wiki page of the JSON / API to make it more clear.
Re: electric instant+counter - update device with new total value instead of incremental?
Posted: Monday 06 September 2021 7:51
by jarmoboy
HI Waaren,
I have had the same iisue yesterday like mentioned here in topic.The explanation in WIKI is not quite clear.
Wiki still says:
Electricity P1 smart meter
/json.htm?type=command¶m=udevice&idx=IDX&nvalue=0&svalue=USAGE1;USAGE2;RETURN1;RETURN2;CONS;PROD
IDX = id of your device (This number can be found in the devices tab in the column "IDX")
USAGE1= energy usage meter tariff 1, This is an incrementing counter <= this is misleading, should be This is total counter
USAGE2= energy usage meter tariff 2, This is an incrementing counter <= this is misleading, should be This is total counter
RETURN1= energy return meter tariff 1, This is an incrementing counter <= this is misleading, should be This is total counter
RETURN2= energy return meter tariff 2, This is an incrementing counter <= this is misleading, should be This is total counter
CONS= actual usage power (Watt)
PROD= actual return power (Watt)
USAGE and RETURN are counters (they should only count up).
For USAGE and RETURN supply the data in total Wh with no decimal point.
(So if your meter displays f.i. USAGE1= 523,66 KWh you need to send 523660)
Of course the counter is "incrementing" but is not incremental counter, it is total counter.
Si if you agree, i will repair it in WIKI, i only want to have an agreement from someone else for sure.
Thanks
Jarmo
Re: electric instant+counter - update device with new total value instead of incremental?
Posted: Monday 06 September 2021 8:42
by waltervl
jarmoboy wrote: ↑Monday 06 September 2021 7:51
HI Waaren,
I have had the same iisue yesterday like mentioned here in topic.The explanation in WIKI is not quite clear.
Wiki still says:
Electricity P1 smart meter
/json.htm?type=command¶m=udevice&idx=IDX&nvalue=0&svalue=USAGE1;USAGE2;RETURN1;RETURN2;CONS;PROD
IDX = id of your device (This number can be found in the devices tab in the column "IDX")
USAGE1= energy usage meter tariff 1, This is an incrementing counter
<= this is misleading, should be This is total counter
USAGE2= energy usage meter tariff 2, This is an incrementing counter
<= this is misleading, should be This is total counter
RETURN1= energy return meter tariff 1, This is an incrementing counter
<= this is misleading, should be This is total counter
RETURN2= energy return meter tariff 2, This is an incrementing counter
<= this is misleading, should be This is total counter
CONS= actual usage power (Watt)
PROD= actual return power (Watt)
USAGE and RETURN are counters (they should only count up).
For USAGE and RETURN supply the data in total Wh with no decimal point.
(So if your meter displays f.i. USAGE1= 523,66 KWh you need to send 523660)
Of course the counter is "incrementing" but is not incremental counter, it is total counter.
Si if you agree, i will repair it in WIKI, i only want to have an agreement from someone else for sure.
Thanks
Jarmo
I agree, total counter is a better term.
Re: electric instant+counter - update device with new total value instead of incremental?
Posted: Tuesday 07 September 2021 23:37
by waltervl
Wiki is updated