Skip to content
This repository has been archived by the owner on Dec 25, 2024. It is now read-only.

Node.js-based IoT Dashboard | Kelas IoT | Workshop Assignment

License

Notifications You must be signed in to change notification settings

cakraawijaya/Dashboard-IoT-Berbasis-Node-JS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open Source Love License: MIT GitHub last commit Project Type

Dashboard-IoT-Berbasis-Node-JS

This project has high resource efficiency and performance, including real-time data processing, as well as good cybersecurity.


Project Requirements

Part Description
Scheme Virtual
Features • Publish
• Subscribe
Development Board DOIT ESP32 DEVKIT V1
Code Editor Visual Studio Code
Application Support • Wokwi
• MQTTX
• Node.js
IoT Platform EMQX Broker
Communications Protocol • Hypertext Transfer Protocol (HTTP)
• Message Queuing Telemetry Transport (MQTT)
IoT Architecture 3 Layer
Framework • Bootstrap 5
• Express.js
• Font-Awesome 6
Libraries MQTT.js



Download & Install

  1. Visual Studio Code

    https://bit.ly/VScode_Installer
    

  2. NodeJS

    https://nodejs.org/en/download/prebuilt-installer
    

  3. MQTTX

    https://mqttx.app/downloads
    

  4. Font-Awesome

    https://fontawesome.com/download
    



Project Designs

Infrastructure
infrastructure



Get Started

  1. Download and extract this repository.

  2. Open the Web directory, then open CMD inside the directory.

    • First, if no error occurs then just skip this step, but if otherwise then please copy the following command:

    npm install

    • Secondly, to run the server with repeated refreshes automatically can be done with the command:

    nodemon server.js

  3. Open your Browser, then type -> localhost:3000 or customize the one on your CMD.

  4. Fill in the Topic and Data form first, for example: kelasiot/pot | 4095 -> then click Publish, then the result will be displayed.

  5. This port and Topic Subscribe can be changed according to the user's preference. These settings are contained in a file called server.js.

  6. Have fun and enjoy [Done].



Simulation With MQTTX

MQTTX Web provides 2 communication protocols, namely WebSocket (WS) and WebSocket Secure (WSS). There is also MQTTX Desktop, which is a more complete option.

  1. If you are using MQTTX Web, make sure to select the WSS protocol to be secure.

  2. If you are using MQTTX Desktop, don't forget to download the app. Then, once downloaded, open that application on your laptop or computer.

  3. Click + New Connection -> then name the connection as you want -> then click Connect.

  4. Create a new topic with the name kelasiot/pot.

  5. Then for topic settings you can customize as seen below:

    • Format Payload to Publish by :   Plaintext.

    • Qos :   0.

    • Put a check mark on Retain.

  6. Publish data.

  7. After that, please click + New Subscription -> then list the topics you want to subscribe, for example: kelasiot/#.

  8. Wait for the subscription results to be displayed.

  9. Have fun and enjoy [Done].



Simulation With Wokwi

Link to simulate : Click Here



Highlights

Dashboard View Running the Server
dashboard server
MQTTX Simulation Wokwi Simulation
mqttx wokwi



Appreciation

If this work is useful to you, then support this work as a form of appreciation to the author by clicking the ⭐Star button at the top of the repository.



Disclaimer

This application is the result of the development of the Kelas IoT Workshop. I do not deny that I still use third-party services in this work, including: libraries, frameworks, and so on.



LICENSE

MIT License - Copyright © 2024 - Devan C. M. Wijaya, S.Kom

Permission is hereby granted without charge to any person obtaining a copy of this software and the software-related documentation files to deal in them without restriction, including without limitation the right to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons receiving the Software to be furnished therewith on the following terms:

The above copyright notice and this permission notice must accompany all copies or substantial portions of the Software.

IN ANY EVENT, THE AUTHOR OR COPYRIGHT HOLDER HEREIN RETAINS FULL OWNERSHIP RIGHTS. THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, THEREFORE IF ANY DAMAGE, LOSS, OR OTHERWISE ARISES FROM THE USE OR OTHER DEALINGS IN THE SOFTWARE, THE AUTHOR OR COPYRIGHT HOLDER SHALL NOT BE LIABLE, AS THE USE OF THE SOFTWARE IS NOT COMPELLED AT ALL, SO THE RISK IS YOUR OWN.