https://github.com/vhtua/realtimefarmingdata
A simple web dashboard which updates the farming data in realtime using MQTT
https://github.com/vhtua/realtimefarmingdata
css expressjs html javascript mqtt nodejs postgresql realtime sql
Last synced: 3 months ago
JSON representation
A simple web dashboard which updates the farming data in realtime using MQTT
- Host: GitHub
- URL: https://github.com/vhtua/realtimefarmingdata
- Owner: vhtua
- Created: 2023-06-12T13:32:15.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-12T15:37:36.000Z (about 3 years ago)
- Last Synced: 2025-02-04T18:50:54.259Z (over 1 year ago)
- Topics: css, expressjs, html, javascript, mqtt, nodejs, postgresql, realtime, sql
- Language: JavaScript
- Homepage:
- Size: 2.44 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RealtimeFarmingData
## Requirement
- Nodejs
- PostgresSQL
## Run the project
### 1. Edit your Postgres database login information in the file **_postgresDBinfo.json_**
```json
{
"user": "postgres",
"host": "localhost",
"database": "Enter your database name here",
"password": "Enter your password here",
"port": 5432
}
```
### 2. Please open 3 terminals on your system
- Terminal 1 (Activate all the sensors):
```bash
node AllSensorsActivation.js
```
- Terminal 2 (A subscriber listens to all the sensor data through a mqtt server, then it inserts the data into the database system)
```bash
node Subscriber.js
```
- Terminal 3 (Run the back-end server, the client could access the dashboard interface through this link localhost:3000):
```bash
node Server.js
```
Note that the client user dashboard will automatically live update the data every 3 seconds, you don't need to refresh the page.