Code Monkey home page Code Monkey logo

edge-bacnet's Introduction

BITPOOL-EDGE BACNET


About

A Node-RED node that reads and writes to BACnet devices.

Getting Started

Use the procedures below to install the Bitpool-Edge BACnet node onto your running instance. Then either use the Node-RED help, or read the wiki page to get you started on your next new project.

- Examples are available using the Import->Examples->Flows menu.

Installation

Install using the Node-RED manage palette,

1. Click the 'Hamburger' icon at the top right corner.

2. Select the 'Manage palette' option.

3. Click the 'Install' tab and type '@bitpoolos/edge-bacnet' into the search field.

4. Find the latest version and click to install.

or using NPM from the command line.

$ npm install @bitpoolos/edge-bacnet

Updating

The module can be updated via the Node-RED pallette manager, or via the npm cli.

Upon updating to the latest version, we highly recommend:
 - Check out the changelog for latest feature notes and updates 
 - Remove all @bitpoolos/edge-bacnet nodes from all flows 
 - Deploy all flows 
 - Restart Node-RED 
 - Insert and reconfigure new @bitpoolos/edge-bacnet nodes. 
 - Restart Node-RED again if no devices are discovered.

Main reason being, the behaviour of the bacnet client binding to network interfaces can remain stagnent if the Node-RED service is not restarted. This also ensures that all of the nodes are correctly configured as there are often properties added and removed from nodes.

Changelog

Changelog

Notes

  • This project is still in development and by no means perfect.

  • Gateway node changes require a restart of Node-RED. This includes any networking or interface adapter changes.

  • If you are using this node in a linux environment, using the 'All interfaces : 0.0.0.0' can be more reliable with a greater range of BACnet devices.

  • Note your broadcast address, compatibility can vary from 255.255.255.255 (all subnets) and 192.x.x.255 (locked down to your current subnet).

Resources

Contributions

