From which spectrometer are you trying to read temperature? The STS has a PCB temperature function in SeaBreeze. Others may also. See SeaBreeze/src/vendors/OceanOptics/features/temperature.