On-hand Flood Alerts
FloodWatch is a Pebble smartwatch app that shows nearby reports of flooding.
FloodWatch shows flood reports recorded by the open source flood map PetaJakarta.org that are within five kilometres from the watch's location.
- Pebble Smartwatch ("Aplite" firmware)
- Pebble Time Smartwatch ("Basalt" firmware)
Pebble Tool v4.3 (active SDK: 3.14)
pebble install --emulator [aplite|basalt]
Watch (via developer connection)
pebble install --phone [phone_ip_address]
Run all tests
There is a git pre-commit hook which will run the 'npm test' command before your commit and will fail the commit if testing fails.
To use this hook, copy the file from 'git-hooks/pre-commit' to '.git/hooks/pre-commit' in your project folder, and make it executable.
cp git-hooks/pre-commit .git/hooks/ chmod u+x .git/hooks/pre-commit
The following dependencies are required by the app. Note that as Pebble
- TurfJS v3.3.x
The following packages are required for testing. Note that including these in
package.json breaks the build, instead they are listed in
scripts/cibuild or can be installed manually using npm.
Messages are limited to the 10 most recent reports at any one time (within 5 km of user), more than this results in unreasonably long list on the watch. This also helps to reduce memory footprint of the app.
Message descriptions are fixed to 160 characters, as this is a good amount of text to read at font size 18 on the watch. Messages longer than this will be truncated.
For calculation of
INBOX_SIZE report fields are as follows
|Field/Key||Number of characters||Notes|
|DESCRIPTION||160||Fit watch screen|
|LENGTH||2||Length of PKEY array (max 10)|
Thus, including delimiters a message containing a full compliment of 10 flood reports should contain a maximum of 227 characters.
Using the Pebble SDK formula we estimate that a maximum of 2220 bytes are needed per message.
Artwork and App Resources
Artwork for the Pebble app store are in the
app_resources folder. Raw image files are in GIMP .xcf format.
This project was funded by a University of Wollongong, Faculty of Engineering and Information Sciences summer scholarship awarded to Hasitha Jayanandana and supervised by Tomas Holderness & Matthew Berryman at the SMART Open Source Geospatial Lab.
Notes on Pebble SDK
The most convenient method to run FloodWatch is the online Pebble Development application CloudPebble.
- CloudPebble requires a pebble account to login and run the pebble application.
- Upon importing the repository from github compile the files using the Compilation tab and set the emulator to Basalt or Aplite.
- Real time logs for the application can be viewed using the View App Logs tab.
The Pebble SDK runs on the UNIX terminal. The SDK can be downloaded from https://developer.pebble.com and manually installed or can be directly installed from the terminal using Homebrew. The website contains instructions for the installation of the SDK using both methods.
- After installation download the Zip folder from the repository, extract it and set it as the current directory.
- Build the application using the instructions above.
- Installation of the application can be done using the instructions above.
- Alternatively, to install the app directly using CloudPebble. use
pebble install --cloudpebble. This installs the application through the CloudPebble connection established by the Pebble Time App on the connected Android or iOS device.
- To view the app logs on the terminal use
pebble build --emulator [aplite|basalt] --logs.