📡 Sensor Details
Click a marker on the map
Sensor
🌡️ Temperature
📍 Latitude
📍 Longitude
🕒 DateTime

⚙️ Blockchain Mode
⛓️
Total Blocks / Records
🕒
Pending Transactions
⛓️ Custom Proof-of-Work Chain
Click Refresh to load the blockchain
💼 Server Wallet (RSA-2048)
🔑 Public Key
Not loaded — click Generate or Load below
💰 Balance
⚙️ Blockchain Mode
Switching mode requires the API key. Ethereum mode connects to your Ganache instance.
🌾 Crop Recommendation

Enter soil and climate parameters to get an ML-based crop recommendation.

R-CPS — Real-time Cyber-Physical System

An IoT platform that collects live sensor data, encrypts it, and permanently records it on a blockchain — with AI-powered crop advisory on top.

📖 How to Use This System
🗺️
1
Open the Live Map
Click the Live Map tab. You'll see sensor markers pinned on the campus map. Each marker represents a real IoT sensor deployed at that location.
Live Map Tab
📡
2
Click a Sensor Marker
Tap any marker on the map. The left panel will show the sensor's Temperature, Latitude, Longitude and DateTime — pulled live from Google Sheets.
Sensor Details Panel
🔒
3
Encrypt the Data
Click "Encrypt Data". The sensor values are encrypted using AES-128 right in your browser before being sent anywhere — ensuring data privacy.
AES-128 Encryption
⛏️
4
Mine a Block
Click "Mine Block". The server signs the data with RSA-2048, runs a Proof-of-Work algorithm, and permanently adds the block to the blockchain.
PoW · RSA-2048
⛓️
5
Explore the Blockchain
Go to the Blockchain tab and click Refresh. Every mined block is shown with its hash, proof, and transaction data. You can also switch to Ethereum mode to use Ganache.
Blockchain Tab
🔄 System Data Flow Diagram
R-CPS System Data Flow Diagram

Sensors → MQTT Broker → Cloud Platform → Blockchain (Data at Rest Encryption)

✨ Key Features
📡
Live IoT Sensors
Real-time temperature & GPS data from campus sensors via Google Sheets
🔐
AES Encryption
Client-side AES-128 encryption before any data leaves your browser
⛓️
Dual Blockchain
Switch between Custom PoW chain and Ethereum / Ganache seamlessly
🌾
Crop AI Advisor
Random Forest ML model recommends the best crop for given soil & climate
⛓️ Why We Use Two Blockchains?

This system supports two blockchain modes so users can compare a lightweight custom chain built from scratch against the industry-standard Ethereum network — and understand the trade-offs in a real IoT context.

⚙️

Custom Proof-of-Work

✓ Used Here
Full control — every line of mining, hashing & validation is written by us
No gas fees — free to mine as many blocks as needed
Lightweight — runs on a low-cost EC2 instance with no external node
Transparent — ideal for academic research & thesis demonstration
RSA-2048 signed — each transaction is cryptographically verified
Not decentralized across public nodes
🔷

Ethereum / Ganache

Industry standard — same tech used in real-world DeFi & supply chain
Smart contracts — data stored via Solidity contract on-chain
EVM compatible — can deploy to mainnet with no code change
Requires Ganache node running separately
Gas fees on mainnet make IoT micro-transactions expensive
Harder to modify internals for research purposes
💡 Conclusion: For this IoT thesis, the Custom PoW chain is better — it's free, transparent, fully controllable, and perfectly demonstrates how blockchain secures sensor data step by step. Ethereum mode is included to show compatibility with real-world standards.