"Metadata", "Read" and "Write" Details - BACnet Stack on Ubuntu for Self-Configuring BACnet Server

 Click here to view the Case Study. Please CONTACT US if you have any questions



Here are the "Metadata", "Read" and "Write" Details for the Caste Study:
BACnet Stack on Ubuntu to provide a Self-Configuring BACnet Server

The case study delves into the implementation of a Self-Configuring BACnet Server using the CAS BACnet Stack on the Ubuntu operating system. BACnet, a widely adopted communication protocol in building automation systems, is harnessed to create a dynamic and adaptive server configuration.

The primary goal is to showcase the seamless integration of a BACnet Stack on Ubuntu, transforming it into a Self-Configuring BACnet Server. This approach aims to enhance the flexibility and efficiency of building automation by automating the server configuration process.

Matadata Details

The metadata endpoint is used to initially set up the BACnet interface. All settings, device properties, objects, and object properties are described in the json metadata endpoint and are used to build both an internal memory database to store the properties and their values as well as the BACnet device and objects that get registered in the CAS BACnet API.

The metadata is also polled on a configurable interval if additional sensors and devices are added to the Raybased network. These updates are then added to the memory database and registered to the CAS BACnet API.

An example of the metadata request:

{

     "result": "OK",

     "value": {

           "bacnetNetwork": 0,

           "bbmdIPAddress": "127.0.0.1",

           "bbmdPort": 47808,

           "device": {

                "description": "",

                "instance": 1,

                "location": "",

                "name": "DeviceName",

                "objectList": [{

                      "description": "dummy description",

                      "instance": 2,

                      "name": "E00C - Temperature",

                      "objectType": "analogInput",

                      "units": "degreesCelsius"

                }, {

                      "description": "dummy description",

                      "instance": 3,

                      "name": "E00C - Humidity",

                      "objectType": "analogInput",

                      "units": "percentRelativeHumidity"

                }, {

                      "description": "dummy description",

                      "instance": 4,

                      "name": "E00C - Presence",

                      "objectType": "binaryInput",

                      "units": "noUnits"

                }, {

                      "description": "dummy description",

                      "instance": 5,

                      "name": "E00C - Illuminance",

                      "objectType": "analogInput",

                      "units": "luxes"

                }, {

                      "description": "dummy description",

                      "instance": 6,

                      "name": "E010 - RelayStatus",

                      "objectType": "binaryInput",

                      "units": "noUnits"

                }, {

                      "description": "dummy description",

                      "instance": 7,

                      "name": "E010 - RelayStatus",

                      "objectType": "binaryOutput",

                      "units": "noUnits"

                }, {

                      "description": "E0011 description",

                      "instance": 8,

                      "name": "E011 - Temperature",

                      "objectType": "analogOutput",

                      "units": "degreesCelsius"

                }]

           },

           "foreignDeviceTimeToLive": 600,

           "metadataPollInterval": 900000,

           "sensorPollInterval": 300000,

           "udpPort": 47808

     }

}

Read Details

The read endpoint contains the current values of all the data points that were mapped to BACnet objects. The endpoint also contains the reliability of the data so should sensors go offline, the data and reliability BACnet properties can be updated to properly reflect that the data is unreliable. The data is stored in the memory database and is then made available via BACnet.

In the future, Raybased may change the read endpoint to only include values that have changed. As such, as part of the read request, we also send the last updated timestamp that we received in the most recent read response. Raybased handles the filtering of the data that is sent

An example of the Red request:

{"result": "OK", "timestamp": "123456789"

"values": [

    {

        "instance": 1,

        "presentValue": 25.3,

        "reliability": "no-fault-detected"

    },

    {

        "instance": 2,

        "presentValue": 45.0,

        "reliability": "no-fault-detected"

    }

]

}

Write Details

The write functionality allows the BACnet application to send commands to the REST API to change a setpoint or to activate/deactivate a relay. These are mapped to Analog-Outputs and Binary-Outputs. When the BACnet application receives a WriteProperty, it attempts to send the write request to the web server and if successful, sets the value in the memory database.

The response to the write request contains the result of the write operation. If the operation failed, then the json response contains the error message of the reason for the failure that is then translated into a BACnet error.

An example of the Write request:

Settings for the Case Study

The metadata contains the following settings:

BACnet Settings:

  • BACnetNetwork - the network to set the BACnet device on.
  • udpPort - the UDP port to use for BACnet communication.

Polling Settings:

  • metadataPollInterval - how often to poll for the metadata in milliseconds.
  • sensorPollInterval - how often to poll for the read data in milliseconds.

Future BBMD Settings:

Raybased expressed interest in implementing Foreign Device Registration. As such, they will need to add the following settings:

  • bbmdIPAddress - the IP address of the BBMD the device is trying to register to as a Foreign Device.
  • bbmdPort - the port of the BBMD device
  • foreignDeviceTimeToLive - how often to send the RegisterForeignDevice BACnet message.

Contact Us

Contact us via phone (+1 866-383-1657) or leave a detailed message below for sales, support, or any other needs

*Required Field
*Required Field
I'd like to receive the newsletter. *Check email for confirmation.
*Required Field
8:00am - 12:00pm 12:00pm - 5:00pm