Try this...
// Code of Function node
const incomingPayload = msg.payload; //save msg.payload before you destroy the msg object below
const username = "obixUser";
const password = "Wetec123456#@";
const ipAddress = "172.30.34.212";
const httpsPort = 443;
const authHash = Buffer.from(username + ":" + password).toString("base64");
const ordSlot = "/Supply$20Fan/NewValue";
const operation = "/set";
// create the message for the get request
msg = {
"method": "POST",
"url": "https://" + ipAddress + ":" + httpsPort + "/obix/config" + ordSlot + operation,
"headers": {
"Authorization": "Basic" + authHash,
"Accept": "/"
}
};
//ignore cert expired error
msg.rejectUnauthorized = false;
msg.payload = `<str val="${incomingPayload}" />`; //Use the saved value of msg.payload
return msg;