Text this: A Multi-Period Mathematical Model to Optimize Smart Home Energy Management with Scheduling of Appliances and Solar Cell Cost Calculation