Design and Implementation of a Multi-Standard Event-Driven Energy Management System For Smart Buildings