Giter Club home page Giter Club logo

raspberry-environment-api's Introduction

Raspberry Environment aPi

API for monitoring local environment temperature, humidity, pressure, TVOC, and eCO2 on a Raspberry Pi. The sensors used are the BME280 Sensor Breakout and the SGP30 Air Quality Sensor Breakout from Pimoroni. The project aims to provide easy access to current air quality readings and an overview of past readings and tendencies using Python, SQLite, and Docker.

Endpoints

/

Links and descriptions of the different endpoints

/sensors

Readings from the sensors: temperature in degrees Celsius (°C), relative humidity percentage (%), pressure in hectopascal pressure units (hPa), CO2 in parts-per million from 400-60,000 (ppm), total volatile organic compounds in parts-per billion 0-60,000 (TVOC in ppb), and CPU temperature in degrees Celsius (°C).

/average

The average of all readings saved in the database.

/min-max

The minimum and maximum values for all sensor readings saved in the database.

/measurement-info

The timestamp (UTC) for the first and the latest sensor reading saved in the database along with the number of total readings saved.

/temperature

The temperature in degrees Celsius (°C).

/humidity

The relative humidity percentage (%).

/pressure

The pressure in hectopascal pressure units (hPa).

/tvoc

The total volatile organic compounds in parts-per billion (TVOC in ppb).

/eco2

CO2 value in parts-per million (ppm).

/cpu-temp

The CPU temperature of the Raspberry Pi in degrees Celsius (°C).

Docker

Build and run using docker

docker build -t r-api .

docker run –p 80:80 --device /dev/i2c-1 --volume {PWD}/sqlite_db:/sqlite_db r-api

Links

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.