Cavity pumps and smart water systems