Smart Energy Management of a Prosumer for a Better Environment Safeguard