An IoT-ready solution for automated recognition of water contaminants