Zephyr semester project
The project is hosted on an EC2 server and can be accessed by the user on an internet connected device. A Raspberry PI controls the system and the hardware associated with it including motion sensors, lights, and a camera.
- The system should control attributes of the lights remotely via user input.
- The system must update to manual actions done by the user.
- The system should know what attributes of the lights can be changed.
- The system should restrict users from lights based off privilege.
- The sensor must detect movement.
- The camera must take a photo of visitor.
- The database must be updated to have accurate information of the system's status.
- The users are notified of an event.
- The users can check the status and view the photo taken by the camera.
- The user can view a live stream of outside their front door.
- The Zephyr system should login users before use.
- The Zephyr system should log the shows watched.
- The Zephry system should log the amount of time each show is watched.
- The Zephry system should handle ending the session gracefully.
ERD - https://drive.google.com/file/d/1E9FZYTcrmXXyHGFVdGMhGa6XWK0NyF9V/view?usp=sharing
ERD - https://drive.google.com/file/d/1D54ridRq3nqnebNRgT4SLS5RFa8G-JrE/view
ERD - https://drive.google.com/file/d/1chGReG3twRqIuH7UxfmMHUwRtvx66AjE/view?usp=sharing
ERD - https://drive.google.com/file/d/1m5J6BBzVJmYVEjZuhqa1mVOAtMoAqAtq/view?usp=sharing
https://github.com/dosterz97/zephyr/blob/master/builds/Lights.py
- A container with the current status of the front door and a thumbnail of the outside view.
- A table holding previous records that include a timestamp of an event and the corresponding photo taken at the time.
- Selection menu of the rooms with light connected to the system.
- When a light is selected options useable by the light will show up to edit.
- A confirmation window will pop up after the change is sent with either a sucess or error message.
- Login screen for admin (Similar sign up screen)
- A screen with all connected devices, and all devices trying to pair with the system.
- After selecting a device, you can select accounts on the televisions to pull up the restriction page
- The restrictions page will have different fields that will allow the admin to create different types of rules
- Photo: A photo is taken and saved along the time it was taken.
- Status: The status of the front door is recorded and updated for every event.
- Form layout with the information used to edit the light.
- current status information of the lights will be stored so the user can see what the current state is before changing.
- The privilege attached to the account will be checked with before editing the light so an unauthorized user can't change lights they aren't allowed to manipulate.
- Account - Used to keep track of different users and privilege
- Restriction - Tied weakly to the Accounts they are applied to
- Television - Tv name and id that are connected to the Zephyr system, so that different restrictions can be put on different devices
- Show - This model is used by the restrictions for content monitoring (I.e R rated movies not allowed for 12 year olds)
- Sensor functions
- movement_listen(): the system activates actively listens for movement, which triggers the next function.
- activate_camera(): the system proceeds to activate the camera.
- Camera functions
- sensor_listen(): the camera is only active if the sensor has been activated.
- take_photo(): a photo is taken and saved into the database.
- sleep(): the camera sleeps after a certain amount of time after there is no longer movement detected until awoken again.
- App functions
- stream_surveillance(): opens a connection between the camera and app to allow the user to see outside the front door.
- Edit Functions
- editLight(): The system will apply the recieved for info from the user to the selected light.
- changeColor(): Edits the RGB vaule of the light.
- changeBrightness(): Edits the brightness of the light.
- changeState(): Turns the light on/off.
- editPrivilege(): Lets an Admin change the access to the light.
- Check Functions
- checkLight(): Gets the current status of the light to update to the server.
- checkColor(): Grabs the RGB vaule of the light.
- checkBrightness(): Grabs the brightness of the light.
- checkState(): Checks if the light is on/off.
- checkPrivilege(): Will check who has access to changing the light.
- Update Functions
- updateLight(): Will update the status of the light everytime it is changed (Both with app and manually).
- listenLight(): Will check if the light is turned off manually.
- serverConnect(): Will connect the update function to the server to send the values.
- Error Functions
- failError(): Loads the error message if the edit fails.
- success(): Loads the success message when the light changes successfully.
- Admin Methods
- createAccount(): Creates an account for a userName password etc. This will allow users to login and use the television(s)
- createRestriction(): Creates a restriction that can be reused and applied to multiple accounts
- editAccount(): allows for changing of passwords, permissions, and restrictions.
- editRestriction(): also accessable from the edit account view, used to update fields of the restriction
- viewUsage(): shows analytics of users and the content that were viewing, times of day etc.
- User Methods
- login(): logs the usres into the account
- changePassword(): if permissions allow, let users change the password for their account
- Television Methods
- userDidLogin(): starts tracking the data of the user
- userDidLogout(): stops tracking the data of the user
- notifyUser(): if a violation occurs or a time limit is getting reached the zephry system will show the message
- goHome(): if a violation occurs then the television will go back to the home screen
- Python
- Python is the main language used for this project. Python is used to access the database server and controlling a hardware device.
- Skill gaps
- Jon: no experience coding in Python
- Everyone: no experience connecting to devices with Bluetooth and hardware in general
- Zach: experience with cmake files and in general larger scale low-level development
- Issue will be integrating and bridging with c code when necessary
- Django
- Not a language, but we will use this to for DB and model template