Operation of a sensor node of a wireless sensor network with energy harvesting is described by the single-server queue. Customers and energy units arrive according to the Markov arrival processes (MAP) and are stored in the corresponding buffers. Service of a customer is possible only in presence of an energy unit. In contrast to previously investigated in the literature models, we assume that, besides the use of one energy unit for service of any customer, one more unit is expended at the moment of a customer arrival if the customer is accepted to the system. To optimize operation of the system, a parametric strategy of admission control is used. The goal of control is to minimize the risk of the server starvation in case of too strict control and the risk of wasting the energy due to acceptance of too many customers that finally will not receive a service (due to the lack of energy or impatience) in case of too liberal control. Under the fixed value of control parameter, the behavior of the system is described by the six-dimensional Markov chain. The generator of this Markov chain is obtained. Expressions for computation of the key performance indicators of the system are presented. Numerical results illustrating the effectiveness of the proposed control strategy are presented. © 2020, Springer Nature Switzerland AG.