Bitpool Edge BACnet

A BACnet gateway for node-red

Getting Started

This is a standard Node.js module developed specifically to function within the Node-RED ecosystem.

How to Use

Use the following procedure to install this module to your Node-RED instance, or download the pre-themed Bitpool-Edge Docker image that contains all our favourite nodes pre-installed.

Bitpool-Edge Install

  1. Log into your Bitpool-Edge instance and click the Hamburger icon, in the top-right corner.

  2. Select Manage Palette from the drop down menu then click the Pallete->Install tabs to install.

  3. Using the search bar type @bitpoolos/edge-bacnet and install the module once displayed.

  4. Finally, use the left most navigation menu to scroll down to the heading Bitpool BACnet to reveal available nodes

Docker Install 🐳

This BACnet module and many other Bitpool developed nodes have been pre-installed for your convenience in a Bitpool themed Node-RED application.

Go here for how to install Bitpool-Edge.

BACnet Nodes

The edge-bacnet library of nodes is broken down into 4x functional blocks.

Gateway

The main component to the BACnet node collection. This node contains the interface to the node-bacnet package. All Read and Write nodes must link into the gateway. The gateway node also contains all network properties, to be configured by the user.

Please note: any property changes to the Gateway node currently requires a Node-RED restart.

There are 3 tabs on the gateway node:

Gateway Tab

  • Network Interface - the desired interface for the BACnet client to bind to. This interface must not have any other BACnet clients bound to it.

  • Broadcast Address - the desired subnet for global msgs to be broadcast and received on. This should be as strict as possible. Use 255.255.255.255 if unsure.

  • Local Device Port - the port to be used for BACnet comms. Default is 47808

  • Device ID - the Device ID the node itself would use if the Server is enabled. Ie: if the server is enabled, and a foreign device were to execute a discovery, that is the ID it would see for this node.

  • Device ID range - a filter range for discovering other devices.

Discovery Tab

  • APDU Timeout - BACnet msg timeout option

  • Max APDU Size - BACnet max apdu size

  • Max Segments - BACnet max segments

  • Number of Retries - The amount of retries the node will do if an error is found while fetching a foreign point list.

  • Global Discover Frequency - the frequency at which the gateway issues global WhoIs BACnet commands. This should be limited to the least amount possible, as over-loading a network can be a serious issue with BACnet commmunications.

  • Manual Point Discovery Instance Range - if a BACnet device doesnt have a Object list (BACnet objectType:propertyId - 8:76), the this bacnet client will enter into manual discovery mode, where it iterates through types and instnace ranges. This range can be used to limit this manual scanning

  • Log Device Found - toggles logging of found devices to the node-red debug tab.

  • Log BACnet Errors to Console - toggles logging of BACnet related errors to the node-red console

  • Device List - Import / Export. The Import option allows the user to import a JSON model for the node to use. The Export option exports the currently active model in JSON format.

Server Tab

This section provides the ability to simulate a BACnet device and BACnet points using node-red.

Injecting a msg.topic and msg.payload into the gateway node will create a virtual point that can be discovered by other devices via BACnet/IP

This node only supports 2 BACnet object types, Analog Value - to show numeric data, and a Character String - to show string data.

  • Enabled - toggles whether or not the local BACnet server is started or not.

  • Reinitialize Server - a button that completely clears the server and associated points

Read

The node that handles point and property selection for reading operations. The node is split up into 3 tabs:

1. Device List - used to select points / devices to add to the read list,

2. Read List - list of selected points / devices.

3. Properties - the point properties to be read from the points in the read list.

Write

Much like the read node, this node handles point and property selection for writing operations. The node is split up into 3 tabs:

1. Device List - used to select points / devices to add to the write list.

2. Write List - list of selected points / devices.

3. Properties - the operation property's for the write command. Configuring the receiving BACnet device and setting these properties are critical for a sucessfull write operation.

Inject

An extension of the Node-RED Inject node. It contains all of the standard inject node functionality, with 2 added buttons for a improved user experience. The buttons add a command to the msg object, which can instruct the Read, Write, or Gateway nodes, to either:

1. Poll - invokes a Read or Write operation. A inject node with the Poll option must link into a Read or Write node.

2. Discover - invokes a BACnet global WhoIs broadcast on the specified broadcast address. A inject node with the Discover option must link into a Gateway node.

Examples

Video walk-through

Here are some examples and scenarios that could potentially be used with the edge-bacnet node.

Read and Write

A flow with all of the BACnet read and write provided features

Inject node used for Polling

Inject node used for Discovery

Read node action buttons

Add All Devices - this action adds all of the devices listed on the Device List tab to the Read List

Refresh Device List - this action refreshes the list

Clear Data model: - this action deletes and resets the bacnet data model. The user must wait for the node to construct the site model after selecting this button.

Example Gateway configurations

BACnet Server

MQTT to BACnet

Function generated data

Contents of previous function

Yabe view of function generated BACnet data

Further Information

Now that your Bitpool-Edge is up and running, we have included simple examples flows to demonstrate how to create a basic solution.

  1. Log into your Bitpool-Edge instance and click the Hamburger icon, in the top-right corner.

  2. Select Manage Palette from the drop down menu then click the Import->Examples tabs to see this node.

  3. Navigate the ‘Examples flows’ tree and select @bitpoolos/edge-bacnet to reveal the preconfigured examples.

  4. Click the example you would like to test the click the Import button.

  5. Place the example nodes on a flow and review the configuration of each node. You will need to make suitable changes for your system.

  6. Finally, click Deploy to test.

Additionally, there is basic helper documentation on each node. Just select a target node and click the Help tab found at the top right corner of Bitpool-Edge.

Hint - the icon looks like a book!

Last updated