I use node-red-contrib-pid module by colinl and while the node itself works fine the output values of the P,I,D components do not make much sense. When the temperature (PV) is lower than the setpoint the P component is negative, while the output increases (just as it should). Same goes for all 3 components. It looks like the sign is inverted when the components are output in the message properties.

Sorry, I misread your original post on the issue you linked to. Lets try again.

Looking at the proportional term, conventionally in PID algorithms this is calculated by determining the error (which is PV - setpoint) and then scaling that by the proportional band or gain. That does indeed give a negative value when the process is low.

As you say, in order to generate the correct sign for the output power it is inverted and offset to give a power value in the range 0:1 by the line in pid.js: power = -1.0/node.prop_band * (proportional + node.integral + node.derivative) + 0.5

I always assumed error to be setpoint-PV, not the reverse (so that one can add PV+error and get a target value, like in statistical modelling).
if you see error as PV-setpoint it becomes clear why the component values have counter-intuitive sign.
Thank you for the claiifcation.