Energy recovery by thermoelectric elements