IoT platform improving sustainability in smart cities and Industry 4.0