npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@episensor/epi-bacnet

v1.1.0

Published

A comprehensive set of BACnet nodes for Node-RED and EpiSensor Edge

Readme

EpiSensor BACnet Nodes for Node-RED

A comprehensive set of BACnet nodes for Node-RED and EpiSensor Edge.

Overview

This package provides a set of nodes for interacting with BACnet devices:

  • BACnet Gateway: Manages the BACnet client and server
  • BACnet Read: Reads values from BACnet devices
  • BACnet Write: Writes values to BACnet devices

Installation

npm install @episensor/epi-bacnet

Usage

BACnet Gateway

The BACnet Gateway node manages the BACnet client and server. It provides the following functionality:

  • Device discovery
  • Device management
  • BACnet server (optional)

BACnet Read

The BACnet Read node reads values from BACnet devices. It provides the following functionality:

  • Read property values
  • Read multiple properties
  • Read object lists

BACnet Write

The BACnet Write node writes values to BACnet devices. It provides the following functionality:

  • Write property values
  • Set priorities

Example Flows

Example flows are provided in the test/flows directory:

  • bacnet-interface-test.json: A comprehensive dashboard for monitoring and controlling a BACnet device
  • bacnet-simple-test.json: A simple flow for testing BACnet connectivity
  • bacnet-test-flow.json: A basic flow for testing BACnet read and write operations
  • bacnet-test-flow-http.json: A flow that exposes BACnet operations via HTTP endpoints

To import a flow:

npm run test:manual:import

Testing

For comprehensive testing information, see test/README.md.

Test Suite Overview

| Test Type | Description | Command | |-----------|-------------|---------| | Unit Tests | Tests for individual functions and components | npm run test:unit | | Integration Tests | Tests for node initialization and interaction | npm run test:integration | | End-to-End Tests | Tests for full flows and HTTP endpoints | npm run test:e2e | | All Tests | Run all test suites | npm run test:all | | Manual Test Environment | Set up a persistent Node-RED environment for manual testing | npm run test:manual |

Unit Tests

| Component | Tests | Description | |-----------|-------|-------------| | BACnet Gateway | 10 | Tests for gateway node initialization and configuration | | BACnet Read | 8 | Tests for read node functionality | | BACnet Write | 8 | Tests for write node functionality | | BACnet Discovery | 5 | Tests for device discovery functionality | | Utility Functions | 12 | Tests for helper functions and utilities |

Integration Tests

| Component | Tests | Description | |-----------|-------|-------------| | Node Initialization | 3 | Tests for proper node registration and initialization | | Gateway Configuration | 4 | Tests for gateway node configuration and validation | | Device Discovery | 2 | Tests for device discovery process | | Error Handling | 3 | Tests for proper error handling in nodes | | HTTP Endpoints | 3 | Tests for admin HTTP endpoints |

End-to-End Tests

| Component | Tests | Description | |-----------|-------|-------------| | Flow Deployment | 2 | Tests for deploying flows with BACnet nodes | | Node Interaction | 3 | Tests for interaction between BACnet nodes | | HTTP API | 2 | Tests for HTTP API endpoints |

Manual Test Environment

For manual testing and debugging, you can set up a persistent Node-RED environment with the BACnet nodes installed:

# Start a basic Node-RED environment with BACnet nodes
npm run test:manual

# Reset flows and start Node-RED
npm run test:manual:reset

# Import a test flow and start Node-RED
npm run test:manual:import

The Node-RED editor will be available at http://localhost:1881 (or the next available port if 1881 is in use).

Features of the Manual Test Environment

  • Persistent Node-RED instance that doesn't shut down after tests
  • BACnet nodes pre-installed and ready to use
  • Option to import test flows for quick testing
  • Automatic port selection if the default port is in use
  • Logs available at test-env/node-red/node-red-output.log

Stopping the Manual Test Environment

To stop the Node-RED instance:

# Stop any running Node-RED instances
npm run test:manual:stop

Repository Structure

  • bacnet_gateway.js and bacnet_gateway.html: BACnet Gateway node
  • bacnet_read.js and bacnet_read.html: BACnet Read node
  • bacnet_write.js and bacnet_write.html: BACnet Write node
  • bacnet_client.js: BACnet client implementation
  • bacnet_server.js: BACnet server implementation
  • common.js: Common utilities
  • resources/: Resources for the nodes
  • icons/: Icons for the nodes
  • scripts/: Utility scripts
  • test/: Test files
    • unit/: Unit tests
    • integration/: Integration tests
    • e2e/: End-to-end tests
    • flows/: Example flows
    • manual/: Manual test scripts
    • helpers/: Helper functions for tests
  • test-env/: Self-contained test environment

Recent Improvements

  • Fixed tests to handle null nodes properly
  • Added flow import tests
  • Increased timeouts for tests to prevent flaky failures
  • Added manual test environment with scripts for setup and management
  • Fixed E2E tests to properly handle message formats
  • Improved error handling in tests
  • Added more detailed logging to help with debugging
  • Fixed integration tests to properly handle error events
  • Added automatic port selection for the manual test environment
  • Improved documentation for test environment setup

License

MIT