cover photo

PROJECT

IOTA

Souparno BaidyaAUTHORACTIVE
Sohan AiyappaCOORDINATORACTIVE
work cover photo
This Report is yet to be approved by a Coordinator.

IOTA Cloud Server with Blockchain Architecture for IoT Devices

Expalnation:

A server that uses blockchain technology with IOTA works by connecting all IoT devices (like sensors, actuators, and microcontrollers) to a distributed network built on the Tangle, which is IOTA’s unique ledger based on a Directed Acyclic Graph instead of a traditional blockchain. When a device sends data, the server helps place this information onto the Tangle, where every new transaction must approve two previous ones. This peer-validation means there are no miners and no fees, making it ideal for huge numbers of tiny device-to-device (micro)transactions.​

As more devices connect and send data, the system becomes faster and even more secure, with every device helping confirm others’ information. This architecture is highly scalable (it can handle millions of messages per second), energy efficient, and protects the integrity of the IoT data by making all records tamper-proof and public for verification. Automation can be added on top, letting the network not only store sensor data but also make decisions or trigger devices automatically. All of this makes IOTA-based blockchain servers an excellent fit for future smart homes, cities, and industrial IoT where trust, speed, and transparency are critical.

System Architecture

  • IoT Devices (ESP32, sensors, actuators, etc.) send data to the cloud via MQTT/HTTP.
  • Cloud Server aggregates, processes, and connects to IOTA Tangle for decentralized storage and execution.
  • IOTA Tangle holds transaction logs, executes smart contracts, and manages trustless automation[web:9][web:13].

Key Technologies

  • IOTA Tangle (DAG-based, not standard blockchain): ensures feeless, scalable device communication[web:2][web:4].
  • Smart Contracts (Rust, Solidity, or Move VM): automate IoT actions (e.g., sensor triggers)[web:13][web:21].
  • MQTT/REST APIs: lightweight protocols for device-cloud messaging.

Connecting Devices: ESP32 Example

import paho.mqtt.client as mqtt

import json

data = {

'device': 'temp_sensor1',

'type': 'temperature',

'value': 39.5

}

client = mqtt.Client()

client.connect('broker.example.com', 1883, 60)

client.publish('iot/data', json.dumps(data))

client.disconnect()

ESP32 sends temperature data to cloud or directly to IOTA node for processing and logging[web:9].


IOTA Smart Contract (Solidity Example: Automated IoT Action)

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.6;

contract IoTAction {

int public lastTemp;

address public notifier;

constructor() {

count = 0;

}

function increment() public {

count += 1;

}

function decrement() public {

require(count > 0, "Count is already zero");

count -= 1;

}

function getCount() public view returns (uint) {

return count;

} } Demonstrates IOTA's support for Solidity contracts — easy to adapt for device automation[web:21][web:23].


How Automation Works

  1. Device sends data (via MQTT/HTTP).
  2. Data hits cloud, is forwarded to an IOTA smart contract.
  3. Contract logic checks value; if triggers (e.g. over temp), event or transaction executes[web:13].
  4. Events can be picked up by off-chain services or used to trigger cloud/serverless automation.

Device-to-Smart Contract End-to-End (Summary)

  • Deploy the above smart contract using IOTA EVM or compatible node.
  • Configure IoT cloud middleware to forward data to contract's method (e.g., via Web3 or ethers.js).
  • Use contract setTemp(value) when data arrives.

Benefits

  • Feeless transactions: crucial for frequent IoT device updates[web:2][web:4].
  • Decentralized logic: no single-point server trust.
  • Extensible automation: add any device logic as contract methods.
  • Event-driven control: Reacts instantly to IoT events on-chain[web:13].

UVCE,
K. R Circle,
Bengaluru 01