"The Portable Energy Management System is designed to maintain human life in rough terrain for an unlimited amounts of time." - Dr. David Davis
This repository contains the source for running the PEMS server and user interface. It allows the continuous monitoring and management of systems contained in a Pod, alerting its consumers of environmental and power concerns.
Starting development on PEMS is very simple. All prerequisites freely available, and you don't require a web server such as TomCat to run it.
git clone https://github.com/ICTD-Maroubra/PEMS
NOTE: The server requires a Linux environment with BlueZ ≥ 5.37 installed if you wish to make use of the bluetooth monitoring module.
cd pems-server
./gradlew build
./gradlew run
For more documentation on the server's API, you can navigate to http://HOST:PORT/api-browser
when running the server.
The following table lists environment variables that can be set to configure the server.
Option | Default | Description |
---|---|---|
PEMS_HOST | 0.0.0.0 | The pems server host IP |
PEMS_PORT | 9005 | The pems server port |
PEMS_MONGODB_CONNECTION | mongodb://0.0.0.0:27017 | MongoDB connection string |
PEMS_MONGODB_DATABASE | pems | MongoDB database to use |
PEMS_BLE_ENABLED | false | Bluetooth connections enabled (requires Linux w/ Bluez) |
cd pems-interface
yarn install && yarn start
cd pems-server
./gradlew test
cd pems-interface
yarn install && yarn test
Deploying PEMS is a multi stage process:
- API/Monitoring Server
- Interface Application
PEMS server requires a Linux environment with BlueZ ≥ 5.37 installed. An easy way to deploy has been provided through a Docker image.
NOTE: Due to issues with device sharing in both MacOS xhyve and Windows Hyper-V virtualization layers, Docker for Mac and Docker for Windows will not be able to make use of the bluetooth devices for monitoring.
First build the image:
cd pems-server
./gradlew build
cd ../
docker build -t pems-server .
Then run the container:
docker run pems-server
To build installers:
cd pems-interface
yarn install && yarn dist
TBC
MIT License
Copyright (c) 2017
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This project would not be possible without the contributions made by following individuals:
- Aashish Singla (@aashishs1994)
- Ali Kutlu Omeroglu (@kutluo)
- Angze Li (@lkxlaz)
- Eric Herkes (@ericherkes)
- Jacqueline Morgan (@jacqmorg)
- Jeremy Yiu (@Jeremyyiu)
- Liekun Shen (@alberty4573)
- Mohammad Azimi (@yasinazimi)
- Ossama Ghanem (@OssamaGh)
- Prasanth Ambikaipalan (@PA1984)
- Raymond Deng (@rayziqideng)
- Robert McDonald
- Smit Patel (@smit93)
- Taylor Graham (@twgraham)
- Vishal Uniyal (@VishalUniyal)
- Wei Ke