View on GitHub

SmartHomeBot

SmartHomeBot - Java CLI Application that monitor your smart home.

SmartHomeBot User Guide

SmartHomeBot is a desktop application that consolidates all home appliance’s control into a centralized system via a Command Line Interface (CLI). It is designed to assist disabled individuals with difficulties to perform tasks like switching On/Off Appliances at home. Users can also review and monitor electricity usage; having a clearer picture of their electrical usage patterns. SmartHomeBot has an auto-save feature that will automatically save all the appliances’ data and export it to a text file. Upon the start of the application, it will import the data from the text file and loads the appliances’ data back.

Disclaimer: SmartHomeBot V2.1 does not interface with actual Appliances. Instead, Appliances are simulated in this program.

Table of Contents

Quick start

  1. Ensure you have Java 11 or above installed in your Computer.

  2. Download the latest SmartHomeBot.jar from here.

  3. Copy the file to the folder you want to use as the home folder for your SmartHomeBot.

  4. Open your Command Prompt/Terminal. Navigate to the folder which you place the SmartHomeBot.jar. Then input java -jar SmartHomeBot.jar and press ENTER. The display similar to the below should appear in a few seconds.

  5. Type the command in the command box and press Enter to execute it. e.g. typing exit and pressing Enter, it will exit the program. Some example commands you can try:
    • create Bedroom1: Creates a ‘location’ named “Bedroom1” in SmartHomeBot.

    • remove Bedroom1: Remove a ‘location’ named “Bedroom1” in SmartHomeBot.

    • list location: Lists all the location.

  6. Refer to the Features below for details of each command.

Features

Notes about the command format

Viewing help: help

Shows all available commands to the user

Format: help

Example: help

Output:




Creating a location: create

Adds a new location with a name.

Format: create [LOCATION_NAME]

Example: create Bedroom1

Output:



Removing a location: remove

Removes an added location with its name in the list.

Format: remove [LOCATION_NAME]

Example: remove Bedroom1

Output:

Note: If there are appliances in the Location of ‘LOCATION_NAME’ when removing, it will be deleted as well.



Adding an appliance: add

Adds an appliance to the location created previously.

Format: add [APPLIANCE_NAME] l/[LOCATION_NAME] w/[WATTAGE] t/[TYPE_OF_APPLIANCE]

List of TYPE_OF_APPLIANCE

  1. fan
  2. light
  3. aircon
  4. smartplug

Example: add AIRCON1 l/Bedroom1 w/3500 t/aircon

Output:



Deleting an appliance: delete

Deletes an appliance base on its name in the list.

Format: delete [APPLIANCE_NAME]

Example: delete AIRCON1

Output:



Switching on an appliance: on

Switches ON an appliance base on its name in the list.

Format: on [APPLIANCE_NAME] or on [APPLIANCE_NAME] p/[PARAMETER] or on [LOCATION_NAME]

  1. on [APPLIANCE_NAME]: Switch ON the appliance by its name.
  2. on [APPLIANCE_NAME] p/[TEMPERATURE]: Switch ON the appliance by its name with parameter for air-conditioner.
  3. on [APPLIANCE_NAME] p/[SPEED]: Switch ON the appliance by its name with parameter for fan.
  4. on [LOCATION]: Switch ON every appliance in the location.

Example: on AIRCON1

Output:

Example: on AIRCON1 p/27

Output:

When Appliance is already ON, we can still change the Appliance’s parameter:

Example: on AIRCON1 p/16

Output:

Example: on FAN1 p/3

Output:

Example: on Bedroom1

Output:



Switching off an appliance: off

Switches OFF an appliance base on its name in the list.

Format: off [APPLIANCE_NAME] or off [LOCATION]

Example: off AIRCON1

Output:

Example: off Bedroom1

Output:



Listing all the locations OR appliances: list

List out all the appliances or all the location currently stored.

Format: list appliance or list location or list appliance l/[LOCATION_NAME]

Example: list location

Output:

Example: list appliance

Output:

Example: list appliance l/Bedroom1

Output:



Displaying the recorded usage of appliance: usage

Display the current power usage of all appliances and total power consumption monitored within SmartHomeBot.

Format: usage

Output:



Resetting all power usage in application: p_reset

Reset the previous recorded power usage of all appliances and total power consumption to zero. Note that if appliance remains ON, its usage will be reset to zero, monitoring process continues, as the appliance remains running.

Format: p_reset

Output:



Exiting the application: exit

Exits the application and switch off all appliances within SmartHomeBot. The monitoring of all appliances will be stop.

Format: exit

Output:



Saving the data

SmartHomeBot will auto-save the task list data in the hard disk after any command that changes the data. There is no need to save manually.

FAQ

Q: How do I transfer my data to another Computer?

A: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous SmartHomeBot folder.

Q: Does the program interface with the appliance?

A: Current SmartHomeBot v2.1 does not interface with actual Appliances. Instead the Appliances are simulated as a proof of concept for future implementation.

Command summary

Function Format Example
Help help  
Create location create [LOCATION_NAME] create Bedroom1
Remove location remove [LOCATION_NAME] remove Bedroom1
Add appliance add [APPLIANCE_NAME] l/[LOCATION_NAME] w/[WATTAGE] t/[TYPE_OF_APPLIANCE] add AIRCON1 l/Bedroom1 w/3500 t/aircon
Delete appliance delete [APPLIANCE_NAME] delete AIRCON1
Switch On on [APPLIANCE_NAME] or on [APPLIANCE_NAME] p/[PARAMETER] or on [LOCATION_NAME] on AIRCON1 or on AIRCON1 p/27 or on Bedroom1
Switch Off off [APPLIANCE_NAME] or off [LOCATION] off AIRCON1 or off Bedroom1
List list appliance or list location or list appliance l/[LOCATION_NAME] list appliance l/Bedroom1
Usage usage  
Reset p_reset  
Exit exit