An MIT study from 2006 estimated there's about 13 000 Zettajoules of Geothermal energy in the Earth.
That was before we discovered with recent instruments that the core is actually hotter... which might imply an even bigger number than 13 000 Zettajoules.
At any rate, that same study indicated that we had the technology in 2006 to tap into 200 Zettajoules of power, with the ability to expand to 2000 Zettajoules in the future with enhancements to the technology in question.
Human civilization currently uses about 0.5 Zettajoules (but estimating that 1 third of Humanity doesn't have electricity... in order to provide ALL Humans with power, that number would likely go up to about 0.65 Zettajoules).
I would think the machines would be emphasizing technical efficiency (doing more with less).
Ergo, they'd likely find even 200 Zettajoules 'too much', but you never know... since this is supposed to be closer to 2199 - and most scifi seems to not understand the concept of 'doing more with less' (technical efficiency).
The 'human battery' concept really doesn't fly.
The machines obviously have access to very efficient drilling technology, so they could easily go all the way down very close to the core and tap it directly (instant and nearly inexhaustible source of power which is renewable to boot).
The machines were at one point described as being powered by solar... but Humans then darkened the sky.
Depending on how many Humans they grow... I don't quite think that even at 7.2 billion, you'd be able to generate the amount of power that is equivalent to what is produced by the Earth's core.