The intelligent home application web page for a project monitors the temperature, humidity, and door open/close, controls a thermostat and a lighting system, and simulates power consumption using IoT sensors (such as a photon, photoresistor, and DH11). It is also a web application for the project to understand the basic architecture of smart homes and data process flow between each configuration.
Methods
Website redirect
Endpoint
Description
signup
Signup page
login
Login page
account
account page
dashboard
dashboard
edit
edit account information page
devices
devices page
instruction
instruction for Webhook
Account
Endpoint
Description
user/signup
Handle process of signup return 401 for unauthorized 201 for Created
user/lgoin
Handle process Login of return 400 for bad request, 401 for unauthorized 201 return 200 for success
user/account
Handle process of loading account information return 200 for success
user/updatezip
It will update the zip code of user return 200 for succes
user/updatepreference
Handle process of updating account preference panel after login, return 200 for success
user/updateall
Handle process of updating account information return 200 for success
user/deleteaccount
Deleting Account return 201 for success
Device
Endpoint
Description
device/register
Handle process of registering device, return 401 for unauthorized 201 for created
device/remove
Handle process of registering device, return 401 for unauthorized 201 for removed
device/list
Return registed device stored in database
Cloud
Endpoint
Description
cloud/ping
Ping the device if device is Online otherwise return 201 with failed operation, 200 as successful
cloud/read
Read value from device
cloud/report
Device sends value to server when device published
cloud/publish
Send a request to publish device
cloud/value
Get method to request a value from cloud
cloud/write
send a write request for changing value return 201 with failed operation, 200 as successful