Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hacc2024/kilowatt
https://github.com/hacc2024/kilowatt
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/hacc2024/kilowatt
- Owner: HACC2024
- License: mit
- Created: 2024-10-16T03:37:43.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-10-30T04:25:36.000Z (3 months ago)
- Last Synced: 2024-10-30T07:21:26.686Z (3 months ago)
- Language: JavaScript
- Size: 40 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# KILOWATT ISLAND SURGE
HAWAI'I HACKATHON 2024
Gabrielle Dang## Hawai'i Keiki Museum Energy Playhouse
Kilowatt Island Surge is an arduino compatible web application designed to educate Hawai'i keiki about energy conservation. In this prototype, children (ages 0-10) are immersed in a tropical island with one ultimate goal: **_keep the island afloat!_**
Within the playhouse, keiki can switch appliances (TV, AC, ceiling fan, electric oven, etc.) **_on or off_** to visualize how much energy is consumed per second for each appliance. **_But here's the catch_** -- if they leave the appliances on for too long (once maximum capacity is reached for the day), the island will **_sink_**. From there, they are prompted to turn the appliances off to conserve energy and bring their island back afloat. This encourages children to not only learn about the concept of energy and power, but to also be mindful of the impact overconsumption can have to our environment.
[Check out Kilowatt Island Surge here!](https://kilowatt-hacc24.vercel.app/)
FOR JUDGING USE ONLY:
Login credentials:- Email: [email protected]
- Password: Hawaiihac24!IMPORTANT: Since this application is arduino compatible, an MQTT testing software (MQTTX) is used to simulate appliances being turned on and off. Please view the demo video (as part of the hacc submission) to grasp how it works. Feel free to reach out through slack if a live demo is needed.
## Technology Stack
### Client: Next.js hosted on Vercel
For a keiki friendly user interface, free 3D models were utilized from [Sketchfab](https://sketchfab.com/feed) under License CC-BY-4.0, allowing rights to redistribute and transform these models with credit granted in the source code.
React Spring Three, React Three Drei, React Three Fiber, Tailwind CSS, CSS, Framer Motion, Typescript, Javascript, SocketIO Client, Auth0 Next.js SDK, Vercel
### Server: Node.js hosted on Heroku
To integrate with an arduino system, MQTT (Message Queuing Telemetry Transport) and HiveMQ Public Broker were used to receive signal input from an appliance and render the status to the client side in real-time using Websocket IO. As this is a proof-of-concept prototype, MQTTX is used to simulate a client (appliance) publishing to the HiveMQ Public Broker, and transmitting the message to the server.
Javascript, Node.js, Express, Websocket IO, MQTT, MQTTX, HiveMQ Public Broker, Heroku
## Installation
System Requirements:
Node.js 18.17 or later.`git clone https://github.com/HACC2024/Kilowatt.git`
### Client (Next.js, Vercel)
- Navigate to client directory: `cd client`
- Install dependencies: `npm install` or `yarn install`
- Authentication: Auth0 Next.js SDK
- In `.env.example`, attain application keys after setting up Auth0. Note: `.env.local` and `.env.production` files are required when testing in development and production environments.
```
AUTH0_SECRET=''
AUTH0_BASE_URL=''
AUTH0_ISSUER_BASE_URL=''
AUTH0_CLIENT_ID=''
AUTH0_CLIENT_SECRET=''
LOGIN_REDIRECT_URL=''
LOGOUT_REDIRECT_URL=''
NEXT_PUBLIC_WEBSOCKET_SERVER_URL=''
```
- Start development server: `npm run dev`
- Start production server: `npm run start`
- Open browser to `http://localhost:3000`### Server (Node.js, Heroku)
- Navigate to server directory `cd server`
- Install dependencies: `npm install` or `yarn install`
- If needed, install nodemon:
- Globally: `npm install -g nodemon`
- Locally: `npm install nodemon --save-dev`
- In `.env.example`, add respective appliance MQTT topics
```
AC_TOPIC=
REF_TOPIC=
CEIL_FAN_TOPIC=
OVEN_TOPIC=
TV_TOPIC=
WASHER_DRY_TOPIC=
PORCH_LIGHT_TOPIC=
CEIL_LIGHT_TOPIC=
```
- Start development server (with nodemon): `npm run dev`
- Open browser to `http://localhost:3001`
- Hosted Node.js server on Heroku: [click here!](https://kilowatt-fe71e37c0622.herokuapp.com/)