GithubHelp home page GithubHelp logo

georgetownmakerhuborg / air-quality Goto Github PK

View Code? Open in Web Editor NEW
4.0 5.0 0.0 3.47 MB

An Open Source Platform For Georgetown's STIA Air Quality Courses

Home Page: https://www.coursicle.com/georgetown/courses/STIA/436/

License: Other

Python 98.52% Shell 1.48%
stia315 georgetown esp8266 d1-mini bme280 wemos lolin

air-quality's People

Contributors

cmpadden avatar fpgirard avatar simraali avatar thefestest avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

air-quality's Issues

Enter deep sleep if battery level reaches critical threshold

From the readme:

On a battery monitor when the lithium battery hits a certain threshold, enter deep sleep to prevent total depletion.

With the imminent use of battery-powered monitors, there will be a need to sleep the monitor before fully depleting the battery. It may also be a good idea to build in the capability of notifying on critical battery, so the user can go and replace/recharge the battery.

Contributing, code of conduct, and PR templates

Putting together these files and templates will go far to enable consistent community expectations and quality work.

See this and the linked project for examples of the direction I'm thinking. I'm planning on working on this myself in the coming days.

Investigate incorporating a low power GPS module

If the device was able to pull it's own GPS data, many of our use cases would be greatly simplified and we could have increased confidence in that our data is actually from the location is claims to be from.

Of course, our hardware doesn't currently support GPS, but I find it a worthy inclusion in the future. I vote for adding this to the "hardware to-do" list.

Design and implement a well defined format for logged data

With the inclusion of logging to disk with, perhaps occasional, uploads to the internet. We will want to have a well defined and easily extensible format for our data points. For example, we will want the format to always include certain base parameters such as the "serial" and timestamp, but be able to optionally include a variety of sensor parameters. Some sort JSON dictionary seems workable with these requirements and relatively easy? That's my first thought, I'd be interested in suggestions for those more knowledgeable.

Use 1.11 stable release for 905 base code

Let's base our current release to a known, stable uP release. 1.11. In the bin/build directory, place the file using the original name (esp32-20190529-v1.11.bin) and symlink it to 'up-firmware.bin' so that we don't have to constantly modify files that reference it (e.g. upload).

Report redundant sensors individually

From the readme:

We still need to either combine the results of redundant sensors or report both

This is currently in progress and being worked on (#6), I'm creating this to document the issue and be able to accumulate all of our issue tracking in one location. I'm removing these as notes in the readme.

My opinion is that it is better to report the data from each sensor even if there is redundancy.

The BME280 draws power from the 3.3v even during ESP deep sleep

From the readme:

The BME280 draws power from the 3.3v even during ESP deep sleep. Can we invoke deep sleep on sensors too prior to shutting down the ESP?

This would greatly improve our power efficiency and enable the monitor to run for a longer duration on battery power. This may very well involve circuit changes, but the need to power down all sensors to reduce draw makes the change valuable.

bme280 implementation needs a fix.

Describe the bug
BME280 implementation appears broken. How did we miss this?
lib/bme280/init.py is empty when it should provide the BME280 class.
line 16 in tph.py should read "from lib import bme280" not "from lib.bme280 import bme280".

To Reproduce
Steps to reproduce the behavior:

  1. Configure wake.py to support only tph.py
  2. upload the code.
  3. get the error "Running Sensors...
    Traceback (most recent call last):
    File "main.py", line 25, in run
    File "wake.py", line 24, in main
    File "sensors/tph.py", line 16, in
    ImportError: no module named 'lib.bme280.bme280'

Hardware Test Fails on Python 3

Describe the bug

subprocess.check_output returns bytes on Python 3, and a string on Python 2. Extracting the Chip ID was failing, as it could not parse the bytes.

To Reproduce

Run the upload.py script using Python 3.

python3 bin/upload.py --device /dev/tty.usbserial-1410

Expected behavior

Shouldn't throw an exception.

Desktop (please complete the following information):

  • OS: macOS

Robust nonsequencial serial number generation and assignment for monitors

In order to scale we are going to want to maintain a database of all devices and be able to generate serials as new ones are added to the GUAQ network. In addition to letting us count and advertise the number of active devices, this will let us more easily increase the security of our data collection down the line.

Perhaps there's a way to generate this with a hash function pulling hardware information from the chips and then checking to ensure it doesn't collide with an existing device?

Upgrade script for MacOS, Linux and Windows

The Kathmandu GUAQ has shipped without network/Wifi credentials. We will need to upgrade this unit on site. An upgrade script that uses ampy to put files to a GUAQ that has the supported micropython version (for 905, this is 1.11) is needed. If we can avoid having to use esptool to flash uP, we will reduce the number of problems.

The onsite team will have to put the unit into 'upgrade' mode to prevent a wake/sleep cycle that prohibits ampy from working properly. The other alternative is to teach this team how to use the WebREPL interface to upload specific files (like config.py).

upgrade upload to call esptool and upgrade script

I'm going to suggest that we have 2 bash scripts in the /bin directory:

  1. upload - which calls esptool to erase and reflash the esp and then calls upgrade
  2. upgrade - calls ampy and uploads all the guaq files. Upgrade takes /dev/tty... as an argument.

This will allow us to minimally disrupt our field sites by requiring that they install ampy only. Until we can get the WebREPL tested and documented better.

Pas

Transition to release tagging, development branch, and semantic version

As currently stands, all PRs and changes are merged directly into master and we don't use semantic versioning to keep track of releases.

Before any significant work continues (besides hotfixes), I recommend that we transition to a system of merging PRs into a "development" branch and then merging "development" into master after some level of formalized testing.

Additionally, I feel that would be beneficial to tag our current "release" software as some beta tag (v0.2.1?) and implement semantic versioning to keep track of who/what units have what software version to better debug and manage our distribution.

This will enable us to increase the rate of development without risking releasing untested code. Of course hotfixes, for example, could be merged otherwise and development branches could be deployed onto monitors, but in general, this will help our stability and sustainability.

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.