With rapid advances in sensing and digital technologies, cyber-physical systems are regarded as the most prominent platforms to improve building design and management. Researchers investigated the possibility of integrating energy management system with cyber-physical systems as energy-cyber-physical systems to promote building energy management. However, minimizing energy consumption while fulfilling building functions for energy-cyber-physical systems is challenging due to the dynamics of building occupants. As occupant behavior is one major source of uncertainties for energy management, ignoring it often results in energy wastes caused by overheating and overcooling as well as discomfort due to insufficient thermal and ventilation services. To mitigate such uncertainties, this study proposed an occupancy linked energy-cyber-physical system that incorporates WiFi probe-based occupancy detection. The proposed framework utilized ensemble classification algorithms to extract three types of occupancy information. It creates a data interface to link energy management system and cyber-physical systems and allows automated occupancy detection and interpretation through assembling multiple weak classifiers for WiFi signals. A validation experiment in a large office room was conducted to examine the performance of the proposed occupancy linked energy-cyber-physical systems. The experiment and simulation results suggest that, with a proper classifier and occupancy type, the proposed model can potentially save about 26.4% of energy consumption from the cooling and ventilation demands.