Intelligent middleware infraestructure aids automated demand response.