There are some projects to start bring FOSS ideas/ideals to building system controls and decision making like this, but I think there are significant difficulties in the variety of proprietary systems and reluctance to change due to capital costs and/or maintenance contracts.
https://github.com/VOLTTRON/volttron from Pacific Northwest National Lab is one example.