BacnetAPIServer is an open-source tool that bridges the gap between REST APIs and BACnet systems. It seamlessly translates API calls into BACnet objects, making them readily available for building automation control. Designed to integrate with NodeRED, BacnetAPIServer simplifies the conversion of NodeRED logic into BACnet Objects, streamlining BACnet integration for developers.
BacApiServer-0.0.11.zip
https://drive.google.com/file/d/1V-In7nlw6GGJLJT-UecnDE5Iok7yl8cu/view?usp=sharing
Compatible Operating Systems:
Ubuntu
Raspberry Pi OS
Tools:
Java 1.8 or higher
Node.js 20.11.1
Java Installation
sudo apt install default-jdk
Node.js Installation
sudo apt update
sudo apt install curl
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.bashrc
nvm install "20.11.1"
NodeRED Installation
https://nodered.org/docs/getting-started/raspberrypi
Credentials for BacnetWeb Portal
Default username:admin and password:admin
-
Download BacnetAPI Server from the Download Link
-
Put the "BacAPIServer.zip" file in the /opt directory
command example:
sudo mv BacApiServer-0.0.11.zip /opt/BacApiServer-0.0.11.zip
File must listed in the opt directory when you type the following command
ls /opt
-
Go to /Opt directory
command example:
cd /opt
-
Unzip "BacAPIServer.zip"
command example:
sudo unzip BacApiServer-0.0.11.zip
-
Creating System D Service
Use any text edit to create the bacnetAPIServer.service and bacnetWebAPIPortal.service
1). Create bacnetAPIServer.service Command example sudo vim /etc/systemd/system/bacnetAPIServer.service bacnetAPIServer.service [Unit] Description=Bacnet API Backend Server After=network.target StartLimitIntervalSec=0 [Service] Type=simple Restart=always RestartSec=1 ExecStart=bash /opt/BacApiServer-0.0.11/bin/startServer.sh [Install] WantedBy=multi-user.target
2). Create bacnetWebAPIPortal.service
Command Example sudo vim /etc/systemd/system/bacnetWebAPIPortal.service bacnetWebAPIPortal.service [Unit] Description=Bacnet API Web Portal After=network.target StartLimitIntervalSec=0 [Service] Type=simple Restart=always RestartSec=1 ExecStart=bash /opt/BacApiServer-0.0.11/bin/startPortal.sh [Install] WantedBy=multi-user.target
-
Restart Services
sudo systemctl daemon-reload
-
Start bacnetAPIServer.service and bacnetWebAPIPortal.service
Command to start bacnetAPIServer.service
sudo systemctl start bacnetAPIServer.service
Command to start bacnetWebAPIPortal.service
sudo systemctl start bacnetWebAPIPortal.service
8.Open the following ports
1.)7007
sudo ufw allow 7007
2.) 1880
sudo ufw allow 1880
3.) 3000
sudo ufw allow 3000
-
Type <ip_address>:3000 or localhost:3000(Only Applies if your on the server) in your browser. The bacnetAPI Web Portal will Appear
https://github.com/selvadurai/BacnetAPIServer/tree/main/UserGuide
BacnetAPIServer leverages Java for its backend, utilizing the Javalin and Bacnet4J libraries. The frontend, known as BacnetWebPortal, is built with Vue.js
BacnetAPIServer:
https://github.com/selvadurai/BacnetServerAPI
BacnetWebPortal: