Skip to content

BACnet Device Service Component Details

This page provides additional details on the BACnet Device Service component.

BACnet Object Support

BACnet Object Lists

The following BACnet data types are supported by setting the valueType of a resource to ObjectArray.

BACnetLIST of BACnetDestination

The only property that uses this BACnet data type is Recipient List (102).

This BACnet data type is treated as a list of recipients in XRT.

Each entry in the list counts as a recipient and the fields used in each entry are described in the following table.

Field Type Description Mandatory on Write
confirmed_notify Bool true if confirmed notifications are to be sent

false if unconfirmed notifications are to be sent
Not Mandatory

Default:

false
process_identifier Uint32 Process handle that is to be included with any events routed through this recipient Not Mandatory

Default:

0
recipient Object The address of the recipient to receive event notifications

Three different options:

Device Identifier
{
    "device_identifier": 101
}
IP Address
{
    "recipient":{
        "ip": "192.168.1.128",
        "port": 47808
    }
}
port is optional, defaults to the port the BACnet device service is running on

Routed Address
{
    "address":{
        "routed":{
            "network_number":242,
            "mac":"aa:bb:cc:dd:ee:ff"
        }
    }
}
Mandatory
from_time Object The start of the window of time in which the destination can be contacted
{
  "hour": 21,
  "min": 11,
  "sec": 0,
  "hundredths": 0
}
Not Mandatory

Default:

{
  "hour": 0,
  "min": 0,
  "sec": 0,
  "hundredths": 0
}
to_time Object The end of the window of time in which the destination can be contacted
{
  "hour": 23,
  "min": 45,
  "sec": 3,
  "hundredths": 0
}
Not Mandatory

Default:

{
  "hour": 23,
  "min": 59,
  "sec": 59,
  "hundredths": 0
}
transitions List of Strings Transitions that are active for this recipient

["TO_OFFNORMAL", "TO_FAULT", "TO_NORMAL"]
Not Mandatory

Default:

All 3 transitions
valid_days List of Strings The set of days of the week that the destination can be contacted

