IoT Architecture of Home Automation

Kamran Ghyan
2 min readFeb 14, 2021

In this article, I’ll create IoT architecture for Home Automation.

In which try to explain all aspects of IoT architecture and give you short description of each section, So let’s start.

Iot Architecture

In above diagram we have to automate the switch board and all the attached devices using Micro-Controller with wifi through Application Dashboard.

In Application, dashboard shown four devices what we want to automate? Let say when click on Device1 in our home D0 (appliance AC) should change status and vice versa for others devices.

When we click on Device1 its trigger a event and that event post a payload to our cloud and cloud send to Micro-controller, Micro-controller GPIO pins get that event and send signal to appropriate pin and appliance status will be changed.

Micro-controller cannot send directly signal to appliances why? because Micro-controlle using DC current and Appliance using AC current, We need interface which is known as realy, Realy basic job convert DC into AC.

Now lets move towards software part how Micro-controller get instruction and pass to relay. In this architecture used third party MQTT service on cloud server.

MQTT services provide us credentials to connect with MQTT service on cloud server which are.
IP address : 192.168.1.1
Port : 1880
Username : ABC
Password : abc321

In Micro-controller will install MQTT library and provide the above mentioned credentials. Micro-controller is now connected with MQTT service with cloud server.

Don’t forget to add topic in MQTT service let say added room topic in MQTT and allow Micro-controller to subscribe a topic room.

Now come to our Application Dashboard which have four buttons and each button attached with our home appliance.

Let say we click on Device1 its trigger a event and that event publish a payload to MQTT topic room on cloud and cloud send event to topic room and Micro-controller will subscribe the topic room.

Micro-controller now check the payload and perform the appropriate action based on the payload.

Toggle the status of appliance.

That’s end for my side please let me know if you have any query regarding above architecture.

--

--

Kamran Ghyan

Software Engineer, System Architecture, Cloud Architecture, AI enthusiastic