A novel power-to-X system, coupling electricity and gas grid in a building, is presented. This system operates a retrofit of the existing photovoltaic system, consuming the electricity overproduction in the local synthesis of methane instead of injecting it into the electricity grid. Methane can be stored in the gas grid and used in winter in the existing gas burners, providing the required heat to keep the building at a comfortable temperature. Additionally, the methanation system provides waste heat that is used to warm up the sanitary water, eliminating the need for an electric boiler. The system, fed by 800 m2 of solar panels, was optimized according to the weather conditions and the dimensions of the main pieces of equipment were determined. This allows the production of ca. 17 MW h of methane for seasonal storage. By retrofitting the building with the power-to-X unit, the energetic independence of the house is maximized, thanks to the synchronous production of electricity, gas, and heat, including energy storage. Therefore, the profitability of the photovoltaic system is ensured independently from the electricity feed-in tariffs. The system performance was evaluated in a case study in the north of Switzerland. When considering the purchase of renewable natural gas (i.e., from biogas), it was calculated that the system would be profitable for an electricity price below 0.05 € per kW h.