In this article, an algorithm for automatic control of energy sources was developed to improve the uninterrupted power supply of mobile communication base stations. Base Transceiver Station (BTS) shelters, especially those in remote or off-grid locations, demand consistent, uninterrupted energy. Power fluctuations or outages directly impact network uptime, leading to service disruptions. Practice shows that the existing energy supply sources - the power grid, diesel generators and batteries - do not allow for effective operation in. This article outlines a replicable energy storage architecture designed for communication base stations, supported by a real deployment case, and highlights key technical principles that ensure uptime and long service life.