An Optimal and Learning-Based Demand Response and Home Energy Management System | Synapse