“Demand Response” energy management of thermal grids requires consideration of a wide range of factors at building and district level, supported by continuously calibrated simulation models that reflect real operation conditions. Moreover, cross-domain data interoperability between concepts used by the numerous hardware and software is essential, in terms of Terminology, Metadata, Meaning and Logic. This paper leverages domain ontology to map and align the semantic resources that underpin building and district energy management, with a focus on the optimization of a thermal grid informed by real-time energy demand. The intelligence of the system is derived from simulation-based optimization, informed by calibrated thermal models that predict the network’s energy demand to inform (near) real-time generation. The paper demonstrates that the use of semantics helps alleviate the endemic energy performance gap, as validated in a real district heating network where 36% reduction on operation cost and 43% reduction on CO2 emission were observed compared to baseline operational data.