There are a few off-the-shelf products out there that does leak detection. I did the DIY version though and I use it also for my aquarium.
I have 2 filters and 2 banks for lights connected to a zwave strip. The lights are on a schedule but not the filters. I do use a minimote for the filter so I can turn it off and automatically turn it back on after 10 minutes when feeding