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!
electric instant+counter - update device with new total value instead of incremental?
Moderator: leecollings
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: electric instant+counter - update device with new total value instead of incremental?
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.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 33
- Joined: Wednesday 12 February 2020 6:39
- Target OS: Linux
- Domoticz version: v2022.2
- Location: Czech
- Contact:
Re: electric instant+counter - update device with new total value instead of incremental?
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 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
DOCKERED v14824,NODE-RED,Tasmotized Sonoffs,Tasmoadmin,zigbee2mqtt,EWPE,REST980,WLED
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: electric instant+counter - update device with new total value instead of incremental?
I agree, total counter is a better term.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
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: electric instant+counter - update device with new total value instead of incremental?
Wiki is updated
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Who is online
Users browsing this forum: Google [Bot] and 1 guest