Costs calculated always using T1/R1

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
averter
Posts: 39
Joined: Thursday 24 February 2022 8:32
Target OS: Linux
Domoticz version: 2024.4
Contact:

Costs calculated always using T1/R1

Post by averter »

I have a dummy P1 smart mater device to monitor the energy that comes from/to the grid, which is updated using data from my solax inverter via a plugin.
Since I am using a high/low tariff, and the plugin was incorrectly sending all of the data to T1/R1 I have created a dzvents script to update the T2/R2 counters when in the low tariff time period (00:30-05:30).
I have checked the costs in the log of the device for the last night, and surprisingly, they seem to be calculated using the prices of T1/R1 instead of T2/R2.
These are my settings
Screenshot from 2024-11-25 06-33-09.png
Screenshot from 2024-11-25 06-33-09.png (51.52 KiB) Viewed 187 times
and this is the log of the P1 device
Screenshot from 2024-11-25 06-34-52.png
Screenshot from 2024-11-25 06-34-52.png (110.91 KiB) Viewed 187 times
where it is clear that the energy between 00:30 - 05:30 is in usage 2 but yet for a consumption of 2kWh at 1AM the costs are £0.25x2 = £0.5...
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Costs calculated always using T1/R1

Post by waltervl »

If you check the report page of this device the issue should be more clear as it shows T1/T2 usage and costs per day.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
averter
Posts: 39
Joined: Thursday 24 February 2022 8:32
Target OS: Linux
Domoticz version: 2024.4
Contact:

Re: Costs calculated always using T1/R1

Post by averter »

waltervl wrote: Monday 25 November 2024 8:58 If you check the report page of this device the issue should be more clear as it shows T1/T2 usage and costs per day.
Ahh, I was not aware that a daily display could be also reported: thanks! It's strange...by looking at the table below the costs for Monday should be 0.05+0.42-0.01=0.46, but the total in the last column is £1.25. So it seems that the T1/R1 vs T2/R2 is calculated correctly but the sum is incorrect. Also, for some reason the R1 counter is at zero... :shock:
Untitled.png
Untitled.png (49.25 KiB) Viewed 169 times
The above was in the morning. The below table is more recent and contains more energy exported. The numbers still don't add up 0.05+0.42−1.11=-£0.64 which is different than the shown -£0.58 although by a smaller margin... Any thoughts?
Screenshot from 2024-11-25 13-48-59.png
Screenshot from 2024-11-25 13-48-59.png (35.84 KiB) Viewed 169 times
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Costs calculated always using T1/R1

Post by waltervl »

As you are doing the split to Usage T1/T2 and Return T1/T2 yourself you have to check the database values in the Multimeter table to be sure.
Also let it run for a couple of days to check if the data is still valid. Every night at 12 the SQLIte database is cleaned up and P1 summary data is moved from Multimeter table to Multimeter_Calendar table.

As discussed in the Tariffs topic you perhaps better switch to dynamic pricing instead of T1/T2.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
averter
Posts: 39
Joined: Thursday 24 February 2022 8:32
Target OS: Linux
Domoticz version: 2024.4
Contact:

Re: Costs calculated always using T1/R1

Post by averter »

Ok, I'll keep monitoring what happens in the following days, and see if the situation improves.
Regarding dynamic pricing, indeed I could use it to obtain costing for T1 and T2, but I think that I should keep using my dzvents script to separate the energy in 1 vs 2 anyway so that:
  • R1 and R2 are also calculated correctly. Domoticz would still use the tabled price values in the settings for R1 and R2 to calculate the return correct?
  • I can also visualize how much energy (in kWh and percentage) I'm consuming from the grid in each tariff period.
averter
Posts: 39
Joined: Thursday 24 February 2022 8:32
Target OS: Linux
Domoticz version: 2024.4
Contact:

Re: Costs calculated always using T1/R1

Post by averter »

Similar issue today morning. There's a discrepancy of extra £0.63. Meanwhile yesterday gap narrowed down from £0.8 in the morning to -£0.02 at the end of day. It seems too large to be considered rounding errors.
Untitled2.png
Untitled2.png (31.32 KiB) Viewed 118 times
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest