Calculated energy consumption off?
Moderator: leecollings
-
olleman
- Posts: 107
- Joined: Thursday 01 January 2015 18:56
- Target OS: Linux
- Domoticz version:
- Contact:
Calculated energy consumption off?
Hello!
I have a power meter on my boat and meassure charge and discharge in two different uility devices. This is how the graph for discharge looks right now. The maximum consumption is 280w and minimum 220w. So how can domoticz calculate it to be 354Wh per hour?
I use the input data to feed an electric counter in domoticz as well and this counter gets it right with about 240wh per hour. Any ideas?
I have a power meter on my boat and meassure charge and discharge in two different uility devices. This is how the graph for discharge looks right now. The maximum consumption is 280w and minimum 220w. So how can domoticz calculate it to be 354Wh per hour?
I use the input data to feed an electric counter in domoticz as well and this counter gets it right with about 240wh per hour. Any ideas?
- waltervl
- Posts: 6683
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2025.1
- Location: NL
- Contact:
Re: Calculated energy consumption off?
How do you measure the power usage (220-280Watt)? Script or plugin or http json updates? What data is send to Domoticz? What type and subtype of Energy device is used (from setup - device list)?
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
-
olleman
- Posts: 107
- Joined: Thursday 01 January 2015 18:56
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Calculated energy consumption off?
Thanks for answering!
I meassure with an INA219 sensor and wemos d1 mini running espeasy. Using rules in espeasy I update the power measured every 10 seconds.
The counter that I use as a control uses the exact same data and is being updated via a script in domotics every time the energy meter gets an update.
The energy meter is an electric (instant + counter) with subtype "usage".
Look at my first graph, doesn't it look peculiar just by looking at it? All power readings are between 220-280. It's not possible to get more than 280wh per hour but still it's being calculated to more than 300wh.
I meassure with an INA219 sensor and wemos d1 mini running espeasy. Using rules in espeasy I update the power measured every 10 seconds.
The counter that I use as a control uses the exact same data and is being updated via a script in domotics every time the energy meter gets an update.
The energy meter is an electric (instant + counter) with subtype "usage".
Look at my first graph, doesn't it look peculiar just by looking at it? All power readings are between 220-280. It's not possible to get more than 280wh per hour but still it's being calculated to more than 300wh.
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Calculated energy consumption off?
What do you see when you enter below http calls from your browser address bar?olleman wrote: Wednesday 28 April 2021 21:00 Look at my first graph, doesn't it look peculiar just by looking at it? All power readings are between 220-280. It's not possible to get more than 280wh per hour but still it's being calculated to more than 300wh.
Code: Select all
http://<>domoticz ip:domoticz port>/json.htm?type=graph&sensor=counter&range=day&method=1&idx=<idx>
http://<>domoticz ip:domoticz port>/json.htm?type=devices&rid=<idx>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
- waltervl
- Posts: 6683
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2025.1
- Location: NL
- Contact:
Re: Calculated energy consumption off?
And when you edit the device can you switch Energy Read between from device and computed? And what is it's setting now?
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
-
olleman
- Posts: 107
- Joined: Thursday 01 January 2015 18:56
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Calculated energy consumption off?
The output for the first one consists of a lot of "220" values and a few "280" and of course the sums of every hour at about ~340wh per hour.waaren wrote: Wednesday 28 April 2021 21:42What do you see when you enter below http calls from your browser address bar?olleman wrote: Wednesday 28 April 2021 21:00 Look at my first graph, doesn't it look peculiar just by looking at it? All power readings are between 220-280. It's not possible to get more than 280wh per hour but still it's being calculated to more than 300wh.Code: Select all
http://<>domoticz ip:domoticz port>/json.htm?type=graph&sensor=counter&range=day&method=1&idx=<idx> http://<>domoticz ip:domoticz port>/json.htm?type=devices&rid=<idx>
The second one gives me this output:
Code: Select all
{
"ActTime" : 1619688711,
"AstrTwilightEnd" : "00:00",
"AstrTwilightStart" : "00:00",
"CivTwilightEnd" : "21:46",
"CivTwilightStart" : "04:29",
"DayLength" : "15:38",
"NautTwilightEnd" : "22:57",
"NautTwilightStart" : "03:18",
"ServerTime" : "2021-04-29 11:31:51",
"SunAtSouth" : "13:08",
"Sunrise" : "05:18",
"Sunset" : "20:57",
"app_version" : "2021.1",
"result" :
[
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 0,
"Data" : "0, 220.00",
"Description" : "",
"EnergyMeterMode" : "1",
"Favorite" : 1,
"HardwareDisabled" : false,
"HardwareID" : 2,
"HardwareName" : "Rpi3",
"HardwareType" : "Dummy (Does nothing, use for virtual switches only)",
"HardwareTypeVal" : 15,
"ID" : "00082013",
"LastUpdate" : "2021-04-29 11:31:51",
"Name" : "Batterif\u00f6rbrukning",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" :
[
0
],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : "-",
"SubType" : "kWh",
"SwitchTypeVal" : 0,
"Timers" : "false",
"Type" : "General",
"TypeImg" : "current",
"Unit" : 1,
"Used" : 1,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "13"
}
],
"status" : "OK",
"title" : "Devices"
}
}
Last edited by olleman on Thursday 29 April 2021 11:33, edited 3 times in total.
-
olleman
- Posts: 107
- Joined: Thursday 01 January 2015 18:56
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Calculated energy consumption off?
It's set at "computed now" since my device only send the current power usage 6 times each minute.waltervl wrote: Wednesday 28 April 2021 22:59 And when you edit the device can you switch Energy Read between from device and computed? And what is it's setting now?
I tried setting it to "device". The log stays the same but I'm not getting any numbers at all from the device now. Even after I changed it back to "computed" the device still doesn't show any reading!? Any idea how to get it back
Last edited by olleman on Thursday 29 April 2021 11:40, edited 1 time in total.
-
olleman
- Posts: 107
- Joined: Thursday 01 January 2015 18:56
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Calculated energy consumption off?
Here's the complete output with the data from the sensor.
- Attachments
-
- energy.txt
- (54.93 KiB) Downloaded 76 times
- waltervl
- Posts: 6683
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2025.1
- Location: NL
- Contact:
Re: Calculated energy consumption off?
Oops, I did not want to break something. "Computed" seemed to be the right setting in your case. Device is only needed when the device is sending the usage on its own. Seems indeed that in your case the compute function is not computing right.olleman wrote: Thursday 29 April 2021 8:21 It's set at "computed now" since my device only send the current power usage 6 times each minute.
I tried setting it to "device". The log stays the same but I'm not getting any numbers at all from the device now. Even after I changed it back to "computed" the device still doesn't show any reading!? Any idea how to get it back?
Do you see any reading in device list? Perhaps CtrL-F5 on the page with the empty device widget?
Anything in the log file for this device?
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
-
olleman
- Posts: 107
- Joined: Thursday 01 January 2015 18:56
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Calculated energy consumption off?
Refresh with CTRL-F5 or even trying in incognito mode doesn't solve the problem. Under devices it seems "stuck" it's showing new updates with new values all the time but the value is always "280" which can't be right. almost 9/10 readings are 220 so something happened here...perhaps the database got corrupt for this particular device? It's not the end of the world, I can always make a new device but it's always nice to find the solutionwaltervl wrote: Thursday 29 April 2021 16:14Oops, I did not want to break something. "Computed" seemed to be the right setting in your case. Device is only needed when the device is sending the usage on its own. Seems indeed that in your case the compute function is not computing right.olleman wrote: Thursday 29 April 2021 8:21 It's set at "computed now" since my device only send the current power usage 6 times each minute.
I tried setting it to "device". The log stays the same but I'm not getting any numbers at all from the device now. Even after I changed it back to "computed" the device still doesn't show any reading!? Any idea how to get it back?
Do you see any reading in device list? Perhaps CtrL-F5 on the page with the empty device widget?
Anything in the log file for this device?
So now I've got two problems it seems
-
olleman
- Posts: 107
- Joined: Thursday 01 January 2015 18:56
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Calculated energy consumption off?
hm...problem solved.
I had to recreate the sensor to get rid of the problem with it not updating at all. And guess what!? It now calculates correctly. Not only that, recreating another sensor I have for total battery consumption now allows for negative values. I guess I created these sensors a couple of years ago and things have changed since then, but only for newly created sensors!
I had to recreate the sensor to get rid of the problem with it not updating at all. And guess what!? It now calculates correctly. Not only that, recreating another sensor I have for total battery consumption now allows for negative values. I guess I created these sensors a couple of years ago and things have changed since then, but only for newly created sensors!
- waltervl
- Posts: 6683
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2025.1
- Location: NL
- Contact:
Re: Calculated energy consumption off?
Ok, well glad it was solved..
you know there is a replace function so you can copy the history data if the old in the new device if needed?
you know there is a replace function so you can copy the history data if the old in the new device if needed?
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
-
olleman
- Posts: 107
- Joined: Thursday 01 January 2015 18:56
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Calculated energy consumption off?
Yes, but the problem persisted when I used that function so I used brand new ones.waltervl wrote: Friday 30 April 2021 18:29 Ok, well glad it was solved..
you know there is a replace function so you can copy the history data if the old in the new device if needed?
Who is online
Users browsing this forum: No registered users and 1 guest