Negative energy in graphs

Moderator: leecollings

Post Reply
eelco
Posts: 6
Joined: Thursday 23 September 2021 19:18
Target OS: Linux
Domoticz version:
Contact:

Negative energy in graphs

Post by eelco »

Hi,

I'm using an electric dummy sensor to input APSystems solar collector data, but it reports negative energy during the day transition.

I'm not adding any event during that time, as there is no Sun and hence no solar data. This is an export of the graph from Domoticz:

Code: Select all

DateTime	Energie opgewekt	Vermogen gegenereerd
03/10/2022 19:50		6
03/10/2022 19:55		6
03/10/2022 20:00		6
03/10/2022 20:05		6
03/10/2022 20:10		6
03/10/2022 20:15		6
04/10/2022 00:00	-2491	0
04/10/2022 07:00	1	
04/10/2022 07:45		6
04/10/2022 07:50		6
04/10/2022 07:55		7
04/10/2022 08:00	30	7
04/10/2022 08:05		10
04/10/2022 08:10		11
04/10/2022 08:15		11
This is the corresponding input through HTTP:

Code: Select all

2022-10-04T05:40:32.418003556Z [EVENT]: Power 6 Watt, total energy 0.000000 kWh
2022-10-04T05:44:31.749057208Z [EVENT]: Power 6 Watt, total energy 0.000574 kWh
2022-10-04T05:49:32.339842090Z [EVENT]: Power 6 Watt, total energy 0.001182 kWh
2022-10-04T05:54:31.621538079Z [EVENT]: Power 7 Watt, total energy 0.001816 kWh
2022-10-04T05:59:32.221796126Z [EVENT]: Power 7 Watt, total energy 0.002464 kWh
2022-10-04T06:04:31.491929069Z [EVENT]: Power 10 Watt, total energy 0.003408 kWh
Any idea why Domoticz added this negative value at the day's start?

Does domoticz need the total Energy consumption over the time the sensor got added? If so is there a way to get this through the API so I can just add it?
willemd
Posts: 650
Joined: Saturday 21 September 2019 17:55
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.1
Location: The Netherlands
Contact:

Re: Negative energy in graphs

Post by willemd »

First an observation: it looks like you mixed up energy generated and power? Are you using a HTTP poller to import the data from the HTTP page? Then you need to modify the lua script to get the right data in the right field.

About the negative energy: I have experienced and reported some strange behaviour around midnight reset recently (for a gas device specifically), but also around counters where some data was lost or counterToday was not reset (check my posts). It seems most of these things are addressed in the new beta version. Maybe your issue is similar and also solved then?
eelco
Posts: 6
Joined: Thursday 23 September 2021 19:18
Target OS: Linux
Domoticz version:
Contact:

Re: Negative energy in graphs

Post by eelco »

Thanks, @willemd for your reply, but it turned out to be as I expected. It needs the total energy delivery since the instanciasion of the sensor. When I changed this, the problem was solved.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest