We show how the Butler-Volmer and Nernst equations, as well as Peltier effects, are contained in the general equation for nonequilibrium reversible and irreversible coupling, GENERIC, with a unique definition of the overpotential. Linear flux-force relations are used to describe the transport in the homogeneous parts of the electrochemical system. For the electrode interface, we choose nonlinear flux-force relationships. We give the general thermodynamic basis for an example cell with oxygen electrodes and electrolyte from the solid oxide fuel cell. In the example cell, there are two activated chemical steps coupled also to thermal driving forces at the surface. The equilibrium exchange current density obtains contributions from both rate-limiting steps. The measured overpotential is identified at constant temperature and stationary states, in terms of the difference in electrochemical potential of products and reactants. Away from these conditions, new terms appear. The accompanying energy flux out of the surface, as well as the heat generation at the surface are formulated, adding to the general thermodynamic basis.