This is a demo IoT project based on socket-io and express by DSC KGEC.
The firmware for the IoT device can be found on Socket-IoT-Demo-Firmware
This project provides a very minimalistic dashboard with neomorphic design scheme, which is designed by DSC Web Team. The backend is based on node-js, it provides a socket server (using socket.io) and an http server (using express). The http server is used to serve the webpage which is just a basic webpage using ejs templates, as well as to serve the socket server. No authentication has been implemented as the project is only meant for testing and demonstration purposes.
Socket.io is a Javascript networking library that runs server-side on Node.js and in the browser. It abstracts away websockets and other communication schemes, depending upon browser capabilities. It also includes convenient features such as broadcasts and multicasts, which are beyond the features of plain websockets.
It is a way to communicate between a client and a server which allows real-time data flow with bi-directional communication, i.e., we can flow data in both directions:
- Client to Server
- Server to Client
It is a tool to implement realtime communication between server and clients very conveniently, without the clients needing to send multiple requests to the server.
We have chosen Express as the framework for serving an http server. This server is used by Socket.io to establish the connection with its clients and is used to serve the dashboard as well.
This project will help node.js developers to start making APIs and implementing sockets as well as provide an insight to the working of a basic IoT system.
For the Firmware source code (for NodeMCU), visit Socket-IoT-Demo-Firmware
Go to this URL: https://admin.socket.io and put iot-socket.herokuapp.com/admin
in the Server URL.
Note that the domain iot-socket.herokuapp.com
is just for the demonstration, if you are running this project locally, replace that URL with localhost:PORT
where PORT
is the same PORT that your server is running on.
It should look something like this:
This is a concept for beginners starting with IoT. Feel free to fork, clone, create issues and/or make PRs. We will be more than happy to receive your contributions.