-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PowerDelta 1xx is missing changes that (even) WebUI gets #7515
Comments
Which device are you using? Please, can you complete the template. Please share status 0 output and the console output when this behavior happens. Remember to set weblog to 4 for that. |
Sorry, I will expand it when I come home. For the time being you may have a look at my edit regarding the to/from 0 Problem. |
For the to/from 0 not getting caught it should be enough to move the "min_power > 0" condition in these lines here to only affect the <101 condition part... to fix the fix. That's like 1 Minute of coding, but I don't know how to create a prober pull request.. like just enclosuring the '(delta * 100) / min_power)' part with a 'if(min_power>0) else false' part.. Tasmota/tasmota/xdrv_03_energy.ino Line 296 in 8aa9109
|
See #7509 (comment) for some background information. Your reference to delta is wrong. The goal of PowerDelta is measuring power difference not absolute power. So delta must contain a value representing the power from three seconds ago related to the current power. If it is equal there is no PowerDelta. Your low power measurements are also at the bottom of what your cheap hardware can measure. Expect no valid data below 5W. To measure power changes the code compares a sample from three seconds ago to the current value and acts accordingly. If you change loads within this time do not expect intermediate results. Decent results for a 20W load are:
|
Thank you for your time and the detailed answer. But sadly It doesn't satisfy me at all :( Also, why must it contain a value from three seconds ago? Why not just doing the delta maths everytime also the webui gets new values? (On a side note: Three seconds? Why am I getting much faster messages from PowerDelta than (see below))
=> I am also using this for a master thesis for one of my students I am currently in charge of.. this circuitry is designed around low loads.. But still for most of my plugs all I want is not to miss it going down or coming up from zero.
=> How does it come then, that my Gosund SP112 flashed with the latest stock 8.1 tasmota is reporting up to 4 values per second (only using PowerDelta 102 command) and so catches the peak of the fridge turning on every time perfectly? 2020-01-16 16:20:13 | 2
|
Ah regarding 0 I see the issue. Will look into it. My devices almost never return to 0 so I didn't see it. Now it makes sense. |
Thank you so much - I was starting do despair ;-) Of course I thought about work arounds like PowerLow/high commands or getting the data from the energylogs (which of course would be more precise anyway but also can have downsides) but they seemed so unnecessary as there was no reason for the PoweDelta >100 command to exclude 0 ;-)
|
Fix PowerDelta calculation not detecting zero power (#7515)
Hi, This issue has been fixed in the actual codebase. Please, can you test latest changes? |
PROBLEM DESCRIPTION
A clear and concise description of what the problem is.
It seems that the PowerDelta function uses its own but inferior Energy.power_history or gets triggered less often. I haven't searched the whole Code yet.
But this should be enough to clarify:
I put on a dynamic load.
I observe the values in the WebUI.. I see e. g.
starting at 0
7 W
15 W
13 W
3 W
0
I have PowerDelta set so 102 before. So it should fire on every 2 Watt change. But in the console log I will only find
15
3
Shouldn't PowerDelta be at least as good as the WebUI? In this case the 13 W was missing but also coming or going to 0 is always missing.
Regarding the no values coming/going from/to 0 caught by PowerDelta 1xx.. this may be caused by the divide by 0 "fix".
This fix is only needed for percentual <=100 Power Delta commands as far as I found it in the code here
Tasmota/tasmota/xdrv_03_energy.ino
Line 296 in 8aa9109
As we only need to divice through min_power for that case..
REQUESTED INFORMATION
Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!
Backlog Template; Module; GPIO 255
:Backlog Rule1; Rule2; Rule3
:Status 0
:(Please use
weblog 4
for more debug information)TO REPRODUCE
Steps to reproduce the behavior:
EXPECTED BEHAVIOUR
A clear and concise description of what you expected to happen.
SCREENSHOTS
If applicable, add screenshots to help explain your problem.
ADDITIONAL CONTEXT
Add any other context about the problem here.
(Please, remember to close the issue when the problem has been addressed)
The text was updated successfully, but these errors were encountered: