There is a growing trend for engaging edge computing to help smart homes to improve the comfort of living for residents. The rapidly rising interest in such deployments, however, does not usually correspond with energy management schemes. In this thesis, we will propose a unified system framework for enabling a sustainable edge computing, while meeting the needs of data processing for smart home applications. Besides, we also designed an edge-based energy management framework for powering smart appliances at home, which aims to enable the use of renewable energy to greatly reduce energy costs for households. To make better use of renewable energy, a modified forecasting approach will be applied in both frameworks, to constantly forecast renewable energy generation. Furthermore, two optimal energy scheduling algorithms for edge devices and one job scheduling algorithm for appliance jobs are also proposed in this thesis. By employing advanced energy disaggregation technique in the edge-based energy management framework, usage pattern and users preference on each appliance can be derived, and thus, each appliance job can be rescheduled based on this information. To evaluate the performance of two edge computing paradigms, two prototype systems have been implemented by using low-cost and easy-to-get hardware. The experiment results demonstrate that renewable energy is completely capable of supporting the reliable running of edge computing devices and smart appliances, and the utilisation of renewable energy increased significantly when our proposed frameworks were employed, compared with when they were not.