Coder Social home page Coder Social logo

rdio-openmhz-downstream's Introduction

Rdio Scanner - OpenMHZ Downstream

This is an middleware for Rdio-Scanner to upload to OpenMHZ. This allows you to select what talkgroups are being sent to OpenMHZ. In my case I want to upload all talkgroups to Rdio, but only some to OpenMHZ.

Setup

This guide assumes you have both Rdio-Scanner and OpenMHZ installed and configure. On Rdio-Scanner, you need to a system and an API Key defined.

Install and Run

You can run this locally (Gunicorn) or via Docker.

systems.json file

The systems.json file matches at system id from Rdio-Scanner to a shortname in OpenMHZ. These should have a one-to-one link.

{
    "1":"myshortname"
}

Variables

You can use the .env.example file to create a .env file if you are running locally, or utilize the docker environmental variables for setting the container arguments.

The configurable variables are

OPENMHZ_URL= (default http://127.0.0.1:8080) - the URL that the middleware is publicly accessible. This is used as a return URL for SDRTrunk.
LISTENING_PORT - (default 8080) port that the middleware is listening on
LISTENING_ADDRESS - (default 0.0.0.0) the IP address that Flask binds to
CAPTURE_DIR - (default /var/tmp) the directory the JSON metadata is sent to
WORKERS - (default 2) the number of workers for Flask (should be no more than 2n+1 where n is the number of CPU cores)

Gunicorn

Gunicorn is a WSGI for Flask. You can run it in the background. You need to clone repository, then install the Python requirements.

git clone https://github.com/robertlynch3/rdio-openmhz-downstream.git
cd rdio-openmhz-downstream
pip3 install -r requirements.txt

Once you have the requirments installed, you can run Gunicorn via

gunicorn server:app --config gunicorn.py

You can run Gunicorn as a systemd process, but that is out of scope. Follow this guide for more information.

Docker

To run via docker, you must have docker installed. Run the following to bring up the container.

docker run -d \
-p 8080:8080 \
-e OPENMHZ_URL=https://api.openmhz.com \
-e LISTEN_ADDRESS=8080 \
-v ./systems.json:/systems.json \
robertlynch3/rdio-openmhz-downstream:latest

Use the docker-compose.yml file for reference. You can run this as a stand-alone container or incorporate it into an existing Rdio-Scanner docker-compose.

Configure

Rdio Scanner Configuration

On Rdio-Scanner's admin panel, add a new downstream instance. Configure the URL for the middleware. Set the API Key as the key needed for OpenMHZ

Issues

Please report any issues via GitHub issues.

Currently this only supports MP3 uploads, but it is fairly trivial to add other media uploads.

rdio-openmhz-downstream's People

Contributors

robertlynch3 avatar

Watchers

 avatar

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.