Building smart energy services with IoT