Skip to content

alex-lt-kong/rack-daemon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rack daemon

A tool intended to run on embedded systems to:

  1. Read temperature values from four DS18B20 temperature sensors;
  2. Control two Sunon cooling fans based on ambient and cabinet temperature readings with a IRF520 MOS Driver Module;
  3. Detect cabinet door opening with a reed switch (a.k.a. door sensor);
  4. Read from an USB IPCam and show real-time image (depends on camera-server);
  5. A front-end single-page application to demonstrate all these.

Environment and dependency

Back-end

  • libsqlite3 for SQLite support: apt install libsqlite3-dev
  • cJSON for JSON support: apt install libcjson-dev
  • libmicrohttpd for HTTP support: apt install libmicrohttpd-dev
  • Pigpio: used to manipulate GPIO pins.
git clone https://github.com/joan2937/pigpio
cd ./pigpio
mkdir ./build
cd ./build
cmake ../
make
make install
  • OpenCV: Install following this link.

  • iotctrl: used to read temperature sensors, refer to here

Quality assurance

  • Instead of cmake ../, run cmake .. -DBUILD_ASAN=ON / cmake .. -DBUILD_UBSAN=ON to test memory/undefiend behavior error with AddressSanitizer / UndefinedBehaviorSanitizer.
  • The repo is also tested with Valgrind from time to time: valgrind --leak-check=yes --log-file=valgrind.rpt ./build/rd.

Front-end

  • npm install
  • node babelify.js --prod

Gallery

Software

Desktop GUI Mobile GUI

Hardware

Wiring Diagram

Door sensor

Wiring Diagram

Fans controller

Undocumented

Raspberry Pi Rack Mount Design

Raspberry Pi Rackmount Design

Components

IRF520 MOS Driver Module

IRF520 MOS Driver Module

Sunon Cooling Fan x2

Sunon Cooling Fan

Door sensor

Door sensor

Installation

Raspberry Pi and its rackmount

Raspberry Pi

IPCam

IPCam

Cooling Fans

Cooling Fans

About

A monitoring tool for server rack cabinet

Resources

Stars

Watchers

Forks