I´m using an ultrasonic sensor RCW-0001 to measure a water level in a tank. Sadly round about every 5th measuremt brings up a value that is not true and ~20% higher than the other other values. Tried to fix this without success so far. Now I thought of creating a rule in ESPEasy which checks the newest value in comparison to the last value and in case this step is higher than x% the value is skipped.
Can you please tell me if this is possible and how it can be done by a rule? So far I´m only using a rule to show the value on display and it is transferred via mqtt.
The measured value is transformed to show it in % and not in cm by the formula: (116-%value%)/(116-15)*100
Code: Select all
On HCSR04#distance do
7dn,[HCSR04#distance]
EndOn
Code: Select all
154955987: ULTRASONIC : TaskNr: 1 Distance: 94.79 cm
154955997: EVENT: HCSR04#Distance=21.00
154956004: ACT : 7dn,21
154956006: Command: 7dn
154956007: 7DGT : Show Number=21