P1 device: Return costs use T1 instead of R1 tarrif and total costs are not set to zero at midnight.
Moderators: leecollings, remb0
Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.
Use the following template when posting here:
Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....
If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly
If you are replying, please do not quote images/code from the first post
Please mark your topic as Solved when the problem is solved.
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.
Use the following template when posting here:
Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....
If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly
If you are replying, please do not quote images/code from the first post
Please mark your topic as Solved when the problem is solved.
- imautohuttraeger
- Posts: 393
- Joined: Saturday 14 March 2020 13:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Germany
- Contact:
P1 device: Return costs use T1 instead of R1 tarrif and total costs are not set to zero at midnight.
I have a P1 device that gets the data via a dzvents script. It is working correctly apart from the cost calculation:
1st issue: At midnight, counters for usage and return are correctly set to zero, but the total costs are not.
2nd issue: Return costs should calculate with R1 tarrif, but they take T1 tarrif.
For ease of testing, I have set
Costs T1 = 2 €
Costs R1 = 1 €
Note: Right now, thanks to the solar battery, I’m almost 100% self-sufficient and only have return.
At first I have only detected this when I looked at the grid bubble of the energy dashboard, so I posted it in the respective thread.
viewtopic.php?p=334641#p334641
@waltervl kindly helped me there to identify this as a P1 problem.
Any idea what's behind that?
1st issue: At midnight, counters for usage and return are correctly set to zero, but the total costs are not.
2nd issue: Return costs should calculate with R1 tarrif, but they take T1 tarrif.
For ease of testing, I have set
Costs T1 = 2 €
Costs R1 = 1 €
Note: Right now, thanks to the solar battery, I’m almost 100% self-sufficient and only have return.
At first I have only detected this when I looked at the grid bubble of the energy dashboard, so I posted it in the respective thread.
viewtopic.php?p=334641#p334641
@waltervl kindly helped me there to identify this as a P1 problem.
Any idea what's behind that?
- Attachments
-
- aScreenshot_20260709-035246.jpg (66.46 KiB) Viewed 2014 times
-
- bScreenshot_20260709-035819.jpg (124.99 KiB) Viewed 2014 times
-
- cScreenshot_20260709-040620~2.jpg (178.73 KiB) Viewed 2014 times
Stop, look and listen.
- waltervl
- Posts: 7012
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2026.3
- Location: NL
- Contact:
Re: P1 device: Return costs use T1 instead of R1 tarrif and total costs are not set to zero at midnight.
Did you set the P1 cost calculation in the (Dynamic) price calculation section to High/Low? As that seems to be needed.
Then wait a day as it will only be used after activation. Calculations in the past will not be updated to the new setting.
Then wait a day as it will only be used after activation. Calculations in the past will not be updated to the new setting.
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
- imautohuttraeger
- Posts: 393
- Joined: Saturday 14 March 2020 13:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Germany
- Contact:
Re: P1 device: Return costs use T1 instead of R1 tarrif and total costs are not set to zero at midnight.
Yes, I did. However, let's wait another 24 hours. But I doubt that it can be the full solution, because this does not seem to be solving the fact that return kWh are calculated by the tarrif for usage.
Stop, look and listen.
- imautohuttraeger
- Posts: 393
- Joined: Saturday 14 March 2020 13:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Germany
- Contact:
Re: P1 device: Return costs use T1 instead of R1 tarrif and total costs are not set to zero at midnight.
Minimum 24 hours have passed by with "high / low" in the settings for "P1 Electricity report display". It is showing the same result as "dynamic": Costs are not set to zero at midnight. So it doesn't matter which option I choose.
And T1 instead of R1 tarrif is still used for returned Energy.
I think as a next step, I will create a separate P1 device and look, if it has the same behaviour.
And T1 instead of R1 tarrif is still used for returned Energy.
I think as a next step, I will create a separate P1 device and look, if it has the same behaviour.
Stop, look and listen.
- imautohuttraeger
- Posts: 393
- Joined: Saturday 14 March 2020 13:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Germany
- Contact:
Re: P1 device: Return costs use T1 instead of R1 tarrif and total costs are not set to zero at midnight.
Now I have created a new virtual P1 device (dummy hardware) for testing. Result is the same: Return energy takes T1 tariff for usage energy to calculate the costs. Should be R1. So it is not caused by the particular device. Can easily been seen on the energy dashboard or the energy widget. And the daily costs are not set to zero at midnight.imautohuttraeger wrote: Saturday 11 July 2026 0:08 [...]
I think as a next step, I will create a separate P1 device and look, if it has the same behaviour.
Seems that I am the only one with this problem. Is the calculation of the grid costs really correct for everyone else than me?
Stop, look and listen.
- waltervl
- Posts: 7012
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2026.3
- Location: NL
- Contact:
Re: P1 device: Return costs use T1 instead of R1 tarrif and total costs are not set to zero at midnight.
I think the most people have the same T1 and R1 tariff at the moment and no T2/R2 tarif anymore so it is not obvious.
In the Netherlands next year the T1 and R1 tariffs will differ so then your issue will become more obvious for the rest....
I will try to reproduce this soon.
In the Netherlands next year the T1 and R1 tariffs will differ so then your issue will become more obvious for the rest....
I will try to reproduce this soon.
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
- imautohuttraeger
- Posts: 393
- Joined: Saturday 14 March 2020 13:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Germany
- Contact:
Re: P1 device: Return costs use T1 instead of R1 tarrif and total costs are not set to zero at midnight.
Ah - I understand. That might explain why this is not detected by other people, yet.
Interesting to know, that - at least for the time being - the re-payment situation for returned energy is so extremely fair in the Netherlands. Here in Germany it is not, unfortunately.
Interesting to know, that - at least for the time being - the re-payment situation for returned energy is so extremely fair in the Netherlands. Here in Germany it is not, unfortunately.
Stop, look and listen.
- imautohuttraeger
- Posts: 393
- Joined: Saturday 14 March 2020 13:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Germany
- Contact:
Re: P1 device: Return costs use T1 instead of R1 tarrif and total costs are not set to zero at midnight.
Update:
With the help of Claude AI I could solve one of the two issues:
The script for delivering data to my virtual P1 device is amended in a way, that the costs are now set to zero at midnight. I guess this is not necessary when you have a real P1 connection to a hardware electric meter, because the daily costs are set to zero automatically.
However, the 2nd issue (payback for return energy is calculated with T1 tarrif rather than R1) still exists. I think this is independent of the way the P1 device receives the data (by hardware data cable or by script).
With the help of Claude AI I could solve one of the two issues:
The script for delivering data to my virtual P1 device is amended in a way, that the costs are now set to zero at midnight. I guess this is not necessary when you have a real P1 connection to a hardware electric meter, because the daily costs are set to zero automatically.
However, the 2nd issue (payback for return energy is calculated with T1 tarrif rather than R1) still exists. I think this is independent of the way the P1 device receives the data (by hardware data cable or by script).
Stop, look and listen.
- imautohuttraeger
- Posts: 393
- Joined: Saturday 14 March 2020 13:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Germany
- Contact:
- waltervl
- Posts: 7012
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2026.3
- Location: NL
- Contact:
Re: P1 device: Return costs use T1 instead of R1 tarrif and total costs are not set to zero at midnight.
Just to confirm I see the same issue in my test environment and reacted to the GitHub issue.
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
- imautohuttraeger
- Posts: 393
- Joined: Saturday 14 March 2020 13:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Germany
- Contact:
Re: P1 device: Return costs use T1 instead of R1 tarrif and total costs are not set to zero at midnight.
.....
Stop, look and listen.
- waltervl
- Posts: 7012
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2026.3
- Location: NL
- Contact:
Re: P1 device: Return costs use T1 instead of R1 tarrif and total costs are not set to zero at midnight.
Issue has been fixed by Gizmocuz in the next beta release!
One note: on updating to beta or the next stable release all costs in history will be recalculated with the tariffs as set in the settings. So first be sure you have the right tariff, then update
One note: on updating to beta or the next stable release all costs in history will be recalculated with the tariffs as set in the settings. So first be sure you have the right tariff, then update
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
- imautohuttraeger
- Posts: 393
- Joined: Saturday 14 March 2020 13:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Germany
- Contact:
Re: P1 device: Return costs use T1 instead of R1 tarrif and total costs are not set to zero at midnight.
Does it mean, that the historic figures will always be calculated by the actual prices although the old prices where different?
Or is this re-calculation only made once because of the first update after the fix?
Or is this re-calculation only made once because of the first update after the fix?
Stop, look and listen.
- waltervl
- Posts: 7012
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2026.3
- Location: NL
- Contact:
Re: P1 device: Return costs use T1 instead of R1 tarrif and total costs are not set to zero at midnight.
Recalculation of total price will only be done on update of Domoticz. After that the normal new calculation will be done.imautohuttraeger wrote: Sunday 19 July 2026 10:46 Does it mean, that the historic figures will always be calculated by the actual prices although the old prices where different?
Or is this re-calculation only made once because of the first update after the fix?
The current and future history reports also only store the total price so differentiated T1/T2/R1/R2 prices are calculated from the latest tariffs.
So when you change the tariffs in the future the total price will always be correct based on history tariffs but the differentiated history prices will be calculated on the current tariffs. So there could be a gap....
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