Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
@aa7401
Latest commit 3a8fd33 Feb 23, 2020 History
1 contributor

Users who have contributed to this file

Lighting Control

In this first sprint you will be developing an automated lighting control system

User Story

To develop an automated lighting control system to allow the home owner to have better control over the lighting in their home. Specifically they want the following features:

  1. The system should be controllable from a wall-mounted smart hub or smartphone.
  2. There should be two modes, manual and automatic:
    1. In manual mode the user should be able to toggle the lights on and off using a push switch and an on-screen switch.
    2. In automatic mode the system should sense when someone enters the room and switch the lights on which should go off 5 min after the system senses there is no-one in the room.
  3. The lighting level (brightness) should be user-defined with the use able to adjust this using an on-screen slider.
    1. The system should be able to maintain the required lighting level by taking into account the ambient lighting level before deciding how bright to illuminate the bulbs.
  4. The system should display the energy usage pattern (graph) and the total energy used over the previous 24 hours. This should be calculated from the amount of time the lights are on and the light level.

Planning the System

It is very important that your team have a clear understanding of the system you are about to build and that this vision is clearly communicated. There are a number of standard UML diagrams you might want to use during this planning phase:

  1. Deployment Diagrams show how physical devices are connected together.
  2. Component Diagrams show how different modules connect to each other.

Demonstrating the System

At the end of the sprint there will be a formal review meeting where you will need to demonstrate the working system to the client. Since this is going to be part of a home automation system you should try to demonstrate this in a suitable context. You might use the following:

  1. A cardboard box to represent the room with cutouts for doors and windows.
  2. One of more LEDs to represent the room lights.
  3. The classroom/home lighting or a torch to simulate the ambient lighting levels.
  4. The wall-mounted smart hub could be represented by a raspberry Pi connected to either a touchscreen or computer monitor.

Tasks

As part of the sprint planning you will need to break down the problem into small tasks. For this first sprint the following tasks should be added to the Issue Tracker and supplimented by any other tasks you feel are necessary.

  • Build the room model.
  • Install the OS on the Smart Hub (Raspberry Pi).
  • Install the database on the Hub.
  • Schema for data logging.
  • Install and configure web server.
  • Build web user interface.
  • Send web switch state to web server.
  • publish switch state to broker.
  • send light level slider state to web server.
  • publish light level to broker.
  • Connect movement sensor to microcontroller.
  • Connect toggle button to microcontroller.
  • Connect LED light to microcontroller.
  • Connect light sensor to microcontroller.
  • Publish button status to broker.
  • publish light sensor status to broker.
  • subscribe to lighting level and adjust LED.
  • subscribe to light on/off and switch LED.
  • subscribe to LED light status.
  • store light status in database.
  • query get light usage pattern last 24 hours.
  • query get overall light(energy) usage 24 hours.
  • API enpoint 24 hour light usage.
  • API endpoint energy 24 hours.
  • UI display light usage 24 hours.
  • UI display energy 24 hours.