/Encon-ds

Primary LanguageHTMLMIT LicenseMIT

Encon 2020

You can find the project at Encon DS API

Contributors

Labs24

Avery Quinn Gagan Singh Iulia Stremciuc

Project Overview

Encon is a application that can help users calculate the cost in dollars and energy consumed in kWh of common household appliances. Through the app, users will also be able to track their daily energy usage of certain appliances.
Trello Board
Product Canvas
Deployed Front End

Tech Stack

Calculator Function

cal.py
You can test out the function by using the url to insert inputs:
/<device>/<state>/<hours>/<days>
https://environment-2.eba-j6sk9zsp.us-east-1.elasticbeanstalk.com/Ceiling%20Fan/Missouri/8/5
Where device and state match options in coresponding csv files; hours (0-24); days of the week (0-7)

Image Detection

resnet.py
decode.py

Postman API Request Examples

API Request Route:

https://environment-2.eba-j6sk9zsp.us-east-1.elasticbeanstalk.com/

API POST Request:

{
    "imgb64": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD//...
{

API Response:

[
    "comic_book",
    "Image is not a common household appliance. Please select a different picture."
]

or

[
    "laptop",
    "Laptops are 50% more energy efficient than computer desktops. Laptops offer power saving features such as standby mode or sleep mode which will help reduce the energy when not using the device. Also unplug laptop chargers when not using them as even when plugged they are absorbing standby power"
]

DS API Routes

You can find the project at Encon DS API

Route Description
/ Home: Shows list of devices that can be used in the calculator function
/calculator Calculator: Form page to calculate energy cost per year and total energy used
/<device>/<state>/<hours>/<days> Alternative Calculator route without form
/upload Upload: Button to upload image that will run through Resnet Model
/image Image: Post route - will take json key[imgb64], value[encode image as base64]