Code Monkey home page Code Monkey logo

emwin-controller's Introduction

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
cd emwin-controller/
  1. Next, source the env file and build all of the Docker images:
source sail.env
docker compose build
  1. 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
  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 \
  --volume $PWD:/var/www/html \
  --entrypoint /var/www/html/artisan \
  emwin-controller:latest \
  key:generate
  1. 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
  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.

emwin-controller's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.