Use external value for BACnet write node?

I have been using the node-red-contrib-bacnet library and everything is working perfectly, I can read and write values to my BACnet controller without an issue. I do have one problem though, I cant figure out how to use the value from another node like a timestamp as the value that is sent by the BACnet write node.
When I do it like this it writes the value perfectly:


But it does not work at all when I try to use the msg.payload from another node:

I have tested the msg.payload itself and it shows up fine in debug.

1 Like

Did you read the built in help?

Here is an example of my function node writing a Temperature value to the Present Value of an Analogue Value object

var temp = parseFloat(msg.payload[Object.keys(msg.payload)[0]].toFixed(1));
msg.payload = {
    objectId: {type: 2, instance: 201}, 
    propertyid: 85,
    values: [{type: 4, value: temp}],
    priority: 8
}
return msg;

// type: 2 = Analog_Value
// Instance: 201
// propertyid: 85 = Present value
// values: [{type: 4, value: temp}] -- type 4 = Real
// wired to BACnet write node

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.