BACnet: Write Node
The BACnet: Write Node allows you to write multiple properties in multiple objects on your BACnet device. This node is only available in Edge Workflows.

Configuration
There are three main properties that require configuration for this node.
Connection Config

The Connection Configuration contains the following fields:
- Host Template: (Required) A string template for the IP address at which the device resides.
- Host Port Template: (Optional) A string template or integer for the BACnet port on the device. It defaults to port 47808.
- Incoming Port Template: (Optional) A string template or integer for the receiving port on the Edge Agent. It defaults to port 47808.
- APDU Timeout Template: (Optional) A string template or integer to determine the time in milliseconds until a transaction should be interpreted as an error.
Write Instructions

Write Instructions can be specified in one of two ways, and it is required that one Write Instruction option is configured.
Array of Template Strings
For each Write Instruction, fill out the following input configuration fields, all of which support templating. You must define at least one instruction:
- Object Type Template: (Required) This field can either be an integer or a template but it must resolve to a valid object type value.
- Object Instance Template: (Required) This field can either be an integer or a template but it must resolve to a valid instance number. This should resolve to an integer between 0 to 4,194,302 inclusive.
- Object Property ID Template: (Required) This field can either be an integer or a template but it must resolve to a valid property identifier value.
- Property Index Template: (Required) A string template or integer for the array index of the property to be written. This should resolve to an integer greater than 0.
- Value Type Template: (Required) This field can either be an integer or a template but it must resolve to a valid value type (Clause X.3.11).
- Write Value Template: (Required) A string template or integer for the actual value to be written.
- Write Priority Template: A string template or an integer to set the priority to be used for writing to the property. This priority will be set against the other objects in the current write property call. This should resolve to an integer between 1 (highest) to 16 (lowest) inclusive. If the priority is not mentioned, it defaults to 16. Read more information on BACnet writing priority.
Payload Path
Enter a payload path that resolves to an array of Write Instructions to be run on this node. The following are the object properties that each object in the array should contain for successful attempts:
- type: (Required) This field can either be an integer or a template but it must resolve to a valid object type value.
- instance: (Required) This field can either be an integer or a template but it must resolve to a valid instance number. This should resolve to an integer between 0 to 4,194,302 inclusive.
- propertyId: (Required) This field can either be an integer or a template but it must resolve to a valid property identifier value.
- propertyIndex: (Required) A string template or integer for the array index of the property to be written. This integer must be greater than 0.
- writeValueType: (Required) This field must resolve to a valid value type (Clause X.3.11).
- writeValue: (Required) A string template or integer for the actual value to be written.
- writePriority: A string template or integer to set the priority to be used for writing to the property. This should resolve to an integer between 1 to 16 inclusive. If the priority is not mentioned, it defaults to 16.
The following is an example of an array:
[
{
"type": 0,
"instance": 8,
"propertyId": 3,
"propertyIndex": 395,
"writeValueType": 12,
"writeValue": "Some write value",
"writePriority": 1
}
]
Result

The Destination Path (a payload path) is optional, but if you want to confirm that the write was successful, the path should be set. If set, the result of write instruction should be as follows: successful writes will have a value of "success", and failures will have a value of "fail".
If any errors occurred, there will be an error key in the object at your path containing the error type and message.
Node Examples
If all write instructions were successful, the output will be similar to:
"destination": {
"write": "success"
}
Node Errors
If an error occurred the output will be similar to:
"destination": {
"write": "fail",
"error": {
"type": "BACNET_WRITE_ERROR",
"message": "<error message>"
}
}
Related Nodes
References
Was this page helpful?
Still looking for help? You can also search the Losant Forums or submit your question there.