Skip to content

ucisharadlab/occupancy-app

 
 

Repository files navigation

TIPPERS Occupancy App

This is the repository for the TIPPERS Occupancy App, an application used for analyzing occupancies using the TIPPERS Api across UC Irvine's campus. This was developed by primarily by Lasse Nordahl with assistance from Tristan Jogminas for Authentication/Deployment improvements.

Running

The TIPPERS Occupancy App is a create-react-app application and is run through the same steps.

Step 1

Download the repository

Step 2

Run npm install inside the repository

Step 3

Configure the application to utilize the correct endpoints through:

  1. Changing the REACT_APP_BASE_URL in .react to point to your TIPPERS Api.
  2. Changing the REACT_APP_OBSERVATION_ID in .react to be the observation type for occupancy values on the TIPPERS Api.
  3. Changing the REACT_APP_BASE_ENTITY in .react to be the id of the entity that will serve as the root of your application.

Step 4

Run the application using ./react start [configuration case (dev, uci, etc)]

Step 5 (Deployment)

Build the application using ./react build [configuration case (dev, uci, etc)]

Optional: In the ./react file, set REACT_APP_LOOP_ENTITIES=true to loop through the defined links for the application. In globals/looping-entities.js, add entity links similar to the ones already defined there. Every 15 seconds, the application will loop through between the defined links.

Step 6 (Deployment on UCI Tippers Server)

  1. Follow the steps above
  2. SSH into the TIPPERS server using ssh [email protected]
  3. cd into the occupancy_app directory
  4. Use git pull to pull most recent changes on the develop branch
  5. Run ./react build (dev, uci)
  6. Run server restart occupancy_dev using the IP above. This is the dev instance of tippers.

Extra Notes

To change the occupancy query for the application dependant on the TIPPERS structure, take a look at lines 231-241 on the src/views/Home.js file. Here the query is defined for the application.

Functionality

The TIPPERS Occupancy App is built to utilize the TIPPERS Semiotic API for realtime and historical occupancy tracking of different IoT spaces. Data for different entities can be exported using the data analytics panel to a CSV. Take a look below to see different functionalities of the app.

View heatmaps of various spaces

Campus View

Select different time intervals

Time Interval

Observe nested spaces

Donald Bren Hall View

See floor-maps created by users

Floor Maps

See advanced analytics for different spaces (Work in progress)

Analytics

About

Occupancy Application for the TIPPERS Research Team

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 70.9%
  • CSS 20.1%
  • Python 5.9%
  • HTML 2.0%
  • Shell 1.1%