Hi Vignesh
When you say dry running issue, are you saying you have a sump and you have some automation wherein the pump turns itself on even when there is no water in the sump?
Not sure if I understood this correctly.
Assuming you have a sump or a water storage in the ground floor and want to pump water automatically to your water tanks on the roof, there are water controller available for around 1500 which monitor the water levels at both your roof and your sump and automatically turn off and turn on based on requirements. No smart switches required. Mine is working well for more than 6 months and my in-laws have had this for more than 10 years now.
[URL unfurl="true"]https://www.amazon.in/gp/product/B07PMVY3FD/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1[/URL]
Even I wanted to use Alexa or Google home based smart switches for these....but couldnt figure out the logic. But the above works great.