Replies: 4 comments 10 replies
-
Try |
Beta Was this translation helpful? Give feedback.
-
Thanks for the inputs! Ok, so I have this rule:
So 800/10 = 80 (smaller than 200), then the rule should be triggered and output the publishing, right? It's not working for me! Here's the log output for rule1
The only time I see the output is when I enter the line for rule1.
Even if the sensor is not in water (4086) |
Beta Was this translation helpful? Give feedback.
-
Alright! Thanks to all of you, it works! This is the final rule.
I added ; rule1 1 to re-enable the rule instead of "rule1 4" This way, I only get on MQTT on detection. So far, with a few tests, the response time seems good for me, inside 1 second! VERY HAPPY! Thanks again |
Beta Was this translation helpful? Give feedback.
-
Ok so what works for me is this:
This gets me one message when wires touches the water, inside one second. If I get the wires out of the water, it seems to "reset" it and when I put the wires again in water, I get another message. So this works perfectly! Div10 seems to be more than a simple "mapping" of inputs to get in the 0...100 range but also a form of trigger. So if I understand this correctly, when using this format "ANALOG#A0div10", there will be a trigger if the input (0 to 4095 for ESP32 and 0 to 1023 on ESP8266) changes for more than 1%. Then, the output value will be mapped to a value from 0 to 100. Right ? |
Beta Was this translation helpful? Give feedback.
-
Hi all, been trying for 2 hours many combinations of rules, backlog to do this, but nothing works.
So my goal is to have a water level sensor. Pretty easy, +3.3V to a 1 Mohm resistor to wire1 and wire2 to ground. A0 is connected between the resistor and wire1. So when I put the 2 wires in water, A0 goes below 2000 in the analog reading.
I want to use this input to stop a pump ASAP, controlled through Home Assistant with MQTT messaging.
Teleperiod being a minimum of 10 seconds, is too slow for my use case.
So I'm trying to set up a rule that would trigger on
Rule1 ON Analog#a0<2000
Then the DO:
DO Publish stat/ESP32S3_T1/ALERT "Level1_On" ENDON
In my GREAT IGNORANCE! I'm assuming this would trigger as soon as A0 goes below 2000, but it does not work.
Any help would be appreciated.
Yes, I read example here and tried many variations with backlog also. https://tasmota.github.io/docs/Rules
Many thanks for any help!
Beta Was this translation helpful? Give feedback.
All reactions