Skip to content

Latest commit

 

History

95 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EMWIN Controller

This software provides a download client and web dashboard for downloading "products" from EMWIN (Emergency Managers Weather Information Network). EMWIN 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. Besides satellite transmission, EMWIN is also able to disseminate its products through the use of ByteBlaster servers. The National Weather Service stopped hosting their own ByteBlaster servers several years ago, however several individuals have resurrected a new network of public ByteBlaster servers.

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/emwin-controller.git
cd emwin-controller/
  1. Copy the Docker Compose config file:
cp docker-compose.yml.example docker-compose.yml
  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 \
  emwin-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 \
  emwin-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 \
  emwin-controller:latest \
  npm i

docker run --rm --interactive --tty \
  -e WWWUSER=$(id -u) \
  --volume $PWD:/var/www/html \
  emwin-controller:latest \
  npm run build
  1. Next, download the other container images 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 emwin-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=

This is the Application Key required by Laravel. Step #5 above will generate a key and populate this variable in your .env file.

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 - Laravel App Environment. You'll want to use production.

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

  • APP_URL - Base URL for the app. Running in Docker, you would normally set to http://127.0.0.1:8080.

  • DONT_FORCE_HTTPS - Specifies whether the UI should generate https:// URLS. Unless you're proxying using certificates, this should be true.

  • NPEMWIN_CLIENT_SERVERLIST - Comma-delimited list of one or more servers with their port separated by a colon. (e.g. host1:port1,host2:port2,...). You can get a list of current servers here.

  • FILE_SAVE_REGEX - Regular expression used to specify which products you want to save. Default is .*. (match all products)

  • KEEP_LOGS_DAYS - Number of days to keep log files. This is to help so you don't fill up your filesystem.

  • KEEP_PRODUCTS_DAYS - Number of days to keep product files. This is to help so you don't fill up your filesystem.

  • NPEMWIN_CLIENT_AUTOSTART - Flag (0 or 1) to specify whether you want to run npemwind upon startup.

  • ENABLED_PAN_PLUGINS - Comma-deleted list of plugins to run. You can leave this blank if you don't want to use the plugin system.

Plugins

EMWIN 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 EMWIN (Emergency Managers Weather Information Network) Controller Web & API project! It is based on Laravel 10 w/ PHP 8.2 and is developed & run in Docker.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages