-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Feature request Sonoff POW: Send power reports when power changes more than a specified percentage #2157
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
Comments
Working on it... |
5.12.0e * Add command PowerDelta 0..100 (percentage) to Energy monitoring devices to report on active power load change (#2157)
Provided command PowerDelta <percentage> to latest pre-release. See Wiki > Commands for option usage. |
I'm now struggling with the definition 80%. Current release calculates the percentage by dividing the difference by max_power. This will send one report for coarse changes but small changes are unnoticed. I'm testing with dividing the difference by min_power. This works ok for fine changes but will send several reports with coarse power load changes... I'm in doubt what to release... EDIT: I'll keep current release. If more fine reporting is needed just decrease the default 80%. |
Hi Theo,
Thanks for your quick response and the great work so far!I think the implementation is like this:
Reports are send with 2 priorities:
- A big power change (user defined % in this case set to 80%) has a high priority.
- A small power change (user defined % in this case set to 15%) has a low priority.
The change is the change relative to the previous power measurement.
So if the previous measurement was 10 Watt and the current measurement is 11 Watt, the change is (11 W - 10 W) / 10 W = 0.1 = 10%
A high priority change is always send, so if the the power change from 100 W to 20 W -> -80% a report is send.
For low priority messages a bucket is used to decide if a message may be send. Every interval (in this case 30 seconds) the bucket is set to 5. Every time a low priority message is send, the bucket is decreased by 1. When the bucket is 0, no low priority message message will be send.The interval for setting the bucket to 5 is another interval than the periodic reporting interval.
When the power changes from 10W to 30W -> change -66% a report is send unless the low priority bucket is 0.
I hope this description helps.If you still struggle, please let me know.
Regards,
Eric
|
While rereading the above it's possibly better not to calculate the percentage of the change against the last value, but against the lowest value of the previous and the current power. I think the the formula for the change should be: = absolute value of ( - ) / minimum value of ( and * 100% I think this gives a better resolution. Otherwise a change from 20W to 100W will give a percentage of (100-20)/20100% = 400% It's possibly a good idea to also implement a bucket for high priority message, to protect against flooding reports.
|
Sorry, accidentally closed the issue. |
Other than reporting on power change I see no reason to discriminate in high or low percentage change. The home automation tool already monitors overall energy uses so the only advantage is the possibility to react on any major power change (percentage set with PowerDelta). Keep in mind that power measuring could take several seconds so reporting every 5 seconds is a no-go anyway. I'll need to fine tune current solution, that uses your last proposed solution already, for the pow and will come back here when done. |
The reason for discriminating high and low percentage is to protect agains flooding reports. |
For now I leave it as it is. I suggest you play with the percentage to get a functional environment. If you come across a life problem just let me know and show. |
Hi @epmsmid Now there are rules in Tasmota. Please, see if this new feature can solve your issue. Thanks! |
5.12.0e * Add command PowerDelta 0..100 (percentage) to Energy monitoring devices to report on active power load change (arendst#2157)
Updated PowerDelta code (arendst#2157)
Is it possible to add a feature to send a power report when the power usage changes more than a certain percentage? E.g. like the Fibaro Wallplug E/F?
From the usermanual page 13 and 15:

This way the reporting interval can higher and you can still respond to power changes.
The text was updated successfully, but these errors were encountered: