Dynalite is an Internet-of-Things application which performs dynamic visualisation of room occupancy. Dynalite uses one or more Raspberry Pis to measure room occupancy and a NodeJS-Express-PostgreSQL web server to store and visualise the measured data. Communication betwene the Pis and the server is implemented using COAP.
View the project
- Frontend: https://www.evantay.com/tech/dynalite/
- Backend: https://www.evantay.com/tech/dynalite-api/
This project was built using 3 Docker containers and 1 Raspberry Pi:
- Raspberry Pi:
- Python 3, aiocoap and RPI GPIO API
- Other hardware add-ons such as Light Dependent Resistors
- More RPi can always be added to Project Dynalite with no further configurations
- Back-end NodeJS-PostgreSQL web server:
- A Docker container containing a PostgreSQL database
- A Docker container containing a NodeJS-ExpressJS app using the NodeJS-COAP library
- Receives COAP messages from RPis at coap://hostname/
- Authenticates payload before inserting into PostgreSQL container
- Publishes data from PSQL via HTTP JSON API at https://www.evantay.com/tech/dynalite-api/occupancy
- Publishes debug message log at https://www.evantay.com/tech/dynalite-api/
- Front-end React web server:
- A Docker container containing the React app
- Reads data from backend server via API at https://www.evantay.com/tech/dynalite-api/occupancy
- Uses ChartJS for visualisation
To setup the Raspberry Pi, view the Raspberry Pi setup guide.
Frontend HTTP server
- To deploy the frontend server locally for development purposes, follow the steps in local frontend server deployment guide.
- To deploy the frontend server using
Dockerfile, follow the steps in Docker frontend server deployment guide.
Backend HTTP-COAP server
- To deploy the backend server locally for development purposes, follow the steps in local backend server deployment guide.
- To deploy the backend server and database using
docker-compose, follow the steps in the Docker-compose backend deployment guide.