How to measure power in PID controlled circuit

Yeah, that's also a possibility. Either way, we'll need to evaluate that mystery code.