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:
- Docker - Container tool
- docker-compose - Multi-container orchestration tool
- PHP - Scripting language
- Composer - Dependency manager for PHP
- Laravel - PHP framework
- Sail - Laravel command-line interface for Laravel's Docker environment
- Livewire - Laravel dynamic front-end framework
- NodeJS - JavaScript runtime environment
- TailwindCSS - CSS framework
- MySQL - Relational database
- Redis - Key/value store
- Soketi - Websocket server
- NOAAPort Npemwin - EMWIN ByteBlaster client.
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:
- First, clone the repo and change directory:
git clone https://github.com/jbuitt/emwin-controller
cd emwin-controller/
- Next, source the env file and build all of the Docker images:
source sail.env
docker compose build
- Now, install the PHP dependencies:
docker run --rm --interactive --tty \
--volume $PWD:/var/www/html \
--entrypoint /usr/local/bin/install_php_deps.sh \
emwin-controller:latest
-
Copy the
.env.example
file to.env
and make your environment variable changes (documented below). -
Create an Laravel App Key:
docker run --rm --interactive --tty \
--volume $PWD:/var/www/html \
--entrypoint /var/www/html/artisan \
emwin-controller:latest \
key:generate
- Now, install the front-end dependencies:
docker run --rm --interactive --tty \
--volume $PWD:/var/www/html \
--entrypoint /usr/local/bin/install_fe_deps.sh \
emwin-controller:latest
- Next, download the other container images and start everything up by running:
./vendor/bin/sail up -d
- Now, you migrate and seed the database:
./vendor/bin/sail artisan migrate \
--seed \
--force
- Create the symbolic link so the web server has access to files in the storage directory:
./vendor/bin/sail artisan storage:link
- 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
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.
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 useproduction
. -
APP_DEBUG
- Debug mode. Typically will want this set tofalse
. -
APP_URL
- Base URL for the app. Running in Docker, you would normally set tohttp://127.0.0.1:8080
. -
DONT_FORCE_HTTPS
- Specifies whether the UI should generate https:// URLS. Unless you're proxying using certificates, this should betrue
. -
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
or1
) to specify whether you want to runnpemwind
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.
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..
See LICENSE file.