Proj-2013-2014-SmartCitizen2014

= Introduction = Project SmartCitizen 2014

= Team =


 * Tutors : Didier Donsez, Vivien Quema, Jérome Maisonnasse, Amr Alfayi


 * Members : Paul Labat, Rodolphe Fréby


 * Departement : RICM 4, Polytech Grenoble

= Introduction = Project SmartCitizen 2014

Software Requirements Specification (SRS)

= Project objectives =

= Progress =

Week 1 : January 13th - Janurary 17th

 * Project discovery
 * Finding some ideas
 * Research on MQTT
 * SmartCitizen Website

Week 2 : January 20th - Janurary 24th

 * Installation of Node-red
 * Getting started with mongodb
 * Getting started with mosquitto in python

Week 3 : January 27th - January 31th

 * Update Intel Galileo
 * Switch to Arduino Leonardo
 * Arduino code for MQ4 sensor and Microphone Sound Detection Sensor Module for Arduino
 * Python code with MQTT to gather data from the MQ4 sensor, the sound detector and the geiger counter in order to send them to a server with MQTT

Week 4 : February 3rd - February 7th

 * Code arduino for the ENC28J60 Ethernet LAN / Network Module
 * Add a python script to the MQTT-panel in order to generate the index.html webpage from a JSON file. This file contains all the MQTT sensors that have to be displayed on the webpage.

Week 5 : February 10th - February 14th

 * Started to look at the leafletjs library in order to make the website from OpenStreetMap
 * Started to send data from the arduino to a MongoDB database. We get some issues with the types of data sent (string but we wanted float)

Week 6 : February 17th - February 21st

 * Beginning of query to the database in PHP
 * Research about mongoDB storage with node-red

Week 7 : February 24th - February 28th

 * First attempt to use the leaflet library with NodeJs and socket.io to display the position of sensors and the data they gather.
 * Research about mongoose (mongodb object modeling for node.js) in order to store data gathered by sensors into a mongodb database.
 * We wonder whether to store data via node-red or node.js

Week 8 : March 3rd - March 7th

 * Stopping use of node-red for a node.js server.
 * Fixing some minors problems for the arduino code of MQ4 methane sensor.
 * Working on an onClick method for markers in the map.

Week 9 : March 10th - March 14th

 * Setting up a connection between map and a node.js server with WebSockets.
 * Code for the storage of sensors values getting back by MQTT into mongoDB with mongoose.
 * Reflection of the database structure.

Week 10 : March 17th - March 21st

 * Code for the storage of sensors into mongoDB (for any new sensor).
 * Attempt to query the database with mongoDB.
 * Deletion of the code for the marker's display on the map. The old version could only display dynamics values, without history. Now we want to display all existing sensors which are into the database.
 * Research about DHT11 sensor in order to add it.

Week 11 : March 24th - March 28th

 * We managed to query the mongoDB database.
 * Display each sensor in the database
 * Display various informations for each sensors as well as their lastest value

Week 12 : March 31st - April 4th

 * Add a field "date" in the database "sensorsData"
 * In addition to various information, we display a graph of the 30 last values (of each sensor)
 * Layout + arduino code for DHT11
 * Attempt to run both the MQ4 and DHT11 on the same arduino board

Week 13 : April 7th - April 11th

 * Modification of the database. Add the owner and city location of the sensors.
 * Posibility to visualize all the data of each sensors by using filter : city, type, city + type and the name of the sensor.
 * Report writing
 * Preparation of the oral presentation

= Related documents =
 * Github repository : SmartCitizen
 * Leaflet.js modern open-source JavaScript library for mobile-friendly interactive maps
 * Arduino
 * Node.js
 * Mongoose
 * Morris.js Charts in Javascript
 * Twit