Skip to content

ACE-IoT-Solutions/bacnet-device-registry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BACnet Device Manager

This is a simple FastAPI application for managing BACnet device IDs and network addresses. It provides CRUD (create, read, update, delete) endpoints for managing devices and network numbers.

The application uses SQLite for storing and managing the devices' IDs, network addresses, and network numbers.

Requirements

  • Python 3.7+
  • FastAPI
  • Uvicorn
  • SQLite

Installation

  1. Clone the repository:

bashCopy code

git clone https://github.com/your-username/bacnet-device-manager.git

  1. Install the requirements:

cssCopy code

pip install fastapi uvicorn[standard] bac0

  1. Start the application:

cssCopy code

uvicorn main:app --reload

The application will be available at http://localhost:8000.

Usage

The following endpoints are available:

  • POST /devices/: Create a new device with the specified ID, network address, and network number.
  • GET /devices/: Get a list of all devices.
  • GET /devices/{device_id}: Get a device with the specified ID.
  • PUT /devices/{device_id}: Update the network address and network number of an existing device with the specified ID.
  • DELETE /devices/{device_id}: Delete an existing device with the specified ID.
  • GET /networks/: Get a list of all unique network numbers from the devices table.
  • GET /networks/{network_number}: Get a list of all devices on the specified network.

To use the endpoints, you can use a tool like curl or httpie, or use the interactive API documentation that is automatically generated by FastAPI at http://localhost:8000/docs.

Contributing

Contributions are welcome! If you find a bug or have an idea for a new feature, please open an issue or submit a pull request.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages