Rule1 ON SR04#value<150 DO power1 1 ENDON ON SR04#value>170 DO power1 0 ENDON
Rule1 1
This should work, I do suggest to keep the present and not present distances a bit a part, since the difference is going to be rather significant anyway. You could also add filters with a more complex rule so that a person walking under the sensor wouldn't trigger it. That I leave as an exercise to you:P The docs have lots of examples: https://tasmota.github.io/docs/Rules/
Yes working 100% (just need to slow the readings down, I think that is with Teleperiod, but I will have a look). Have tested it and it works well. as you said I think this is more stable than with the arduino software. I will go and install this in the garage tomorrow.
P.S. I have more of your software and drivers running on my HE than anything else.
Yes, and that would not affect the Presence Sensor update speed, so you can set it to whatever you want. Last I used a distance sensor with Tasmota was back with 7.x, Teleperiod did not limit the updates from that sensor back then, but I do think it does now. If not, ask again and I'll come up with something. It should work though.
No, those would not be right. So the sensor child device get constant updates, not just inside Tasmota? I will have a look later, not in front of the computer any more today.
looking more to limit false positives, like you said if someone walks under it i don't want it to trigger straight away, would like it to read maybe every 30 seconds. it does do a lot of logging as well, keeps saying switch is off, which I know you can turn off the logging.
No worries, you have have been a huge help, I will keep checking and see if I can find anything.
You can make a rule which doesn't trigger except for around the hight of your car, much more or less could be filtered.
You can also improve the rules to not update the switch state unless it actually changes. Most of what you're looking for are things that can be done with rules.
Looks like the Teleperiod limits the updates to HE, so that should work, I was watching the updates in the Tasmota GUI and that seems to update every 4 seconds. I will install it and then see if I need to change anything.
This looks like it worked
Rule1 ON Tele-SR04#distance<150 DO power1 1 ENDON ON Tele-SR04#distance>170 DO power1 0 ENDON