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 decentralized Architecture for IoT Devices

Explanation:

A server that uses decetralized 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. When a device sends data, the server helps place this information onto the Tangle, which stores data in a analysable way.

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 decentralized 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]. It's inspired from the open source IoTA server by Cisco. alt text

Key Technologies

  • IOTA Tangle (DAG-based, not standard blockchain): ensures feeless, scalable device communication[web:2][web:4].

  • 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.

Server initializtion

Alpine Linux is used to host it and it starts. My one responds with the server started and the sails are lifted. It was a custom part for my server not in cisco's server. Node mcu and node red had to bo setup first and sometimes the code need to be changed for that. Mqtt connects it after initial wifi. The wifi thing doesn't ocnnect the device to the server. alt text


Working :

It connects to the devices using mqtt and it can connect upto 3 esp32. HAve theor communication in mqtt and show it in node red dashboard. alt text

alt text

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