["MONDAY", "TUESDAY", WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"]
Not Mandatory

Default:

All days

An example payload of writing these elements is provided:

[
  {
    "confirmed_notify": false,
    "process_identifier": 121,
    "recipient": {
      "device_identifier": 101
    },
    "from_time": {
      "hour": 11,
      "hundredths": 0,
      "min": 13,
      "sec": 14
    },
    "to_time": {
      "hour": 22,
      "hundredths": 0,
      "min": 12,
      "sec": 22
    },
    "valid_days": ["MONDAY", "TUESDAY", "FRIDAY", "SUNDAY"],
    "transitions": ["TO_OFFNORMAL", "TO_NORMAL"]
  },
  {
    "recipient": {
      "address": {
        "ip": "192.168.1.128",
        "port": 4455
      }
    }
  },
  {
    "confirmed_notify": true,
    "process_identifier": 7,
    "recipient": {
      "address": {
        "routed": {
          "network_number": 242,
          "mac": "aa:bb:cc:dd:ee:ff"
        }
      }
    },
    "from_time": {
      "hour": 11,
      "hundredths": 0,
      "min": 13,
      "sec": 14
    }
  }
]

BACnet Events

Received BACnet events will be published on a synthetic resource _EVENT. The valueType of this resource is object. The following table provides information on how events will be described in this object.

Fields Type Description Example
initiating_object_identifier Object Identifier of object that sent the event

This would be the device object and so the instance number will be the device identifier
{
  "instance": [unsigned_int],
  "type": [unsigned_int]
}
{
  "instance":1234,
  "type":8
}
event_object_identifier Object Identifier of object that initiated the event
{
  "instance": [unsigned_int],
  "type": [unsigned_int]
}
{
  "instance":1,
  "type": 1
}
time_stamp Object The time that the event was produced

Three different options:

Sequence Number
{
    "sequence_number": [sequence_number]
}
Time
{
  "time": {
    "hour": [unsigned_int],
    "min": [unsigned_int],
    "sec": [unsigned_int],
    "hundredths": [unsigned_int]
  }
}
Date Time
{
  "date_time": {
    "date": {
      "year": [unsigned_int],
      "month": [unsigned_int],
      "day": [unsigned_int]
      "wday": [unsigned_int(1 -7)],
    },
    "time": {
      "hour": [unsigned_int],
      "min": [unsigned_int],
      "sec": [unsigned_int],
      "hundredths": [unsigned_int]
    }
  }
}
Sequence Number
{
    "sequence_number": 123
}
Time
{
  "time": {
    "hour": 12,
    "min": 10,
    "sec": 11,
    "hundredths": 4
  }
}
Date Time
{
  "date_time": {
    "date": {
      "year": 2022,
      "month": 1,
      "day": 1,
      "wday": 6,
    },
    "time": {
      "hour": 12,
      "min": 10,
      "sec": 11,
      "hundredths": 4
    }
  }
}
from_state Uint8 Event state before transition

  • EVENT_STATE_NORMAL = 0
  • EVENT_STATE_FAULT = 1
  • EVENT_STATE_OFFNORMAL = 2
  • EVENT_STATE_HIGH_LIMIT = 3
  • EVENT_STATE_LOW_LIMIT = 4
  • 0
    to_state Uint8 Event state after transition

  • EVENT_STATE_NORMAL = 0
  • EVENT_STATE_FAULT = 1
  • EVENT_STATE_OFFNORMAL = 2
  • EVENT_STATE_HIGH_LIMIT = 3
  • EVENT_STATE_LOW_LIMIT = 4
  • 3
    notify_type Uint8 Notification type

  • NOTIFY_ALARM = 0
  • NOTIFY_EVENT = 1
  • NOTIFY_ACK_NOTIFICATION = 2
  • 1
    notification_class Uint32 Notification class instance number 0
    ack_required Bool Acknowledgement required false
    message_text String Event message text “Event produced”
    priority Uint8 Priority level 255
    process_identifier Uint32 The handle of the process within the entry of the recipient list that sent this event 121
    event_data Object Described in the Event Data section
    {
      "change_of_characterstring":{
        "alarm_value":"I am the alarm value",
        "changed_value":"I am the changed value",
        "status_flags": ["IN_ALARM"]
      }
    }
    

    Event Data

    The following table describes the supported event_data types.

    Field Type Description
    CHANGE_OF_BITSTRING
    {
      "change_of_bitstring":{
        "referenced_bitstring":"[binary_string]",
        "status_flags":"[list_of_active_status_flags]"
      }
    }
    
    {
      "change_of_bitstring":{
        "referenced_bitstring":"1010101101001",
        "status_flags": ["FAULT", "OVERRIDDEN", "OUT_OF_SERVICE"]
      }
    }
    
    CHANGE_OF_STATE
    {
      "change_of_state":{
        "new_state":{
          "boolean_value":[bool] / 
          "binary_value":[BACNET_BINARY_PV enum] / 
          "event_type":[BACNET_EVENT_TYPE enum] / 
          "polarity":[BACNET_POLARITY enum] / 
          "program_change":[BACNET_PROGRAM_REQUEST enum] / 
          "program_state":[BACNET_PROGRAM_STATE enum] / 
          "program_error":[BACNET_PROGRAM_ERROR enum] / 
          "reliability":[BACNET_RELIABILITY enum] / 
          "state":[BACNET_EVENT_STATE enum] / 
          "system_status":[BACNET_DEVICE_STATUS enum] / 
          "units":[BACNET_ENGINEERING_UNITS enum] / 
          "unsigned_value":[unsigned_int] / 
          "life_safety_mode":[BACNET_LIFE_SAFETY_MODE enum] / 
          "life_safety_state": [BACNET_LIFE_SAFETY_STATE enum]
        },
        "status_flags":"[list_of_active_status_flags]"
      }
    }
    
    {
      "change_of_state":{
        "new_state":{
          "polarity": 1
        },
        "status_flags": ["IN_ALARM", "FAULT", "OVERRIDDEN"]
      }
    }
    
    {
      "change_of_state":{
        "new_state":{
          "boolean_value": true
        },
        "status_flags": ["IN_ALARM", "FAULT", "OVERRIDDEN"]
      }
    }
    
    CHANGE_OF_VALUE
    {
      "change_of_value":{
        "new_value":{
          "changed_value": [float] / "changed_bits": "[binary_string]"
        },
        "status_flags":"[list_of_active_status_flags]"
      }
    }
    
    {
      "change_of_value":{
        "new_value":{
          "changed_value":1.23000002e+00
        },
        "status_flags": ["IN_ALARM", "FAULT"]
      }
    }
    
    {
      "change_of_value":{
        "new_value":{
          "changed_bits":"101010111"
        },
        "status_flags": ["OVERRIDDEN", "OUT_OF_SERVICE"]
      }
    }
    
    COMMAND_FAILURE
    {
      "command_failure":{
        "command_value":{
          "unsigned_value":[unsigned_integer] / 
          "binary_value":[BACNET_BINARY_PV enum]
        },
        "feedback_value":{
          "unsigned_value": [unsigned_integer] / 
          "binary_value":[BACNET_BINARY_PV enum]
        },
        "status_flags":"[list_of_active_status_flags]"
      }
    }
    
    {
      "command_failure":{
        "command_value":{
          "unsigned_value":448
        },
        "feedback_value":{
          "unsigned_value":20
        },
        "status_flags": ["OUT_OF_SERVICE"]
      }
    }
    
    FLOATING_LIMIT
    {
      "floating_limit":{
        "error_limit": [float],
        "reference_value":[float],
        "set_point_value":[float],
        "status_flags":"[list_of_active_status_flags]"
      }
    }
    
    {
      "floating_limit":{
        "error_limit":3.45000005e+00,
        "reference_value":1.23000002e+00,
        "set_point_value":2.33999991e+00,
        "status_flags": ["IN_ALARM", "FAULT", "OVERRIDDEN"]
      }
    }
    
    OUT_OF_RANGE
    {
      "out_of_range":{
        "deadband":[float],
        "exceeded_limit":[float],
        "exceeding_value":[float],
        "status_flags":"[list_of_active_status_flags]"
      }
    }
    
    {
      "out_of_range":{
        "deadband":2.33999991e+00,
        "exceeded_limit":3.40000010e+00,
        "exceeding_value":3.40000010e+00,
        "status_flags": ["IN_ALARM"]
      }
    }
    
    CHANGE_OF_LIFE_SAFETY
    {
      "change_of_life_safety":{
        "new_mode":[BACNET_LIFE_SAFETY_MODE enum],
        "new_state":[BACNET_LIFE_SAFETY_STATE enum],
        "operation_expected":[BACNET_LIFE_SAFETY_OPERATION enum],
        "status_flags":"[list_of_active_status_flags]"
      }
    }
    
    {
      "change_of_life_safety":{
        "new_mode":5,
        "new_state":2,
        "operation_expected":4,
        "status_flags": ["OVERRIDDEN"]
      }
    }
    
    BUFFER_READY
    {
      "buffer_ready":{
        "buffer_property":{
          "array_index":[unsigned_int],
          "device_identifier":{
            "instance":[unsigned_int],
            "type":[unsigned_int]
          },
          "object_identifier":{
            "instance":[unsigned_int],
            "type":[unsigned_int]
          },
          "property_identifier":[unsigned_int]
        },
        "current_notification":[unsigned_int],
        "previous_notification":[unsigned_int]
      }
    }
    
    {
      "buffer_ready":{
        "buffer_property":{
          "array_index":0,
          "device_identifier":{
            "instance":73,
            "type":8
          },
          "object_identifier":{
            "instance":56,
            "type":0
          },
          "property_identifier":85
        },
        "current_notification":2345,
        "previous_notification":1234
      }
    }
    
    UNSIGNED_RANGE
    {
      "unsigned_range":{
        "exceeded_limit":[unsigned_int],
        "exceeding_value":[unsigned_int],
        "status_flags":"[list_of_active_status_flags]"
      }
    }
    
    {
      "unsigned_range":{
        "exceeded_limit":2345,
        "exceeding_value":1234,
        "status_flags": ["IN_ALARM", "FAULT"]
      }
    }
    
    ACCESS_EVENT
    {
      "access_event":{
        "access_credential":{
          "device_identifier":{
            "instance":[unsigned_int],
            "type":[unsigned_int]
          },
          "object_identifier":{
            "instance":[unsigned_int],
            "type":[unsigned_int]
          }
        },
        "access_event":[BACNET_ACCESS_EVENT enum],
        "access_event_tag":[unsigned_int],
        "access_event_time":{
          "date_time":{
            "date":{
              "day":[unsigned_int],
              "month":[unsigned_int],
              "wday":[unsigned_int],
              "year":[unsigned_int]
            },
            "time":{
              "hour":[unsigned_int],
              "hundredths":[unsigned_int],
              "min":[unsigned_int],
              "sec":[unsigned_int]
            }
          }
          OR
          "time":{
            "hour":[unsigned_int],
            "hundredths":[unsigned_int],
            "min":[unsigned_int],
            "sec":[unsigned_int]
          }
          OR
          "sequence_number":[unsigned_int]
        },
        "authentication_factor":{ 
          "format_class":[unsigned_int],
          "format_type":[BACNET_AUTHENTICATION_FACTOR_TYPE enum],
          "value":"[base64_encoded]"
        },
        "status_flags":"[list_of_active_status_flags]"
      }
    }
    
    {
      "access_event":{
        "access_credential":{
          "device_identifier":{
            "instance":18,
            "type":8
          },
          "object_identifier":{
            "instance":430,
            "type":33
          }
        },
        "access_event":9,
        "access_event_tag":7,
        "access_event_time":{
          "date_time":{
            "date":{
              "day":18,
              "month":2,
              "wday":5,
              "year":2022
            },
            "time":{
              "hour":11,
              "hundredths":0,
              "min":51,
              "sec":22
            }
          }
        },
        "authentication_factor":{
          "format_class":215,
          "format_type":3,
          "value":"ABA="
        },
        "status_flags": ["OVERRIDDEN"]
      }
    }
    
    DOUBLE_OUT_OF_RANGE
    {
      "double_out_of_range":{
        "deadband":[double],
        "exceeded_limit":[double],
        "exceeding_value":[double],
        "status_flags":"[list_of_active_status_flags]"
      }
    }
    
    {
      "double_out_of_range":{
        "deadband":3.2100000000000000e+00,
        "exceeded_limit":2.3300000000000001e+00,
        "exceeding_value":2.3300000000000001e+00,
        "status_flags": ["FAULT"]
      }
    }
    
    SIGNED_OUT_OF_RANGE
    {
      "signed_out_of_range":{
        "deadband":[signed_integer],
        "exceeded_limit":[signed_integer],
        "exceeding_value":[signed_integer],
        "status_flags":"[list_of_active_status_flags]"
      }
    }
    
    {
      "signed_out_of_range":{
        "deadband":50,
        "exceeded_limit":-101,
        "exceeding_value":-101,
        "status_flags":" ["FAULT", "OUT_OF_SERVICE"]
      }
    }
    
    UNSIGNED_OUT_OF_RANGE
    {
      "unsigned_out_of_range":{
        "deadband":[unsigned_integer],
        "exceeded_limit":[unsigned_integer],
        "exceeding_value":[unsigned_integer],
        "status_flags":"[list_of_active_status_flags]"
      }
    }
    
    {
      "unsigned_out_of_range":{
        "deadband":50,
        "exceeded_limit":101,
        "exceeding_value":101,
        "status_flags": ["FAULT", "OVERRIDDEN"]
      }
    }
    
    CHANGE_OF_CHARACTERSTRING
    {
      "change_of_characterstring":{
        "alarm_value":"[string]",
        "changed_value":"[string]",
        "status_flags":"[list_of_active_status_flags]"
      }
    }
    
    {
      "change_of_characterstring":{
        "alarm_value":"I am the alarm value",
        "changed_value":"I am the changed value",
        "status_flags": ["OVERRIDDEN", "OUT_OF_SERVICE"]
      }
    }
    
    CHANGE_OF_TIMER
    {
      "change_of_timer":{
        "initial_timeout":[unsigned_integer>,
        "last_state_change":[BACNET_TIMER_TRANSITION enum],
        "new_state":[BACNET_TIMER_STATE enum],
        "status_flags":"[list_of_active_status_flags]",
        "update_time":{
          "date":{
            "day":[unsigned_integer],
            "month":[unsigned_integer],
            "wday":[unsigned_integer],
            "year":[unsigned_integer]
          },
          "time":{
            "hour":[unsigned_integer],
            "hundredths":[unsigned_integer],
            "min":[unsigned_integer],
            "sec":[unsigned_integer]
          }
        },
        "expiration_time":{
          "date":{
            "day":[unsigned_integer],
            "month":[unsigned_integer],
            "wday":[unsigned_integer],
            "year":[unsigned_integer]
          },
          "time":{
            "hour":[unsigned_integer],
            "hundredths":[unsigned_integer],
            "min":[unsigned_integer],
            "sec":[unsigned_integer]
          }
        }
      }
    }
    
    {
      "change_of_timer":{
        "initial_timeout":7480,
        "last_state_change":4,
        "new_state":1,
        "status_flags":" ["IN_ALARM", "FAULT", "OVERRIDDEN"],
        "update_time":{
          "date":{
            "day":18,
            "month":2,
            "wday":5,
            "year":2022
          },
          "time":{
            "hour":11,
            "hundredths":0,
            "min":51,
            "sec":22
          }
        }
      }
    }
    
    EXTENDED Currently unsupported Currently unsupported
    CHANGE_OF_STATUS_FLAGS Currently unsupported Currently unsupported
    CHANGE_OF_RELIABILITY Currently unsupported Currently unsupported
    CHANGE_OF_DISCRETE_VALUE Currently unsupported Currently unsupported

    All events will come through on the topic TelemetryTopic using the _EVENT resource. An example of a full event notification being received is provided:

    {
       "device":"BACnetDevice1",
       "readings":{
          "_EVENT":{
             "type":"object",
             "value":{
                "ack_required":false,
                "event_data":{
                   "unsigned_out_of_range":{
                      "deadband":50,
                      "exceeded_limit":101,
                      "exceeding_value":101,
                      "status_flags": ["IN_ALARM", "FAULT"]
                   }
                },
                "event_object_identifier":{
                   "instance":57,
                   "type":5
                },
                "event_type":16,
                "from_state":0,
                "initiating_object_identifier":{
                   "instance":1234,
                   "type":8
                },
                "message_text":"Simulated Event",
                "notification_class":0,
                "notify_type":0,
                "priority":255,
                "process_identifier: 222,
                "time_stamp":{
                   "sequence_number":863
                },
                "to_state":2
             }
          }
       },
       "resource":"_EVENT"
    }
    
    Back to top