High temperature thermoelectric properties and energy transfer devices of Ca3Co4−xAgxO9 and Ca1−ySmyMnO3