GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - chipkin/BACnetServerExampleTypeScript: A BACnet Server Example written in TypeScript using the CAS BACnet Stack

BranchesTags
Open more actions menu

Latest commit

 

History

6 Commits
6 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
README.md
README.md
 
 
app.ts
app.ts
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

BACnet Server Example in TypeScript

A BACnet Server Example written in TypeScript using the CAS BACnet Stack. This is a basic server example and does not include all of the functionality of the CAS BACnet Stack. See BACnetServerExampleCPP for a full featured example.

Use the Chipkin BACnet Explorer to discover this device.

Supported CAS BACnet Stack Version

This example project uses version 5.1.0.2541-21 of the CAS BACnet Stack

Building

NPM login to Chipkin Gitlab instance for the CAS BACnet Stack.

echo @chipkin:registry=https://gitlab.com/api/v4/packages/npm/ >> .npmrc
npm i typescript --save-dev
npm install
npm run start

Device

When discover the BACnet device should have the following object types

  • Device: 389055 (CAS BACnet Stack TypeScript Example)
    • Analog Input: 0
      • Object Name: "AnalogInput Bronze"
      • Present Value: Updates every 30 seconds by 1.1
    • Analog Value: 2
      • Object Name: "AnalogValue Diamond"
      • Present Value: Writable
    • Binary Input: 3
      • Object Name: "BinaryInput Emerald"
    • Binary Value: 5
      • Object Name: "BinaryValue Gold"
      • Present Value: Writable
    • MultiState Input: 13
      • Object Name: "MultiStateInput Hot Pink"
    • MultiState Value: 19
      • Object Name: "MultiStateValue Kiwi"
      • Present Value: Writable
    • Network Port: 56
      • Object Name: "NetworkPort Vermilion"

Supported Services

The following services are supported in this example. Other serviecs are avalaible in the CAS BACnet Stack

  • Read Property
  • Read Property Multiple
  • Write Property
  • Write Property Multiple
  • Subscribe Cov
  • Device Communication Control
  • Subscribe Cov Property
  • Subscribe Cov Property Multiple

Example Output

FYI: BACnet Server Example in TypeScript Version: 1.0.0
FYI: https://github.com/chipkin/BACnetServerExampleTypeScript
FYI: CAS BACnet Stack Version: 5.1.0.2541-21
FYI: Setting up callback functions...
FYI: Setting up bacnet device...
FYI: Setting up bacnet database with values...
FYI: Connecting UDP to port: 47808, networkPort.ip: 192.168.2.59, networkPort.broadcastAddress: 192.168.2.255
FYI: Starting main program loop...
FYI: UDP.Server listening 192.168.2.59:47808
Received message from: 192.168.2.31:47808, messageLength: 17
GetPropertyEnumerated deviceInstance: 389055, objectType: 3, objectInstance: 3, propertyIdentifier: 85, useArrayIndex: false, propertyArrayIndex: 0
Sending message to: 192.168.2.31:47808, messageLength: 20
Received message from: 192.168.2.31:47808, messageLength: 19

Notes

The value is not defined in the database

The CAS BACnet Stack requests a value for all requested properties using a CallBackGetProperty function. If that callback function returns a false. A default will be used. It is normal to have The value is not defined in the database warnings as the default will be used for these properties.

Example:

GetPropertyUnsignedInteger deviceInstance: 389055, objectType: 8, objectInstance: 389055, propertyIdentifier: 62, useArrayIndex: false, propertyArrayIndex: 0
The value is not defined in the database.

About

A BACnet Server Example written in TypeScript using the CAS BACnet Stack

store.chipkin.com/services/stacks/bacnet-stack

Topics

bacnetbacnet-ipbacnet-servercas-bacnet-stack-exampleexampletypescript

Resources

Readme
Activity
Custom properties

Stars

1 star

Watchers

3 watching

Forks

0 forks
Report repository

Releases

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.