A SCADA system for energy management in intelligent buildings