# Regarding to send a message from Node red to Niagara 4 framework

**URL:** <https://discourse.nodered.org/t/regarding-to-send-a-message-from-node-red-to-niagara-4-framework/58603>\
**Category:** General\
**Created:** [18 February 2022 14:33 UTC](https://discourse.nodered.org/t/regarding-to-send-a-message-from-node-red-to-niagara-4-framework/58603 "2022-02-18T14:33:15Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [21 February 2022 14:04 UTC](https://discourse.nodered.org/t/regarding-to-send-a-message-from-node-red-to-niagara-4-framework/58603/20 "2022-02-21T14:04:04Z")

</div>

Try this...

```auto
// 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;

```

---

_[View the full topic](https://discourse.nodered.org/t/regarding-to-send-a-message-from-node-red-to-niagara-4-framework/58603)._
