Skip to content

RTOS EnvSensor IoT cluster with Internal OTA server and External managing API server

License

Notifications You must be signed in to change notification settings

wkdalswns0427/LeafeonIOTProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeafeonRTOS

An ESP32 FreeRTOS based IoT indoor environment monitoring system

measures indoor Temperature, humidity, eCO2, eTVOC, Particle Dust, and little bit inaccurate altitude

Components

Electronics

  • ESP32 dev module : Lolin D32 Pro (precisely, need dual core)
  • DFRobot SEN0335(CCS811 + BME280) : CO2, TVOC sensor + Temperature, Humidity sensor
  • Plantower PMS7003 : Particle Dust sensor
  • YW Robotics 0.96 inch OLED <- this thing is way off spec sheet (works fine with 3.3v, addr : 0x3C, ssd1306 not ssh...)
  • indicator LED and a switch
  • bunch of resistors, caps etc

Software

  • Arduino IDE (or Espressif IDF)
  • intermediate level of C/C++
  • Fast API based REST API server running at localhost:8000
  • super simple javascript frontend ... or a NodeJS dashboard...
  • AWS RDS - MySQL database
  • Docker utility

<5 types of firmwares>

1. Sensors Only -> only display with oled
2. Sensors OTA -> a local OTA server
3. Sensors DB -> a light api server running along with AWS RDS DB + OTA
4. Sensors MQTT -> a light api server usage of MQTT control + OTA (dev, on hold)

System Usage

service-diagram

Firmware

open up config.h and change&add network settings and db api uri

OTA Update

If LCD display is ready, check display for update server IP (should be connected to same WiFi)

if you access the ip you get

otalogin

log in with default admin:admin and update with your binary file

otaupdate

API Server

RestAPI by FastAPI framework for python

download requirements before running ( I recommend using Anaconda )

cd api-server
sudo pip3 install -r requirements.txt
sudo pip3 install -r requirements_windows.txt
  • running local server
uvicorn app:app --host 0.0.0.0 --reload
  • running local server via Docker
docker build -t <image_name> .
docker run -p 8000:8000 <image_name>

Database

My MySQL database is running on AWS RDS service. 캡처

Frontend

I do not have a domain at this point. Using vscode provided liveserver for development.

화면 캡처 2023-04-03 173027


contact me freely if there's any question!

About

RTOS EnvSensor IoT cluster with Internal OTA server and External managing API server

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published