Project tutorial
Home/Hotel Monitoring System with Automated controls

Home/Hotel Monitoring System with Automated controls © GPL3+

A cloud connected prototype to monitor and control any hotel or can be a home, The system is connected to an android application.

  • 20 respects

Components and supplies

R8326274 01
Raspberry Pi 2 Model B
A000066 iso both
Arduino UNO & Genuino UNO
1434509556 android phone color
Android device
For mobile application
51gzz5eu9pl. sx425
Ultrasonic Sensor - HC-SR04 (Generic)
For Water level indication
DC motor (generic)
To show as a motor pump
Adafruit industries ada161 image 75px
Photo resistor
For parking monitor
Mfr 25frf52 10k sml
Resistor 10k ohm
For parking monitor
826 04
Male/Female Jumper Wires
09590 01
LED (generic)
To show as a gate for parking
10988 01
Temperature Sensor
To show temperature of each floors

Apps and online services

About this project

Everyday we see a changing trend in technology and no matter what it has changed the way we live today and is still changing, Here we are prototyping a hardware which connects the essential components of a house or a hotel to the cloud for secure data monitoring through a computer or from an Android application. This also gives you the control on your components from anywhere and automates them according to the settings you set, Furthermore some actions can also be set to provide a better communication extension like EMAIL someone regarding the changes in parking or water level etc.

This idea will encourage people to make their homes and business structure more smart and the secure data storage will provide a structured record for future use.


Application and automated settings below

Following are the demonstrations for all the systems, demonstrated separately.

Parking demo

Temperature demo

Automated Waterlevel

keep an eye on the motor to observe the automated function

Standard waterlevel

How to set the prototype

This tutorial is divided into four sections

  • Configuring your ARTIK cloud account
  • Setting up your Arduino with demo videos
  • Setting up your Raspberry pi
  • Setting up the Android application

Configuring your ARTIK cloud account

  • goto Dashbaord then DEVICE TYPES
  • Type your desired display name and unique name

(I named it hotel testing)

  • Now move onto the manifest from left and then click NEW MANIFEST
  • Now you have to enter the variables with their type which will upload the results to cloud

Create all these (from new field)

Field name : Type

water_value : String

parking_value : String

temperature_value : String

state_motor : Boolean

state_gate : Boolean

  • After creating all these move to Actions
  • Type actions : motor_on , motor_off , gate_on , gate_off
  • NOW MOVE TO APPLICATIONS (described in below picture)
  • Create new application and Name it
  • In AUTHORIZATION METHODS check Client credentials, auth code, implicit
  • In AUTH REDIRECT URL write http://localhost:8000/acdemo/index.php

Save application

  • After this move to PERMISSIONS (on the left bar) and give it read
  • Now click on the SHOW CLIENT ID & SECRET

Write down both of them for later use

Here the developer part ends and we will move to the final step of cloud configuring
  • Move to the ARTIK CLOUD NOW
  • Click on the DEVICES as shown below
  • Click on the connect device and now write your device name which you entered previously when creating device type (shown below)

Because I named it hotel testing, it shows up in the drop down list.

  • After creating move onto the settings as shown below
  • You will now see a windows popping up, Click on the generate button to generate the token for your device (shown below)
  • Note down Device ID, Device Token.

We will use all of these later.

Now the last thing is to add one rule (optional)

--> On MY ARTIK CLOUD drop down click rules

I have added one rule of mailing whenever my motor turns on (shown in above picture) and SAVE it


Setting up the ARDUINO

This part is divided into four parts (Parking, temperature, waterlevel and controls), Circuit diagram is provided.

Arduino code

  • Setup the hardware accordingly
  • Then upload the program on your arduino
  • There is no problem if you are planning to make only one or two parts, the application will still work and receive the data (analog pins might give random values if they are not connected to any thing)

LDR's are used to detect objects on the surface and is programmed accordingly to send the data, when the data reaches the android client it automatically changes the UI depending on the data and car is shown on that particular slot.


LM35 is used to detect the temperature and is programmed accordingly to send the data, when the data reaches the android client it automatically changes the UI depending on the data and temperature is update on the block.


Ultrasonic is used here to detect the level, you will need a container to hold the water and attach the ultrasonic sensor on top.

  • Please note that the motors I'm using for demo are very small brushless dc motors and they dont require much current, so they are safe to use directly otherwise you will need driver circuit such as (using 2N222,diodes or H bridge).

You will see an email if you have done the optional Rule step


Setting up Raspberry pi

We will be needing Node.js to run the code, after installing we have to just fire up the code in the raspberry pi with some little modifications to the code.

Start by installing Node.js

  • Log in to your Raspberry pi and Enter the following commands:
sudo apt-get update

This will update your pi (takes some time)

  • Install Node.js
sudo apt-get install node
  • First create a folder in your Raspberry pi and name it cloudlive in your home directory.
sudo mkdir ~/cloudlive 

Then create a new file and name it server.js

sudo nano ~/cloudlive/server.js

Then open the following link and Copy the code into this file from server.js


OR if you prefer git then use the following command
git clone 

This will directly create a new directory in your home and place all the files with code

  • Edit some of the parameters to use it with your cloud account
  • Do this by following steps
sudo nano ~/cloudlive/server.js

open the editor again and change the following parameters

var device_id = "replace with your DEVICE_ID obtained when setting the cloud";

var device_token = "replace with your DEVICE_TOKEN obtained when setting the cloud";

Connect Arduino to your Raspberry pi (Serial from arduino to USB in RPi)
Start the program using
sudo node ~/cloudlive/server.js
We are now ready with the raspberry pi

You will see above red highlighted Authorization message if you connect successfully, the device will then broadcast messages to cloud


Setting up the Android application

Get the code from the Repository and make following changes

Recall all the previous ID's and tokens you saved in step 1 when configuring cloud

1- open

  • Insert your client ID (from developers->dashboard->applications)

2- open

  • Insert your client ID
  • Insert Device ID (from cloud->my artik cloud->devices->settings icon)

3- open

  • Insert KEY_ACCESS_TOKEN (from cloud->my artik cloud->devices->settings icon->Generate token)

4- BUILD and install apk

5- At first startup you will be asked for login, login using your same account


Future work

We can add further more components to it for controlling and monitoring, furthermore the the application can be extended made on other devices too because of the cross-platform compatibility from cloud.


Flow diagram
Intro2 hotel
Circuit diagram
Overall circuit and connections


Similar projects you might like

Smart Parking System

Project in progress by Md. Khairul Alam

  • 104 respects

Traffic Light Information System

Project tutorial by Pieter Luyten and Joppe Smeets

  • 36 respects

Smart Vent System

Project tutorial by Gabi Zuniga

  • 17 respects

Windows 10 IoT Plant Monitoring System

Project tutorial by Team BME-AUT

  • 55 respects

Home Monitoring System and Smart Home Solution

Project showcase by Akash Kumar

  • 21 respects

Smart Garbage Monitoring System Using Arduino 101

Project tutorial by Technovation

  • 32 respects
Add projectSign up / Login