It will depend on the protocol you're using and the configuration of the thermostat device you're trying to set. If your device is modbus, you just need to look up the register that's holding the setpoint, then configure a modbus point that is settable and corresponds to that register. Setting to the point to x will send a modbus signal out that the value of that register is now x.