-
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
Using both Powerlow AND Powerdelta simultaniously #4905
Comments
From your logs it is working. If your power consumption is less than 10w, a mqtt is being sent (powerlow 10). Powerlow is powerlow to a value. May be you wanted power higher to 10w? |
May be what you want is something like in #2880 ?
|
It's because of PowerDelta. Any change of 10% will send a MQTT message. With Power toggling between 0 and some a 10% change is very likely. |
Hello Adrian, yes I would like the rule in #2880 BUT in combination with powerdelta. So if power>5w => powerdelta function (and teleperiod) to trigger mqtt message It doesn't work with the combination of powerlow & Powerdelta In the forum you said that a rule in combination with powerdelta doesn't work |
Maybe Powerdelta can be changed : |
Hi, I didn't say it won't work. I told you that if you duplicate behaviours with powerlow, powerhigh, powerdelta AND also the same with rules you will have a situation very difficult to debug. From your use-case:
seems to be better to use just rules to accomplish what you want. As Theo explained, powerdelta is a % of variation, so for low values it is very likely to sent mqtt messages very often. You have an example in rules to send mqtt messages when the value reaches a delta. Have you tried that? |
I suppose you mean https://github.com/arendst/Sonoff-Tasmota/wiki/Rules#8a-sending-the-value-of-a-sensor-to-mqtt-only-when-a-delta-is-reached |
Ok. No problem. Let me rewrite them for your use-case. I will post the modified example later. |
that really would be great. I'll be waiting anxiously.... |
From your use-case:
So, if power <5w, normal tasmota teleperiod. Nothing to add So, go to the Tasmota console and type:
|
thank you. This results in endless
(or endless powerdelta 1 for Power>5) So my guess was to set the ONCE-Parameter to ON Seems to work ! I will observe some time but I think this is solved now Thanks so much ! |
hehe, yes you are totally right. I wanted to put |
So, if your issue is solved, please close it. Thanks. 👍 |
One last question in this context: I am compiling binaries for each of my devices containing target device, wifi credentials ect. I would to include that rule as well. Can I write it in sonoff\my_user_config.h or elsewhere ? Thanks |
Sorry, rules must be written in the console, or by mqtt command or by http command. |
OK no problem Thanks ! |
There is one small issue remaing. The problem: When there is change in the condition (e.g. power goes up 0 from e.g. 15),
So the power increased to 15W .........BUT : No mqtt message with that power Only if I increase power a little bit higher to 21W, powerdelta 10 applies and I get If I had not increased the power further after the threshold crossing, the next MQTT that would have been sent out is the teleperiod mqtt message. Same thing happens when crossing the threshold from high to low power. Right now the rule only defines that the powerdelta command changes. Hope you understand what I mean.... |
I saw this thread and it is applicable to one of my automation scenarios. I'm seeing something similar. I posted this over on Discord but thought I'd share it here as it may shed light and document for posterity once this is understood/resolved. I'm not clear on what I'm looking to implement a variation of your scenario: My rule:
Note that I am using I want the rule to trigger only once for when Power<3 until Power>75 (and then only once) or until Power>2 (and then only once). So, I want it to trigger each time one of the triggers is met, but only once until one of the other conditions occur to trigger the rule. Is this what The rule seems to trigger (each time) when Power<3 threshold is crossed (
However, when power was greater than 2 (e.g., Regards, Mike |
when you type rule in the console you see something like this =>
You see Once = ON. This means if the condition is fullfilled, the corresponding powerdelta command applies and you get a MQTT message about that like
If ONCE is set to ON using the command rule 5, said last message will be sent out only once. |
That's how I understand it too. But what seems to be happening is that the only thing that's happening once is the first trigger in the rule. The other commands never get triggered even though the ON condition is met. So, Hopefully Adrian can shed some light on my problem and the one you posted. Mike |
I don't know if once=ON applies to all conditions or only the 1st condition in your rule. I googled a little bit and found #4477 and #4500 Some ideas :
These are just some thoughts but to be honest, I am not very familiar with rules and have problems to understand the syntax in particular with complicated conditions and nested loops. Maybe it would be helpful to have some comparison table with 1st column syntax in C and 2nd column tasmota rule syntax ... |
Yes, these were the topics I'd followed when Adrian was in the process of adding the new feature several weeks ago. That is the only place where it is currently documented. When I get some time I'll grab Adrian's comments from the topics and move them to the wiki. I just wanted to make sure that BREAK is here to stay before I do.
Right, I'm not completely clear on As to using @ascillato - thoughts? Mike |
What is happening is that Tasmota triggers the rule when you reach ENERGY#POWER>3 and then powerdelta is executed 50ms later. So, the powerdelta will start from the actual ENERGY#POWER value when it was executed.
Yes, with a Another option is to call the
|
@ascillato2 : I tried that. When I cross the threshold from low power to high power it works :
Now, when crossing the threshold from high power to a low power, I also get MQTT message but that message does not contain the power value. See here what happens when switch is ON and I turn off the load (15W=>0W)
That message does not contain the power value. |
|
thank you. Now I get the sensor metrics as expected when going from low Power to high Power. I use |
Even another option is to call the teleperiod :
|
goooooooooooooooooooooooooooool !!! Yes. You made it. Works perfectly ! Thanks so much |
Great 😄 👍 |
There's my new TASMOTA thing learned for today! |
Make sure these boxes are checked [x] before submitting your issue - Thank you!
status 0
:(Please, remember to close the issue when the problem has been addressed)
It seems the combination of powerlow and powerdelta does not work.
I want to setup the following configuration with a Blitzwolf SHP2 / SHP6 wifi power measing plug
teleperiod 300 => send regularly a MQTT message => that works
powerdelta 10 => send a MQTT anytime measured power has increased/decreased by 10% => that works too (tested with variable load - soldering iron)
powerlow 10 => no MQTT messages if measured power is less than 10W => NOT WORKING
The problem I have is that if the device is ON and power is zero, i.e. 0W or next to that value (<1W) the server is sending out MQTT
messages every few seconds and I do not really understand why.
I turned (rules off) AND (powerdelta 10) AND (powerlow 10).
Powerdelta works, but powerlow doesn't. It should work in combination.
Below you see now that I turned rules (rule1) off and set powerlow 10 and powerdelta 10.
A workaround could be to set up a tasmota rule. Maybe. I also tried that and couldn't get it working.
But mainly, I think that powerdelta and powerlow should work together the same time.
Or am I doing something wrong here ??
In the webinterface I see a power of 0 ... to .... 0.3W. And in the console you can see all the unwanted messages :
and so on and on, MQTT messages are fired every few seconds.
The text was updated successfully, but these errors were encountered: