Giter Site home page Giter Site logo

occupancy-server's Introduction

Occupancy Server

A part of CMU Library Occupancy project. Written in Python 3.

Configuration

Configuration is read from environment variables.

XTEA-CCM Encryption

Please change both ENCRYPT_KEY and AUTH_KEY environment variables to randomly generated octets. Note that for proper encryption and authentication, two should never be the same. Same values should be used for the sniffers.

Example: ENCRYPT_KEY="74 65 73 74 74 65 73 74 74 65 73 74 74 65 73 74"

DB Settings

Change DB_URI to point to your DB. If testing locally, use sqlite:///test.local.db.

Sniffer Settings

SNIFFER_MAX_INACTIVE_TIME represents the maximum interval in seconds that sniffers should report before considered as inactive.

OCCUPANCY_UPDATE_INTERVAL represents the interval in seconds that occupancy information is updated.

PROBE_REQUEST_LIFE represents the minimum life of probe requests in DB before wiped.

Initial System Set-Up

To add locations and sniffers to the system, manual DB editing is required.

TODO: DB editing tutorial.

Deploy Instructions

Heroku

The repository is ready to be deployed to Heroku without further changes.

Locally

Copy app.local.example.json to app.local.json, modify environment variables and run python3 run_local.py. Use Ctrl-C to kill.

occupancy-server's People

Contributors

dependabot[bot] avatar gyf304 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.