Giter Club home page Giter Club logo

advantagetrack's Introduction

AdvantageTrack

AdvantageTrack is an attendance system built to combine a manual sign-in interface with automated tracking of student and mentor devices. Data storage and analysis are handled using Google Sheets, updated by the local Python server. The server runs a local web app for sign-ins & status, and it monitors the active devices on the local network using intermitent flood pings. Each team member can opt-in to the automatic tracking by registering their device's MAC address with the system.

The local server can run on Linux, Windows, or macOS. No special hardware or network access is required for automatic monitoring. The frequency of flood pings is configurable, though it requires a network where ICMP echo requests are allowed. Both iOS and Android currently use randomized MAC addresses by default, but the system will guide users through disabling this feature for a single network (meaning there is no impact to device security on other networks). This step is required because both operating systems will reset the MAC address used on a network under some conditions.

Screenshot #1

More Screenshots

Screenshot #2

Screenshot #3

Installation & Setup

  1. Set up a Google Cloud Project using these instructions.

  2. In Google Drive, make a copy of this Google Sheet and create a new folder for background images. Share these items to the service account email from your Google Cloud Project (the folder requires at least view access and the sheet requires at least edit access).

    • Note: The provided spreadsheet uses eastern time by default. You can update the time zone under "File" > "Settings" > "Time zone". This time zone must match the selected time zone on the local server for the system to function properly.
  3. Check the configuration in the "Config - General" sheet (hover over each key for a detailed explanation). In particular, make sure to update the IP address range and background folder ID. You can also update the list of registered people in the "Config - People" sheet. Note that the some of the sheets include sample rows. Don't delete these rows during setup; they are required for the server to correctly update the sheets.

  4. Add some JPEG or PNG images to the backgrounds folder. These will be automatically downloaded by the server (and updated periodically).

  5. Clone the AdvantageTrack repository to the device which will run the server (Linux, Windows, or macOS). We recommend using a dedicated device for this purpose, such as a Raspberry Pi.

  6. Copy the JSON credentials from the Google Cloud Project to the following path: AdvantageTrack/data/google_credentials.json

  7. Update the SPREADSHEET_ID at the top of the main.py script. This is the Google Drive ID of the main AdvantageTrack spreadsheet (the last part of the URL).

  8. Ensure that the following tools are installed and available on your PATH:

  9. Install the Python dependencies. We recommend using a virtual environment for this purpose:

Linux/macOS

python -m venv venv
source ./venv/bin/activate
pip install -r requirements.txt

Windows

python -m venv venv
venv\Scripts\activate.bat
pip install -r requirements.txt
  1. Launch the main.py script in the virtual environment and navigate to http://127.0.0.1:8000 in a browser. The status of the system will be displayed at the bottom of the page. If the background folder was linked correctly, your custom images will appear on this page once the downloads finish (a default set will be used temporarily).

  2. If desired, configure the OS to automatically log in, start the main.py script, and open a browser.

Development

The code is formatted using the Python and Prettier VSCode extensions (recommended for this workspace). Python is configured with autopep8 while HTML, CSS, and JS use Prettier.

The server functionality is divided into Python modules at the root level (launched from main.py). All of the HTML, CSS, and JS code is under the www folder.

The server interfaces with Google Drive using gspread and the official Google Python API. The web server uses CherryPy with ws4py. Most communication between the web server and browser runs over a WebSocket connection. The monitoring system invokes fping and arp using subprocess (it can also be disabled for testing using the ENABLE_MONITOR constant in main.py).

advantagetrack's People

Contributors

jwbonner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

advantagetrack's Issues

Unable to get main.py to open google sheet

Thank you for creating this and making it open to other teams.

We are trying to get it running on a windows PC and having trouble getting it to connect to the google drive sheet.

The sheet is shared with the service account and we believe we have followed all the directions.

image

Any suggestions on how to fix this?

Separate note that we don't think is relevant yet:
Getting fping for windows was a little weird, is their a binary you recommend? We are using the one from here - https://www.softpedia.com/get/Network-Tools/IP-Tools/Fping.shtml

Windows Flood Ping not working

Made a new issue so we can track them better.

fping doesn't appear to be working on windows.

We are using the binary from here - https://www.softpedia.com/get/Network-Tools/IP-Tools/Fping.shtml

It's added to the path on the machine. I can ping my phone directly with it from the command line.

The google sheet IP start and end addresses have been updated and are correct for our network (10.100.0.1,10.100.1.254).

The current errors looks like this
image

Do you have an example of what the fping command that AdvantageTrack looks like, so I can test it directly in the command line?

Timezone change?

Is there a coinvent way to change the time zone, we couldn't find it in any of the obvious places?

Feature Request: Bar code scanning?

We have been testing out AdvantageTrack for about a week, and it's been working well for some users but not for others.

The main issue seems to be that since we are in a school with overlapping wifi networks, some students' devices will switch off the team network and onto the school-wide network, and it will stop tracking their time.

The manual sign-in and out feature does work for them, but it is a little slow if we have a lot of people entering at one time.

Is it possible to add the ability for the system to sign people in and out with a barcode reader?

If this isn't something you all would want to develop, we may have people that can help, but we would love some pointers to where something like this would be implemented in the AdvatageTrack software.

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.