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.
The TIPPERS Occupancy App is a create-react-app application and is run through the same steps.
Download the repository
Run npm install
inside the repository
Configure the application to utilize the correct endpoints through:
- Changing the
REACT_APP_BASE_URL
in .react to point to your TIPPERS Api. - Changing the
REACT_APP_OBSERVATION_ID
in .react to be the observation type foroccupancy
values on the TIPPERS Api. - Changing the
REACT_APP_BASE_ENTITY
in .react to be the id of the entity that will serve as the root of your application.
Run the application using ./react start [configuration case (dev, uci, etc)]
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.
- Follow the steps above
- SSH into the TIPPERS server using
ssh [email protected]
cd
into theoccupancy_app
directory- Use
git pull
to pull most recent changes on the develop branch - Run
./react build (dev, uci)
- Run
server restart occupancy_dev
using the IP above. This is thedev
instance of tippers.
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.
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.