This work tackles the scheduling challenge of microgrids for smart homes, aiming to optimize energy management with both renewable and non-renewable sources. A power control center orchestrates the microgrid, coordinating distributed energy resources (DERs) for peak demand fulfillment and excess energy utilization. We propose a proportional-integral control system for efficient demand response, achieving reduced post-scheduling costs and a peak-to-average ratio. Comparative analysis reveals Ant Colony Optimization outperforms Binary Particle Swarm Optimization in cost and peak-to-average ratio reduction. Simulations explore two scenarios: Case 1 integrates with the main grid for reliability, while Case 2 utilizes solely renewable energy sources. Although Case 2 exhibits superior performance, Case 1’s dependence on the main grid offers greater real-world feasibility. Therefore, Case 1 with optimized DER scheduling emerges as the recommended solution for enhancing microgrid efficiency and ensuring reliable power supply in smart homes.