Skip to content

python library to utilize the BACnet stack demo exe files

Notifications You must be signed in to change notification settings

hoangdungt2/pyBACnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

pyBACnet

pyBACnet is a python library to utilize the BACnet stack demo exe files. Please download release zip to get the bin folder

Files

Contains two files which are two classes:

  • classBACNet.py: low-level to call executable files from BACnet Stack demo folder, default is ./
  • classBACobj.py: create 'object' for BACnet point (single read/write) and BACnet device (multiple read/write within the device).

Usage

Make sure you have the bin folder (download from release page), this bin folder is for Windows, the BACnet stack is from this link:

Initialization

from classBACNet import classBACNet as cbn 
from classBACobj import classBACobj as cbo

Create a BACnet object for BACnet/IP with IP address is 192.168.2.112 running on Windows

bacnetObj = cbn( type='IP', os='windows', adapt='192.168.2.112')

Create a BACnet point object to read and write

  Dev1234_AV0 = cbo( bacnet=bacnetObj,   # BACnet object
                     devid=1234,         # Device ID
                     objid=0,            # Object ID
                     objtp="AV",         # Object Type, e.g. AV,BV ...
                     prior=8)            # Priority

Read

  Dev1234_AV0.read()

Write 0.0

  Dev1234_AV0.write(value=0.0)

About

python library to utilize the BACnet stack demo exe files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages