A fuzzy-logic IoT lighting and shading control system for smart buildings