Energy management in smart spaces through the OPlatform