Skip to content

This is the group project assigned by DigitalCrafts. Noel Honeybourne, Claudia Ling and me made it as a team. The goal of this app is to collect temperature and humidity data from sensors placed in Noel's house, and display them in charts. You can check the temp/humidity in different room or on different date.

License

Notifications You must be signed in to change notification settings

ziqingW/climate-control-system-monitor

 
 

Repository files navigation

Home Climate Control Monitor

Do you feel like a certain rooms in your home are always much warmer/cooler than the rest of the house?
Want to know how effective your HVAC system is at maintaining a specific temperature in the summer or winter?

Home CC Monitor is a real-time IoT monitoring application for home climates that addresses these questions. It retrieves data from sensor nodes throughout a house over a RESTful API and stores the data in a database. The front-end allows one to easily analyze the temperature variations per room via historical data visualization, as well as monitor live temperature and humidity status of each sensor node. The project will ultimately provide a low-cost solution to evaluating the efficiency of one's HVAC system.


Minimum Viable Product

  • Maintain a database of organized temperature data from an API feed which is displayed on the front-end.
  • Visualization of current temperature data per room.
  • Visualization of historical temperature data.

The project consists of minimal hardware and full stack deployment of Python/Javascript/jQuery/PostgreSQL.

Stretch Goals

  • Compare overall data to local weather conditions using a local weather API.
  • Create customizable alerts for rooms that exceed or fall below set values.
    • Integrate alerts with IFTTT Service
  • Make the application scalable using unique ID’s and passwords for multiple users.
  • Create a mobile friendly front-end.
  • Create more complex Javascript functions to analyze historical temperatures logs and predict home climate or further quantify temperature deviations.

Installation

The project uses Pipenv to manage following Python libraries in a virtualenv:

$  pipenv install requests tornado queries jinja2 arrow

We chose to use ThingSpeak's REST API service to publish and retrieve data. An API Key is needed to make GET and POST requests to a private channel. Documentation can be found here.

An SQL database needs to be setup with columns for datetime and each additional field of sensor data. For example:

CREATE TABLE home_monitor (
  id SERIAL NOT NULL PRIMARY KEY,
  created TIMESTAMP WITH TIME ZONE,
  bedroom_temp NUMERIC,
  bedroom_humidity NUMERIC,
  livingroom_temp NUMERIC,
  livingroom_humidity NUMERIC
);

The Python script at cron_jobs/get_latest.py is run every 30 minutes by adding the following job to crontab:

*/30 * * * * cd /home/username/climate-control-system-monitor && /path/to/pipenv run python3 cron_jobs/get_latest.py

where get_latest.py and pipenv are full paths. The script retrieves updated data from ThingSpeak's API, inserts it into the database, and generates a JSON file in the monitor/static/json/ directory


Update Notes

2018-07-29
Updated Tornado server file, page js file and related html file to make them compatible with json file instead of database value

Built With

bootstrap icon Bootstrap  |  css3 icon CSS3  |  NGINX NGINX  |  matlab icon ThingSpeak

html5 icon HTML5  |  javascript icon JavaScript  |  jinja icon Jinja2  |  jquery icon jQuery

Highcharts icon Highcharts  |  postgresql icon PostgreSQL  |  python icon Python 3  |  tornado icon Tornado


Hardware:

About

This is the group project assigned by DigitalCrafts. Noel Honeybourne, Claudia Ling and me made it as a team. The goal of this app is to collect temperature and humidity data from sensors placed in Noel's house, and display them in charts. You can check the temp/humidity in different room or on different date.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 35.0%
  • JavaScript 26.5%
  • HTML 23.4%
  • Python 15.1%