Skip to content

Configuration of BACnet data source using BACnet device simulator

Patrykb0802 edited this page Feb 21, 2025 · 4 revisions

1. Downloading and launching BACnet device simulator

We can use simple Python scirpt that will simulate BACnet device and our Scada's data source will be able to communicate with it and read some values:

rooms_simulator.txt

Put freshly downloaded python script in any folder and launch it using bash/command prompt or powershell with these lines:

First you will have to install some BACnet libraries for python:

pip install BAC0==21.12.3
pip install pytz

After installing all neccessery libraries launch BACnet device simulator:

python .\rooms_simulator.py -a 127.0.0.1

Launch parameters

"-a", "--address", default=None, help="IPV4 address of device interface with network mask, "e.g. 10.0.0.34/24"
"-p", "--port", default=47809, type=int, help="Port of BACnet device that will be created"
"-di", "--deviceId", default=101, type=int, help="ID of BACnet device that will be created"
"-st", "--sleepTime", default=0.4, type=float, help="Main loop sleep time (simulation speed)"
"-log", "--logging", default=False, type=bool, help="Enable logging to console"

2. Setting up BACnet data source in Scada-LTS

Example data source properties configuration:

image

As for data points, device object list can be used:

image

After filling Remote device IP, Remote device port, Remote device instance number and pressing Send object list request, a list of BACnet objects which our server in containing will show up. From this level you can press image and data point creation form will fill automatically to handle this specific point.

Two example data instances in python script:

analog_input(
    instance=20,
    name="RoomTwoTemperature",
    properties={"units": "degreesCelsius"},
    description="Room 2 Temperature",
    presentValue=19.0,
)
analog_output(
    instance=10,
    name="RoomOneSetPoint",
    properties={"units": "degreesCelsius"},
    description="Room one set point",
    presentValue=21,
    relinquish_default=21
)

To use chosen point you will need to type correct Object type and Object instance number in data point edit form

You should see that BACnet data point turned on and there is communication between Scada and BACnet device simulator, you can check what values are being recieved by using watchlists.

JSON configuration:

  • Basic configuration with ona BACnet data point

bacnet-simple-configuration.txt

  • Advanced configuration with 3 data points and 2 data sources (bacnet-dp-1 is following bacnet-dp-3 value, they are in the same instance but one of them is analog input(dp-1) and other is analog output (dp-3))

bacnet-advanced-configuration.txt

You can copy text from that file and import it in Import/Export menu.