Abstract Integrating electric technologies such as photovoltaics (PV), energy storage, heat pumps, and electric vehicle (EV) charging systems is pivotal for increasing energy independence and reducing emissions in buildings. This study explores the combination of these technologies through a system in Lianyungang, China, to enhance social and economic benefits. The experimental system was monitored during the heating season 2023–2024. Through system simulations with TRNSYS and optimizations, the system configurations were developed considering peak and off-peak electricity pricing schemes, inverter and battery operation logic, equipment efficiency, and load changes. The results show that the PV system is able to satisfy much of the building’s energy needs, with a self-sufficiency rate exceeding 85%. The most cost-effective setup involves three energy storage batteries (totaling 15 kWh) and 20 PV panels (11 kWp total capacity), reducing the payback period to under five years and providing new insight for cost-effective sustainable energy solutions.