Residential energy monitoring and management based on fuzzy logic