Giter Site home page Giter Site logo

zabealbe / pureair Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 3.34 MB

Global scale air quality monitoring system with custom hardware sensors package

Home Page: https://gitlab.com/huawei-harmonyos-hackathon/submissions/team13/pureair

License: Other

Dockerfile 0.55% Shell 2.31% Python 45.69% CSS 0.24% HTML 26.25% JavaScript 5.54% Rust 19.42%

pureair's Introduction

Pure Air

Air quality monitoring system.

Pure Air is our project submission to the IoT HarmonyOS Hackathon organized by Huawei, getting awarded 2nd place in Europe.

The software stack is designed to be horizontally scalable through kubernetes, both Frontend and Backend are stateless and designed as a microservice that can be deployed in a container.

Getting started

Run our web stack with:

docker-compose up

You can now view the web ui with http://localhost:12380

Once everything is up and running you can start sending data with your Pure Air IOT device, check out Hardware to find the sources on how to build one.

Frontend

Composed of a Private area and a Private area and a Public area.

Private area Public area
Private area Public area

The private area empowers the user by giving him useful insights to make educated decisions, such as suggestsing the house ventilation schedule by fetching sensor data from the Pure Air APIs.

The public area empowers the people by giving everyone a powerful tool to monitor the city pollution. This data can be used by the authorities to improve the well being of citizens or can be used by citizens themselves to force authorities to take action.

Backend

Based on Swagger and OpenAPI and meant to be scalable through container-based replication systems such as kubernetes.

  • Three private APIs endpoints for the user private area

  • Public API endpoint http://[BACKEND_URL]/v1/getPollutionInfo for third parties to build upon, easing the integration process by using the standard format GeoJSON

Backend

Home assistant

We empower the user by providing home assist integration that can be used in conjunction within a smart home in a domotic environment.

Backend

Database

MongoDB is our database, flexible enough and optimized for our needs is able to perform fast GeoJSON data queries using its 2dsphere geospatial index

For testing purposes we created a populator script to create, fill and index the database.

Hardware

The board used for the project is a nodemcu with an esp32 microcontroller.

The following sensors are used to obtain the reads:

  • Two ds18b20 for indoor and outdoor temperature measurements
  • A MQ-135 sensor for indoor CO2 measurement
  • A PM2.5 detector PPD42NS for outdoor pollution levels

To communicate between the internal and external modules, a normal RJ11 cable can be used, with the following setup:

  • Red wire -> 5v
  • Black wire -> GND
  • Yellow wire -> Temperature sensor one wire bus
  • Green wire -> LO-time dust sensor signal

Firmware

The firmware is written in Rust, a powerful, fast and secure language that can target the esp32 chipset, with a full standard library support.

Rust has also a huge set of libraries, all open-source and hosted on crates.io, this allows faster code writing, while having much better safety than other low-level languages such as C or C++. Under the hood the Rust standard library for esp32 calls the routines of the official open-source Espressif real time os.

For information about building and running the PureAir firmware, take a look at the Hardware README

License

Apache 2.0 Copyright © PureAir team

pureair's People

Contributors

albertozurini avatar guilucand avatar zabealbe avatar

Watchers

 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.