This node utilises v1.0.0-beta.2 of the node-bacnet package (https://github.com/HILA-TECH/ts-node-bacstack). None of the functionality here would be possible without the fantastic work done by the contributors of that project, and the original node-bacstack implementation (https://github.com/fh1ch/node-bacstack).

License

This project is under the MIT license agreement. For more details, see the LICENSE file.

edge-bacnet's People

Contributors

bitpool-dev avatar dblanchie avatar ravz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

edge-bacnet's Issues

Discovery not able save

Describe the bug
Discovery works fine but it cannot save due to config file not existing to begin with. Had to manually place and empty file in the directory to be able to save.

To Reproduce
Steps to reproduce the behavior:

  1. Running on Windows.
  2. No Docker container. Just node-red.
  3. Import Read-Discover example.
  4. Trigger discovery.
  5. Errors visible in Node-red console or log file.
    Store_Config writeAccess error found: [Error: ENOENT: no such file or directory, access 'C:\Users\NAME\Documents\sandbox\edge-bacnet-datastore.cfg'] {
    errno: -4058,
    code: 'ENOENT',
    syscall: 'access',
    path: 'C:\Users\NAME\Documents\sandbox\edge-bacnet-datastore.cfg'

Expected behavior
Should create file if not exists. At least in Windows, fs.access(W_OK) returns error if file not there.

Screenshots
This shows discovery works.
DiscoveryWorks

System Information (please complete the following information):

  • Windows11 Pro
  • Node-RED version: v3.1.3
  • NodeJS version: v20.11.0

Are you running Node-RED in a docker container or directly on the operating system or virtual machine?
No. Just on the OS.

Please provide a dump of the Node-RED error log with the Error logging and Device Found check box options enabled (found in gateway node - Discovery tab) if applicable:
See error above. Output was in console.

Additional context
Add any other context about the problem here.

"Read" no longer work after node-red restart

Hi,

While testing the flow following the youtube tutorial, the read function no longer works properly after restart of the node-red.

The gateway is finding my devices
image
but the read function is empty, even though it says 2 devices found
image

Any ideas on how to troubleshoot?
I'm currently testing it on Win10 virtual machine before implementing it on an edge device. After the issue occur I tried it on freshly installed node-red on my local machine, but there it cannot even find the devices.
image

Bug: MAX_PRES_VALUE and MIN_PRES_VALUE is not working

Hi guys,
The MAX_PRES_VALUE and MIN_PRES_VALUE variables in objects in is not working.
Do you think it will possible for you to fix it if you have time ^^ ?
I don't know if this data is used very much :)
Sincerly,
Simon

Couldn't read 'Object List' count on YABE

Hello, thank you very much for your tools.
I have a problem when I make the flow by default:
image-1
image

I get this error when I try to access the objects on YABE:
Capture d'écran 2024-05-15 103612

I modified the line :

that.bacnetClient.client.readPropertyResponse(data.address, data.invokeId, objectId, data.request.property, responseObj);

by :
that.bacnetClient.client.readPropertyResponse(data.address, data.invokeId, data.request.objectId, data.request.property, responseObj);

And on YABE I have no more problems... How can we fix this?

cannot write some value

the Product is very nice..
but it have some bugs i think..
i can read data without problems but it is not possible to write any Data!

and also some crazy stuff happend when i go with the standard settings
from time to time the Devices goes offline and come online, the complete devices are gone and so on...
after a time it was showing me 0 Devices, all devices are gone and come not back...
after i uninstall and install the edge-bacnet new in nodered it found all the devices again...

i think the problem comes when i test to write someting, and writing is not working....
when i was looking with yabe the devices was always perfectly online with no problems
only edge-bacnet have this problem was lost always the connection of devices...

i change now in the Gateway Node some settings in Device Discover Frequency and Object Discover Frequency to a higher value
and now look better > it lost no connections anymore at the moment....

but the biggest problem is it is not possible to write some Values!!

gives here a solution to bring write a value working, or comes a update for this problen in the next time?

Thanks for your nice work

Benny

Buffer Overflow When Reading Device

Describe the bug
After running a poll devices, the system gives errors on most of objects on the device - a total of 13 are imported of the 1554 objects on this device.

For further information this issue may be related to #11 as this system is also on a PXG3.L router, with the device being on a LonTalk network. Three of the other four devices on this router all read perfectly, with one other giving the same issues.

image

The device being interrogated is a PXC100.D
image

The other problem device is a PXC12.D with just 53 objects.

However, the other PXC12.D with 198 objects didn't give any errors at all.

To Reproduce
Steps to reproduce the behavior:
Suspect this is device specific, YABE exports available if required.

Expected behavior
Device is added into your brilliant UI and then we can add objects to be read.

Screenshots

This is the error as seen from wireshark.
image

When the read (eventually) completes, the device we are trying to work on has an exclamation next to it.

image

System Information (please complete the following information):

  • OS: Windows 11
  • Browser Chrome
  • Version 1.2.6
  • Node-RED version: 3.1.0
  • NodeJS version: 20.9.0

Are you running Node-RED in a docker container or directly on the operating system or virtual machine?
Directly on the machine

Please provide a dump of the Node-RED error log with the Error logging and Device Found check box options enabled (found in gateway node - Discovery tab) if applicable:

22 Nov 21:04:55 - [warn] [Bacnet-Gateway:NR Gateway] BACnet device found: 1050625 - 192.168.1.2
22 Nov 21:04:55 - [info] [mqtt-broker:Ventana] Connected to broker: mqtt://dashboard.hvasystems.co.uk:1883
22 Nov 21:04:56 - [warn] [Bacnet-Gateway:NR Gateway] BACnet device found: 2098177 - 192.168.1.2
BACnet Error:
Error while fetching objects: Error: BacnetAbort - Reason:1 undefined
BACnet Error:
Error getting point list for [object Object] - 2098177: Error: BacnetAbort - Reason:1
at Client._processAbort (C:\Users\stewa.node-red\node_modules@bitpoolos\edge-bacnet\resources\node-bacstack-ts\dist\lib\client.js:102:40)
at Client._handlePdu (C:\Users\stewa.node-red\node_modules@bitpoolos\edge-bacnet\resources\node-bacstack-ts\dist\lib\client.js:411:22)
at Client._handleNpdu (C:\Users\stewa.node-red\node_modules@bitpoolos\edge-bacnet\resources\node-bacstack-ts\dist\lib\client.js:455:14)
at Client._receiveData (C:\Users\stewa.node-red\node_modules@bitpoolos\edge-bacnet\resources\node-bacstack-ts\dist\lib\client.js:467:18)
at Transport.emit (node:events:514:28)
at Socket. (C:\Users\stewa.node-red\node_modules@bitpoolos\edge-bacnet\resources\node-bacstack-ts\dist\lib\transport.js:13:57)
at Socket.emit (node:events:514:28)
at UDP.onMessage [as onmessage] (node:dgram:941:8)
BACnet Error:
getDevicePointList error: [object Object] Error: BacnetAbort - Reason:1
at Client._processAbort (C:\Users\stewa.node-red\node_modules@bitpoolos\edge-bacnet\resources\node-bacstack-ts\dist\lib\client.js:102:40)
at Client._handlePdu (C:\Users\stewa.node-red\node_modules@bitpoolos\edge-bacnet\resources\node-bacstack-ts\dist\lib\client.js:411:22)
at Client._handleNpdu (C:\Users\stewa.node-red\node_modules@bitpoolos\edge-bacnet\resources\node-bacstack-ts\dist\lib\client.js:455:14)
at Client._receiveData (C:\Users\stewa.node-red\node_modules@bitpoolos\edge-bacnet\resources\node-bacstack-ts\dist\lib\client.js:467:18)
at Transport.emit (node:events:514:28)
at Socket. (C:\Users\stewa.node-red\node_modules@bitpoolos\edge-bacnet\resources\node-bacstack-ts\dist\lib\transport.js:13:57)
at Socket.emit (node:events:514:28)
at UDP.onMessage [as onmessage] (node:dgram:941:8)

MST Device Not selectable in Read or Write list

In the read or write device list, my BACnet router and MSTP network both show. I am able to hit the "plus" and add the BACnet router points, however the MSTP points cannot be added. I found a work-around that if I click "add all" on the read I will get the data from the read side, however I still cannot remove individual points or add points to write to.

image

image

image

There do not seem to be any log messages associated with clicking the "plus" to add a device.

OS: Linux kernel 5.15 Raspberry Pi
Browser Firefox
Version 1.2.8
Node Red Version v3.0.2
Node JS version 16.20.2

Running Directly on the machine no vm or container.

What do the icons mean, and what determines which icon is shown?

Hello Bitpool, thanks for this project!

The discovery of my Brötje heatpump went fine. All of the 1321 objects were found. The Read node works fine. I'm still fighting with the Write node and I have currently the same problem as reported in issue #14. This issue doesn't seem to be fixed yet.
Writing from Yabe works fine.

In this context, I'm wondering what the icons mean. All of my data points have a gearwheel icon and all objects have the (R) symbol.
In your videos and documentation, I'm seeing a lot of other icons, though.
Is there any relation between the icons and the read/write properties?

This is what I'm seeing:

image

This is from one of your videos:

image

System Information:

  • BACnet Device: Brötje GTW-21 (BDR Thermea Group), BACnet certified
  • Browser: Firefox
  • Node-RED version: 3.1.6
  • Bitpoolos/edge-bacnet version: 1.2.8

I'm running Node-RED on a VM on Proxmox. I didn't use the Docker container.

Why doesn't Node-RED find the Yabe Room Simulator?

Why can't Node-RED find the Yabe Room Simulator Device 1507482?

image

Yabe does find it: (Device 1 is the GTW-21 and Device 420 is the Eco-Panel.)

image

I have no clue, though, why the Room Simulator appears on Port 63814. I didn't configure it like that (I don't even know how to...).

I tried already to set the Port in the Gateway Node to 63814, but that didn't have any effect - Node-Red can still only find 2 of the three BACnet devices.

System Information:
BACnet Device: Brötje GTW-21 (BDR Thermea Group), BACnet certified
Browser: Firefox
Node-RED version: 3.1.6
Bitpoolos/edge-bacnet version: 1.2.8

I'm running Node-RED on a VM on Proxmox. I didn't use the Docker container.

Description fields not read into read list any more

Describe the bug
In newer version of the module, the description field is not present in the read list.

Example of existing install
image

Example from new install
image

The new install is clean install of v1.4.1

To Reproduce
Steps to reproduce the behavior:
Install, discover devices

Expected behavior

Description fields to be present.

Screenshots
If applicable, add screenshots to help explain your problem.

System Information (please complete the following information):

  • OS: Raspberry Pi OS
  • Browser Chromium
  • Version 1.4.1
  • Node-RED version: 4.0.2
  • NodeJS version:

Are you running Node-RED in a docker container or directly on the operating system or virtual machine?
On Pi

Please provide a dump of the Node-RED error log with the Error logging and Device Found check box options enabled (found in gateway node - Discovery tab) if applicable:

Additional context

Cannot discover devices

Hi, I'm trying to use the driver and am having issues discovering devices. Details

  • Nodered 3.1.11 running in a container, network is configured for host.
  • OS is Ubuntu 20.04.
  • I have two network interfaces on the device, both of which are connected to networks. One network is connected to the internet and the other one is connected to an internal network with my bacnet devices.

The device discovers itself but nothing else. I have another software (skyspark) that I also run in a container on that device and it is able to discover the devices (I don't run skyspark and node red at the same time). I've tried setting the network interface to every option but still nothing.

Please let me know what else I can provide.

DietPi File access issue

Describe the bug

First of all, many thanks for an absolutely amazing BACnet tool.

Only one device is listed to add in the read list (there are 7 on a windows install on the same network) - see the error log. I assume the file "edge-bacnet-datastore.cfg" may need creating or permissions changing on the OS.

image

find . -type f -name "edge-bacnet-datastore.cfg" did not find the file present.

This issue does not happen on a MS windows install.

This is from the windows install
image

To Reproduce
Inject discovery into gateway

Expected behavior
All 7 devices present in read list.

Screenshots
If applicable, add screenshots to help explain your problem.

System Information (please complete the following information):

  • OS: [e.g. iOS] DietPi 8.24.1
  • Browser - Chrome
  • Version [e.g. 1.2] 1.2.6
  • Node-RED version: 3.1.0
  • NodeJS version: v21.2.0

Are you running Node-RED in a docker container or directly on the operating system or virtual machine?
Directly on the machine

Please provide a dump of the Node-RED error log with the Error logging and Device Found check box options enabled (found in gateway node - Discovery tab) if applicable:

Nov 22 12:29:15 DietPi node-red[1079]: 22 Nov 12:29:15 - [warn] [Bacnet-Gateway:NR Gateway] BACnet device found: 1050625 - 192.168.1.2
Nov 22 12:29:25 DietPi node-red[1079]: Store_Config writeFile error: [Error: EACCES: permission denied, open 'edge-bacnet-datastore.cfg'] {
Nov 22 12:29:25 DietPi node-red[1079]: errno: -13,
Nov 22 12:29:25 DietPi node-red[1079]: code: 'EACCES',
Nov 22 12:29:25 DietPi node-red[1079]: syscall: 'open',
Nov 22 12:29:25 DietPi node-red[1079]: path: 'edge-bacnet-datastore.cfg'
Nov 22 12:29:25 DietPi node-red[1079]: }
Nov 22 12:29:35 DietPi node-red[1079]: Store_Config writeFile error: [Error: EACCES: permission denied, open 'edge-bacnet-datastore.cfg'] {
Nov 22 12:29:35 DietPi node-red[1079]: errno: -13,
Nov 22 12:29:35 DietPi node-red[1079]: code: 'EACCES',
Nov 22 12:29:35 DietPi node-red[1079]: syscall: 'open',
Nov 22 12:29:35 DietPi node-red[1079]: path: 'edge-bacnet-datastore.cfg'
Nov 22 12:29:35 DietPi node-red[1079]: }

Additional context
Add any other context about the problem here.

Read list doesn't seem to be updated properly

The Read Node of my flow polls a data point (Algorithm Type) that I had removed from the Read List several deployments ago. Another value in the Read List (varZoneTRoomSetpoint-3_AI_2126) is not getting polled.
Could there be an issue in updating the Read List?

See the screenshot below:

image

System Information:

  • BACnet Device: Brötje GTW-21 (BDR Thermea Group), BACnet certified
  • Browser: Firefox
  • Node-RED version: 3.1.6
  • Bitpoolos/edge-bacnet version: 1.2.8

I'm running Node-RED on a VM on Proxmox. I didn't use the Docker container.

Test bug for linux VM

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

System Information (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 1.2]
  • Node-RED version:
  • NodeJS version:

Are you running Node-RED in a docker container or directly on the operating system or virtual machine?

Please provide a dump of the Node-RED error log with the Error logging and Device Found check box options enabled (found in gateway node - Discovery tab) if applicable:

Additional context
Add any other context about the problem here.

Create a sub-device

I'm relatively new to the Bacnet protocol but I was wondering if there's a way to do something like this :
image
with your node, or is specific equipment required?

Unclear How to write to object

Firstly, great effort on this, stumbled across this and being able to demo data logging based on Bacnet objects is great!

I am trying to get a setpoint to write and it is not overally clear on how to write a value to the system.

In the inject node I have placed this into poll and given the value I need to change the value for. In this example setting the value to 26
image

In the write list I have selected the object I would like to write to
image

and in the properties i have selected unsigned_Int
image

Every time the value is injected the debug output shows underfined
image

I have tried adding in the message topic the reference to the object name as you can have more than one object in the write list.

Can you explain who the values are meant to be populated into the write node and if you have more than one object selected how to write to the different objects or if you have to use seprate write nodes for each object you are going to write to.

Thank you again for you work in this.

missing edge-bacnet-datastore.cfg

I'm seeing this error on first install of the node

Read_Config_Sync error: Error: ENOENT: no such file or directory, open 'edge-bacnet-datastore.cfg'
    at Object.openSync (node:fs:601:3)
    at Object.readFileSync (node:fs:469:35)
    at Read_Config_Sync (/home/rav/.node-red/node_modules/@bitpoolos/edge-bacnet/common.js:232:15)
    at new BacnetClient (/home/rav/.node-red/node_modules/@bitpoolos/edge-bacnet/bacnet_client.js:33:41)
    at new BitpoolBacnetGatewayDevice (/home/rav/.node-red/node_modules/@bitpoolos/edge-bacnet/bacnet_gateway.js:78:27)
    at Object.createNode (/home/rav/.nvm/versions/node/v18.16.1/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/util.js:90:27)
    at Flow.start (/home/rav/.nvm/versions/node/v18.16.1/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:206:48)
    at start (/home/rav/.nvm/versions/node/v18.16.1/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/index.js:394:33) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: 'edge-bacnet-datastore.cfg'
}

Read Node not showing devices

Only shows count. No errors in the log file. I was able to have discovery save the config (see other bug reported today). I can even export it or import config.

OS: Windows11 Pro
Browser: Edge
ReadDoesNotListDevices

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.