Notice: This repository is protected with license, corporate/commercial use is restricted.
Following objective is achieved:
- For monitoring temperature sensor readings on Graphite:
No. | Operation | File name |
---|---|---|
1. | a) Read temperature readings from LMT84 temperature sensor. | read_sensor_update_server.lua |
2. | a) Read temperature sensor data from HTTP server (Node MCU). b) Trigger an E-mail if event happens |
read_sensor_trigger_email.py |
3. | a) Push Data to Graphite | feed_data_tographite.sh |
- For storing temperature readings in SQL and controlling actuator:
No. | Operation | File name |
---|---|---|
1. | a) Read temperature readings from LMT84 temperature sensor. b) Allow access of temperature with the help of REST APIs c) Allow control of actuators through Rest APIs |
rest_api_control.lua |
2. | a) Read temperature sensor data from HTTP server (Node MCU). b) Trigger an E-mail if event happens |
read_sensor_trigger_email.py |
3. | a) Push temperature Data to SQL (And control actuators on web app, plus plot the data) | push_pull_app.cpp |
- Load .lua file to node MCU.
- Compile .py file in terminal.
- Do "make all" in repository folder. It will generate pull_push_app binary, which have to be started at system boot time (wrap this binary with a script kept in init.d).
No. | HTTP Method | REST APIs | Description |
---|---|---|---|
1. | POST | http://nodemcu/power/{PowerLevel} | Sets power level of actuator. Valid Power levels are: on, off, one, two and three. |
2. | GET | http://nodemcu/temp?sensor={SensorNo} | Gets temperature from sensor. Valid sensor numbers for this project are: 1, 2, 3 and 4. |
- Node MCU v0.9 and Python 2.7.3
- GCC 5.4
Following is a demo video, shows temperature sensor data plotted on Graphite: