The present invention provides a TEG device (40) comprising a first unit (60) comprising a thermopile unit (50) and a second unit comprising a cold plate (38) and/or a radiator (48). One of the first and second units (60, 70) is adapted for being embedded or implanted into a body (61), while the other of the first and second units (60, 70) is adapted for being placed at the outer surface of the body (61), i.e. in a fluid (62). The first and second units (60, 70) are adapted for being thermally connected to each other through the surface (59) between the body (61) and the fluid (62) when in use.