All Projects → infinimesh → bacnet-mqtt-gateway

infinimesh / bacnet-mqtt-gateway

Licence: Apache-2.0 License
BACnet MQTT Gateway

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to bacnet-mqtt-gateway

ComputerVision-Essentials
Computer Vision Essentials in Python Programming Language 🎉
Stars: ✭ 28 (+0%)
Mutual labels:  edge-detection
GRFICSv2
Version 2 of the Graphical Realism Framework for Industrial Control Simulation (GRFICS)
Stars: ✭ 119 (+325%)
Mutual labels:  industrial-automation
freeioe
FreeIOE is a framework for building IOE (Internet Of Everything) edge-computing gateway 开源的边缘计算网关框架. 讨论群: 291292378
Stars: ✭ 77 (+175%)
Mutual labels:  iot-gateway
pcl-edge-detection
Edge-detection application with PointCloud Library
Stars: ✭ 32 (+14.29%)
Mutual labels:  edge-detection
WebSight
Aiding the visually impaired through real time augmented reality, AI object detection, WebGL shaders effects such as edge detection, and colour adjustments.
Stars: ✭ 26 (-7.14%)
Mutual labels:  edge-detection
mqtg-bot
MQTT Client Telegram Bot
Stars: ✭ 67 (+139.29%)
Mutual labels:  iot-gateway
Examples-Inxton.Package.Vortex.Core
Repository contains introductory examples to Inxton.Package.Vortex.Core
Stars: ✭ 32 (+14.29%)
Mutual labels:  industrial-automation
document-scan-on-the-phone
使用mobilenet改造HED实现在手机端进行文档的边缘检测
Stars: ✭ 20 (-28.57%)
Mutual labels:  edge-detection
Awesome-Edge-Detection-Papers
📚 A collection of edge/contour/boundary detection papers and toolbox.
Stars: ✭ 927 (+3210.71%)
Mutual labels:  edge-detection
awesome-industry4.0
Curated list of Industry 4.0 research, popular events, open-source software projects and learning resources that are worth looking into!
Stars: ✭ 57 (+103.57%)
Mutual labels:  industrial-automation
spark-convolution-patch
Convolution and other super-patches (blur, sharpen)
Stars: ✭ 74 (+164.29%)
Mutual labels:  edge-detection
vscp
VSCP (Very Simple Control Protocol) IoT/m2m framework
Stars: ✭ 47 (+67.86%)
Mutual labels:  iot-gateway
DeepSegmentor
A Pytorch implementation of DeepCrack and RoadNet projects.
Stars: ✭ 152 (+442.86%)
Mutual labels:  edge-detection
images-processing
Project of computational mathematics, image processing, eliminating the noise of an image, reflection of an image and canny filter
Stars: ✭ 23 (-17.86%)
Mutual labels:  edge-detection
TcUnit-Runner
Program that makes it possible to automate runs of TcUnit unit tests
Stars: ✭ 23 (-17.86%)
Mutual labels:  industrial-automation
project sunroof india
Analyzed Google Satellite images to generate a report on individual house rooftop's solar power potential
Stars: ✭ 74 (+164.29%)
Mutual labels:  edge-detection
Edge-Detection-project
Tiny Image in Javascript - Edge Detection Algorithms
Stars: ✭ 27 (-3.57%)
Mutual labels:  edge-detection
Image-Processing
A set of algorithms and other cool things that I learned while doing image processing with openCV using C++ and python.
Stars: ✭ 29 (+3.57%)
Mutual labels:  edge-detection
cps-twinning
A Framework for Generating and Executing Digital Twins
Stars: ✭ 32 (+14.29%)
Mutual labels:  industrial-automation
edge2view
This is a pix2pix demo that learns from edge and translates this into view. A interactive application is also provided that translates edge to view.
Stars: ✭ 22 (-21.43%)
Mutual labels:  edge-detection

BACnet MQTT Gateway

BACnet MQTT Gateway is gateway that connects BACnet devices via MQTT to the cloud. It is written in Javascript and uses node.

For BACnet connection the Node BACstack is used.

Functionalities

  • Discover BACnet devices in network (WhoIs)
  • Read object list from BACnet device (Read Property)
  • Read present value from defined list of BACnet objects and send it to an MQTT broker
  • REST and web interface for configuration

Getting started

  1. Clone repo and install npm dependencies:

    git clone https://github.com/infinimesh/bacnet-mqtt-gateway.git
    cd bacnet-mqtt-gateway
    npm install
  2. Configure gateway:

    By default the gateway is configured to use infinimesh.cloud platform, but it can be used with any MQTT broker.

    Open config/default.json and change MQTT configuration by defining your device id and the path to the device certificate files.

    {
        "mqtt": {
            "gatewayId": "{{device id}}",
            "host": "mqtt.api.infinimesh.cloud",
            "port": 8883,
            "authentication": {
                "certPath": "{{device .crt file path}}",
                "keyPath": "{{device .key file path}}"
            }
        },
        "bacnet": {
            "configFolder": "./devices/"
        },
        "httpServer": {
            "enabled": true,
            "port": 8082
        }
    }
    
  3. Start the gateway and open admin interface

    npm start
    open http://localhost:8082/admin

Device polling configuration

The gateway can poll BACnet object present values and send the values via MQTT into the cloud. To configure polling for a BACnet device you can put a .json file into the devices folder.

{
    "device": {
        "deviceId": 114,
        "address": "192.168.178.55"
    },
    "polling": {
        "schedule": "*/15 * * * * *"
    },
    "objects": [{
        "objectId": {
            "type": 2,
            "instance": 202
        }
    }, {
        "objectId": {
            "type": 2,
            "instance": 203
        }
    }]
}

You need to define the device id, ip address, schedule interval (as CRON expression) and the objects to poll.

When the gateway is started it automatically reads the list of files from the directory and starts the polling for all devices.

REST API

To execute commands the gateway offers a REST API under http://localhost:8082/api/bacnet.

The following endpoints are supported:

  • PUT /api/bacnet: Scan for devices (WhoIs)

    Scans for BACnet devices in the network (5s) and returns the answers. Body is empty.

    Example:

    PUT http://localhost:8082/api/bacnet/scan
    
  • PUT /api/bacnet/{deviceId}/objects: Scan device for object

    Scans a specific device for objects and returns the list of found objects. Device ID and IP address must be provided.

    Example:

    PUT http://localhost:8082/api/bacnet/22/objects
    {
        "deviceId":"22",
        "address":"192.168.178.99"
    }
    
  • PUT /api/{deviceId}/config: Configure polling for device

    Configures and starts polling for a specific device. Body is the same as the polling configuration files described in the previous section.

    Example:

    PUT http://localhost:8082/api/bacnet/114/config
    {
        "device": {
            "deviceId": 114,
            "address": "192.168.178.55"
        },
        "polling": {
            "schedule": "*/15 * * * * *"
        },
        "objects": [{
            "objectId": {
                "type": 2,
                "instance": 202
            }
        }, {
            "objectId": {
                "type": 2,
                "instance": 203
            }
        }]
    }
    

Run with Docker

Gateway can also be run as a docker container. Just build the image and start a container:

docker build -t bacnet-mqtt-gateway
docker run -p 8082:8082 -v /mnt/bacnet-gateway/devices:/usr/src/app/devices -v /mnt/bacnet-gateway/config:/usr/src/app/config bacnet-mqtt-gateway

With the specified file mountings you can put the config file under /mnt/bacnet-gateway/config and the device configs under /mnt/bacnet-gateway/devices on the host system.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].