Integration of IoT and Sensor Technology for Smart Energy Management in Buildings