Homogenization and thermopiezoelectricity