This project has high resource efficiency and performance, including real-time data processing, as well as good cybersecurity.
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 |
-
Visual Studio Code
https://bit.ly/VScode_Installer
-
NodeJS
https://nodejs.org/en/download/prebuilt-installer
-
MQTTX
https://mqttx.app/downloads
-
Font-Awesome
https://fontawesome.com/download
Infrastructure |
---|
![]() |
-
Download and extract this repository.
-
Open the
Web
directory, then openCMD
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
-
Open your
Browser
, then type ->localhost:3000
or customize the one on yourCMD
. -
Fill in the Topic and Data form first, for example:
kelasiot/pot
|4095
-> then clickPublish
, then the result will be displayed. -
This port and Topic Subscribe can be changed according to the user's preference. These settings are contained in a file called
server.js
. -
Have fun and enjoy [Done].
MQTTX Web
provides 2 communication protocols, namely WebSocket (WS)
and WebSocket Secure (WSS)
. There is also MQTTX Desktop
, which is a more complete option.
-
If you are using
MQTTX Web
, make sure to select theWSS
protocol to be secure. -
If you are using
MQTTX Desktop
, don't forget to download the app. Then, once downloaded, open that application on your laptop or computer. -
Click
+ New Connection
-> then name the connection as you want -> then clickConnect
. -
Create a new topic with the name
kelasiot/pot
. -
Then for topic settings you can customize as seen below:
• Format Payload to Publish by :
Plaintext
.• Qos :
0
.• Put a check mark on
Retain
. -
Publish data.
-
After that, please click
+ New Subscription
-> then list the topics you want to subscribe, for example:kelasiot/#
. -
Wait for the subscription results to be displayed.
-
Have fun and enjoy [Done].
Link to simulate : Click Here
Dashboard View | Running the Server |
---|---|
![]() |
![]() |
MQTTX Simulation | Wokwi Simulation |
---|---|
![]() |
![]() |
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.
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.
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.