To give more details, data stored into kwh meters has the following format:
USAGE1;USAGE2;RETURN1;RETURN2;CONS;PROD, with:
- USAGE1= total energy usage meter tariff 1 in Wh.
- USAGE2= total energy usage meter tariff 2 in Wh.
- RETURN1= total energy return meter tariff 1 in Wh.
- RETURN2= total energy return meter tariff 2 in Wh.
- CONS= actual usage power (Watt)
- PROD= actual return power (Watt)
Doc specifies that:
USAGE and RETURN are total 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)
Domoticz will calculate the today values based on the delta's in the total cumulative energy of today.
You can get the full set of values going to "Setup" > "More options" > "Events". then click on the top/left icon, over the script content (should represent 3 sliders, and show "devices current states" when putting cursor over it). You''l see all devices you have, and the "Values" in last column. For this kWh device, you'll see "0/USAGE1;USAGE2;RETURN1;RETURN2;CONS;PROD". Getting these at regular interval could help debugging, if some thing is/goes wrong.
What you see in Hardware tab is probably total of (usage - return, here 0.400 kWh)
In addition to that, Domoticz computes some daily values, saving midnight's values and making difference with current ones.
What you see in widget is probably instantaneous (CONS - PROD, here 4776 Watt) and daily (usage - return, here -3.970 kWh)
The negative part (-3.970 kWh) could mean 2 things: you do produce energy (with solar panel for example, and have produced more than drain from grid), or USAGE and/or RETURN values are not correct (as this is the sum of what meter has seen since it's installed).