Water and energy conservation in distribution of water using the Internet of Things