Skip to content

dakshj/smart-home

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smart Home

Collaborators: Daksh Jotwani, Nidhi Mundra

Building the Project

Windows

gradlew clean

gradlew build

Unix

./gradlew clean

./gradlew build

Generating a JAR

Windows

gradlew clean

gradlew fatJar

Unix

./gradlew clean

./gradlew fatJar

Starting a Gateway Server

java -jar {jar-file-path} 0 {config-json-file-path} [Sample Config JSON]

Starting a DB Server

java -jar {jar-file-path} 1 {config-json-file-path} [Sample Config JSON]

Starting a Temperature Sensor Server

java -jar {jar-file-path} 2 {config-json-file-path} [Sample Config JSON]

Starting a Motion Sensor Server

java -jar {jar-file-path} 2 {config-json-file-path} [Sample Config JSON]

Starting a Door Sensor Server

java -jar {jar-file-path} 2 {config-json-file-path} [Sample Config JSON]

Starting a Presence Sensor Server

java -jar {jar-file-path} 2 {config-json-file-path} [Sample Config JSON]

Starting a Bulb Server

java -jar {jar-file-path} 3 {config-json-file-path} [Sample Config JSON]

Starting an Outlet Server

java -jar {jar-file-path} 3 {config-json-file-path} [Sample Config JSON]

Executing a User

java -jar {jar-file-path} 4 {config-json-file-path} [Sample Config JSON]

Executing an Intruder

java -jar {jar-file-path} 4 {config-json-file-path} [Sample Config JSON]

Project Execution Steps

  1. Run Gateway
  2. Run all the IoTs (DB, Bulb, Outlet, Door Sensor, Motion Sensor, Presence Sensor and Temperature Sensor)
  3. Input anything on Gateway
  4. Run User / Intruder

DB Server APIs Consumed by Gateway Server

  • void temperatureChanged(final TemperatureSensor temperatureSensor, final long chronologicalTime, final long logicalTime)
  • void motionDetected(final MotionSensor motionSensor, final long chronologicalTime, final long logicalTime)
  • void doorToggled(final DoorSensor doorSensor, final long chronologicalTime, final long logicalTime)
  • void deviceToggled(final Device device, final long chronologicalTime, final long logicalTime)
  • LimitedSizeArrayList<Log> getYoungestLogsList()
  • void intruderEntered(final long chronologicalTime, final long logicalTime)
  • void userEntered(final boolean atHome, final long synchronizedTime, final long logicalTime)

License

Copyright 2017 Daksh Jotwani, Nidhi Mundra

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages