Git Product home page Git Product logo

tankcontrollermanager's Introduction

Tank Controller Manager

The Tank Controller Manager (TCM) works to monitor, operate, and consolidate multiple tank controllers. A tank controller regulates tank pH through CO2 addition and temperature. The purpose of the TCM is to allow over-the-network access to tank controllers while facilitating research by reporting data. Created in Flutter with the programming language Dart, the TCM runs on virtually every main platform.

Deployment

The web application is built automatically on each commit to main and can be viewed here.

Web

  1. Open a terminal and run
flutter build web
  1. Navigate to TankControllerManager/build/web and run
python -m http.server 8000

Android

Signed Appbundle

https://docs.flutter.dev/deployment/android

  1. Open a terminal and run
keytool -genkey -v -keystore c:\key.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 1000 -alias upload
  1. Create a file named TankControllerManager/android/key.properties and in it
storePassword=<password from step one>
keyPassword=<password from step one>
keyAlias=<alias from step one>
storeFile=<location of output from step one, may require double backslashes '\\' in file path, c:\\key.jks>
  1. Run
flutter build appbundle

Unsigned APK

  1. Open a terminal and run
flutter build apk --split-per-abi

Debugging

  1. Ensure Android Studio, Android SDK, Android SDK Platform-Tools, and Android SDK Build-Tools, are all updated. Run
flutter doctor
  1. Enable developer options and USB debugging on the device.
  2. Once plugged in, run
flutter devices
  1. Finally run
flutter run -d deviceID

Contributors

All Contributors

tankcontrollermanager's People

Contributors

3dcameron avatar allcontributors[bot] avatar dependabot[bot] avatar je-foster avatar jgfoster avatar kaelanwillauer avatar prestoncarman avatar suocesky avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

tankcontrollermanager's Issues

Implement async data import with Django-Q

Setup instructions here.

Make load_data an asynchronous method, and schedule it to be run every 15 minutes in addition to whenever a device's data is requested.

Include a “downloading” field on the device to act as a lock so multiple refresh requests cannot be made simultaneously

Refactor load_data()

Use recursion instead of nested loops, and improve error reporting by returning a dictionary of each unsuccessfully retrieved file and the error it produced

Create basic time series page

For now, this page will only allow generation of time series using any of the predefined functions (hold, ramp, or sine), as well as removal of time series. In the future, WYSIWYG time series creation, including time series consisting of custom points, will be possible.

Make notes optional on the "Add Device" page

Currently the notes field is required by the backend, but the UI does not require it. If left blank, the error message says something went wrong when creating the device. Not a helpful message.

Configure NGINX

Serve the oa_frontend/dest directory, and also proxy the backend.

Make refresh only retry missed paths

The current refresh functionality just restarts at the first path that failed on the last refresh, then visits all subsequent paths. This is very inefficient; we should only visit the previously missed paths before moving on to new paths.

Rework locking mechanism for scheduled tasks

Django Q's Schedule does not create a Task object until after the task has finished executing, so we need to find another way to lock while still allowing the lock to be released in the event of a system failure. Consider making the lock a boolean, then releasing all locks whenever the server is restarted.

Separate CSV requests by page

Wait until #4 is complete.

Instead of requesting the entire CSV from the device (which results in a timeout), do so by pages of 100 lines, and stop once a 416 code is returned.

Replace ping with MAC address verification

This is to ensure that we are always working with the same device in order to avoid data conflicts.

Replace Device “online” field with “status” field, which can contain one of the following:

  • 0 = Device is offline
  • 1 = MAC address in DB matches MAC address returned by device
  • 2 = MAC address in DB does not match MAC address returned by device

Update device status icon in the frontend to reflect this change.

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.