Smart energy management of a prosumer for a better environment safeguard