Integration of Node-Red and Niagara 4 through oBIX

Опубликовано: 19 Август 2026
на канале: Interface Mechanics
3,536
74

In this video I demonstrate how to set up a Niagara 4 station to be able to make data available via oBIX and then I will build a Node-Red flow that can reach in and grab data out of that Niagara 4 station.


Here's some links to technologies I used in this video:


https://nodered.org/
https://www.tridium.com/
http://www.obix.org/



Here's the Node-Red flow I build, In case you want to copy and paste this into your own Node-Red flow and modify it for your application:


[{"id":"f2b5b222.75f0f","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"f2fa2c4f.4cdb4","type":"inject","z":"f2b5b222.75f0f","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":40,"wires":[["c6a2919c.77e368"]]},{"id":"ecead347.7069f","type":"http request","z":"f2b5b222.75f0f","name":"","method":"use","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","x":440,"y":40,"wires":[["79156e48.042778"]]},{"id":"c6a2919c.77e368","type":"function","z":"f2b5b222.75f0f","name":"getRequest","func":"//assign some variables\n\nusername = \"obixUser\";\npassword = \"obixPASSWORD1234\";\nipAddress = \"192.168.1.160\";\nhttpsPort = 52345;\n\n//create a base64 digest\n\nauthHash = Buffer.from(username+\":\"+password).toString(\"base64\");\n\n//what data do I want to pull out of the niagara station\nordSlot = \"/Drivers/ModbusTcpNetwork/Turbocor1/points/DTC1/Suction_Pressure/out/value\";\n\n//create the message for the get request\n\nmsg = {\n \"method\": \"GET\",\n \"url\": \"https://\"+ipAddress+\":\"+httpsPort+\"/obix/config\"+ordSlot,\n \"headers\": {\n \"Authorization\": \"Basic \" + authHash,\n \"Accept\": \"*/*\"\n }\n};\n\n//ignore cert expired error\nmsg.rejectUnauthorized = false;\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":260,"y":40,"wires":[["ecead347.7069f"]]},{"id":"79156e48.042778","type":"xml","z":"f2b5b222.75f0f","name":"","property":"payload","attr":"","chr":"","x":590,"y":40,"wires":[["ab37d1eb.1ca088"]]},{"id":"ab37d1eb.1ca088","type":"function","z":"f2b5b222.75f0f","name":"suctionPSI","func":"suctP = parseFloat(msg.payload.real.$.val).toFixed(1)+ \" PSI\";\nmsg.payload = suctP;\nnode.status(suctP);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":750,"y":40,"wires":[["b512a791.02c428"]]},{"id":"b512a791.02c428","type":"ui_gauge","z":"f2b5b222.75f0f","name":"suctionPressure","group":"d3aa889b.b2184","order":0,"width":0,"height":0,"gtype":"gage","title":"Suction Pressure","label":"PSI","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"50","seg2":"60","x":960,"y":40,"wires":[]},{"id":"d3aa889b.b2184","type":"ui_group","name":"Pressures","tab":"76dc6c29.c1bd64","order":1,"disp":true,"width":"6","collapse":false},{"id":"76dc6c29.c1bd64","type":"ui_tab","name":"Chiller6","icon":"dashboard","disabled":false,"hidden":false}]