Skip to content

This is the NWWS-OI (NOAA Weather Wire Open Interface) Controller Web & API project! It is based on Laravel 10 w/ PHP 8.2 and is developed and run in Docker.

License

Notifications You must be signed in to change notification settings

jbuitt/nwwsoi-controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NWWS-OI Controller

This software provides a download client and web dashboard for downloading "products" from NWWS-OI (NOAA Weather Wire - Open Interface. NOAA Weather Wire is a satellite data collection and dissemination system operated by the National Weather Service. Its purpose is to provide state and federal government, commercial users, media and private citizens with timely delivery of meteorological, hydrological, climatological and geophysical information.

This client was developed and tested on Ubuntu 22.04 (64-bit) and Raspberry Pi OS (64-bit) using the following open-source software stack:

How do I run it?

Please see the disclaimer below if you wish to run this software on a Raspberry Pi.

Asuming you already have Docker and Docker Compose installed, just following the instructions below:

  1. First, clone the repo and change directory:
git clone https://github.com/jbuitt/nwwsoi-controller.git
cd nwwsoi-controller/
  1. Copy the desired file you want Docker Compose to use.
cp docker-compose-prod.yml docker-compose.yml

# or

cp docker-compose-dev.yml docker-compose.yml   # usually what you want
  1. Copy the example env file to the file to source in the next step:
cp sail.env.example sail.env
  1. Next, source the env file and build all of the Docker images:
source sail.env
docker compose build
  1. Now, install all the PHP dependencies:
docker run --rm --interactive --tty \
  -e WWWUSER=$(id -u) \
  --volume $PWD:/var/www/html \
  nwwsoi-controller:latest \
  composer install -ovn 
  1. Copy the .env.example file to .env and make your environment variable changes (documented below).

  2. Create an Laravel App Key:

docker run --rm --interactive --tty \
  -e WWWUSER=$(id -u) \
  --volume $PWD:/var/www/html \
  nwwsoi-controller:latest \
  ./artisan key:generate --force
  1. Now, install the front-end dependencies:
docker run --rm --interactive --tty \
  -e WWWUSER=$(id -u) \
  --volume $PWD:/var/www/html \
  nwwsoi-controller:latest \
  npm i 

docker run --rm --interactive --tty \
  -e WWWUSER=$(id -u) \
  --volume $PWD:/var/www/html \
  nwwsoi-controller:latest \
  npm run build 
  1. Next, download the other containers and start everything up by running:
./vendor/bin/sail up -d
  1. Now, you migrate and seed the database:
./vendor/bin/sail artisan migrate \
   --seed \
   --force
  1. Create the symbolic link so the web server has access to files in the storage directory:
./vendor/bin/sail artisan storage:link
  1. Finally, you can access the dashboard from a browser by going to http://127.0.0.1:8080.

You'll need an admin user to log into the dashboard, create one first by running:

./vendor/bin/sail artisan nwwsoi-controller:create_admin_user

Running on a Raspberry Pi

If you would like to run this software on a Raspberry Pi, I recommend using a Raspberry Pi 4 Model B with either 4 or 8 GB of memory booting from a quality solid-state drive. Running on a Pi Zero, 1, or 3 -or- booting from a MicroSD card is not recommended due to the poor performance you're likely to have.

.env Environment Variables

The following environment variables will need to be set:

APP_KEY=

NWWSOI_USERNAME=
NWWSOI_PASSWORD=
NWWSOI_RESOURCE=

Environment Variables in .env which requires a value:

  • APP_KEY - Laravel App Key. Step #5 above will generate a key and populate this variable in your .env file.
  • NWWSOI_USERNAME - Your NWWS-OI username (Get your NWWS-OI credentials here)
  • NWWSOI_PASSWORD - Your NWWS-OI password (Get your NWWS-OI credentials here)
  • NWWSOI_RESOURCE - The XMPP Resource ID. This should be unique on the NWWS-OI server. (e.g., John Doe's NWWS-OI Controller)

Other variables that can be modified from their default values:

  • APP_NAME - The name of this app. (Shows up in the browser tab and dashboard)

  • APP_ENV - The app environment. Typically will want this to be set to production.

  • APP_DEBUG - Debug mode. Typically will want this set to false.

  • APP_URL - The URL of the NWWS-OI Controller application. If running locally, you'll want this set to http://localhost.

  • NWWSOI_CONFIG_AUTOSTART - Flag to specify whether you want the NWWS-OI ingester to run at start up. (e.g., 0 or 1)

  • NWWSOI_FILE_SAVE_REGEX - Regular expression for specifying what types of products you want to save. Default is .*, which is all products. Should be surrounded by single quotes. (e.g., '.*')

Plugins

NWWS-OI Console includes a "plugin" system that gives you the option to take some action when a product is downloaded. For example, you could write a plugin that sends you Tornado Warnings matching a specific Weather Forecast Office via SMS text message.

More to come..

Author

License

See LICENSE file.

About

This is the NWWS-OI (NOAA Weather Wire Open Interface) Controller Web & API project! It is based on Laravel 10 w/ PHP 8.2 and is developed and run in Docker.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published