BLE sensor need to send information on water level. Normally it will only advertise every 5 seconds with a flag that is set when water level is Ok.
A central device receives advertising from many sensors, and operates a relay to start a pump (each sensor has a pump), according to the flag.
Once the relay starts, it need to response as fast as possible when water reached the needed level.
I can think of tow strategies to do it:
1. As soon as water level is reached, the sensor will start advertising very fast, then the central unit will connect, notify that relay has been turned off, and sensor retunes to slow advertising.
2. As soon as water level is low, the central unit connects to the sensor, lining to the change in state, when pump needs to turn off, it disconnects.
what is the probability that working option1 will miss the data in advertising? how can I calculate?
in option 2, what are the implication on power consumption (the pump can work for a long time, even 2 hours)? Does this approach guaranty a faster response then approach 1?
can anyone offer a better strategy?
Thanks
Johanan

