gcibeira / bacnet-bbmd

A BACnet BBMD implementation for NodeJS
MIT License
1 stars 2 forks source link

Need to implement this in existing application #1

Open Obaq-web opened 1 year ago

Obaq-web commented 1 year ago

Hi there,

I am running the software "fuxa" which is an open-source SCADA/HMI software on my machine and want to connect to a BACnet-device that I am connected to via a VPN-router.

The software "fuxa" is using the node-bacnet module and I it seems like it does not support BBMD-functionalites.

My machine "fuxa" is running on has the IP 192.168.67.252 and is connected to a VPN-router with the IP 192.168.67.10. The BACnet-device I want to connect to has the IP 192.168.151.51. On this device there is a BBMD installed. The Port I am using is 47834.

How do I implement your module? Do I write your code in the same script as where I finde the client = new bacnet(); command?

I would be happy for any help.

gcibeira commented 1 year ago

Hi Obaq! The class bacnet-bbmd is an extension of the class bacnet, so it should work as a regular client, but with BBMD features.

Take the example on the readme file, and pass it the other BBMD's address and port, like so:

const BACnetBBMD = require('./bacnet-bbmd');

const bbmd = new BACnetBBMD({
    broadcastAddress:'192.168.10.255',      // Local subnet broadcast address
    port:47808,                             // BACnet UDP port
    bdt:[{address:'192.168.11.101:47809'}], // Broadcast Distribution Table
    fdt:[],                                 // Foreign devices Distribution Table
    bbmdPort:47809                          // Self UDP port to listen to other BBMDs and Foreign devices
});

Unfortunately, I can't guarantee it will work, because it's a very basic implementation with few funcionalities, and I don't know how this "fuxa" software implements the class.

Cheers!