Monitoring swimming pool water pump flow by measuring the actual power dissipation

For a pool filter pump located higher than the pool water level Homey is used to monitor the water flow. Indirectly by measuring the actual power dissipation of the pump: when pumping water the dissipated power is higher than when pumping air. The power is measured with a FritzDECT 200 mains switch and a simple flow is used to send a notification to a mobile phone when the dissipated power drops below the threshold value between ‘pumping air’ and ‘pumping water’.
This will also send one or two notifications when the pump is switched on and off, but if the notifications keep coming it’s an indication that something must be wrong.
Last week this prevented a small disaster: a rubber connection between a pipe and the solar heating mats at the roof had burst.
Thanks to the Homey notifications the pump could immediately be switched off remotely.
To make it more safe the flow will be enhanced to automatically switch off when the power is on but below the threshold for some period of time.