This paper presents a forecasting method of the electricity consumption and production in a household equipped with photovoltaic panels and a smart energy management system. The prediction is performed with a Long Short-Term Memory recurrent neural network. The datasets collected during five months in a household are used for the evaluations. The recurrent neural network is configured optimally to reduce the forecasting errors. The results show that the proposed method outperforms an earlier developed Multi-Layer Perceptron, as well as the Autoregressive Integrated Moving Average statistical forecasting algorithm.