npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

antennas

v4.2.0

Published

HDHomeRun emulator for Plex DVR to connect to Tvheadend.

Downloads

37

Readme

Antennas

A JavaScript port of tvhProxy which is a program that translates the Tvheadend API to emulate a HDHomeRun API. This is particularly useful to connect Plex's DVR feature to Tvheadend.

Getting it running

Tvheadend Configuration

To be able to stream from Tvheadend through Plex, you need to set up an anonymous user in Tvheadend that has streaming rights. You can do this in the users section, by creating a user *:

Example configuration

Using binaries

Head over to the release section and download the binary for your platform. It will come with a config/config.yml that you can edit to reflect your setup, and you can simply run antennas in the console and the server will start up and start proxying Tvheadend over to Plex!

Run locally using Node

Right now, due to Docker networking issues, the best way to get this working is by running it directly through node.

To run it as a daemon: node index.js >/dev/null 2>&1 &

Run locally using NPX

npx antennas --config foo/bar.yml

OR

TVHEADEND_URL=http://admin:[email protected]:9981 ANTENNAS_URL=http://127.0.0.1:5004 TUNER_COUNT=6 DEVICE_UUID=2f70c0d7-90a3-4429-8275-cbeeee9cd605 npx antennas

Docker

Another way to get it running is to run it using Docker. Note that some functionality is currently not quite working when hosting this as a Docker container, namely, discovery from Plex. But with that warning, if you so choose to continue using Docker, the instructions are below.

To start a Docker container running Antennas, run the command below. Note you must replace the ANTENNAS_URL and TVHEADEND_URL value to match your setup:

docker run -p 5004:5004 -e ANTENNAS_URL=http://x.x.x.x:5004 -e TVHEADEND_URL=http://replace:[email protected]:9981 thejf/antennas

To view if the configurations have been passed correctly, you can point your browser to where you are hosting Antennas (in the above example, it would be http://x.x.x.x:5004 but this is a placeholder address that needs to be changed) and you should see a summary of your configurations on the page:

Example landing page

Alternatively, you can set it with all the available environment variables:

  docker create --name=antennas
    -e ANTENNAS_URL=http://x.x.x.x:5004 \
    -e TVHEADEND_URL=http://replace:[email protected]:9981 \
    -e TUNER_COUNT=6 \
    -p 5004:5004 \
    thejf/antennas

And then docker start antennas

Or, you can try by mounting a volume, set by yourself in path/to/config, that will need a config.yml to work. Example of a config.yml is available here, or below:

tvheadend_url: http://replace:[email protected]:9981
antennas_url: http://x.x.x.x:5004
tuner_count: 6
  • docker create --name=antennas -v <path/to/config>:/antennas/config -p 5004:5004 thejf/antennas
  • Set up config.yml (see configuration instructions here) where you pointed the config volume (what you replaced <path/to/config> with
  • Finally, docker start antennas

Configuration

Antennas can be configured either via the config.yml or environment variables. Environment variables take precedence over the config.yml.

config.yml

Antennas will look for three values inside a config/config.yml file. They are:

  • tvheadend_url: This is the path to your Tvheadend setup, with username, password, and port. Plex doesn't like localhost so it's best to find your own local IP and put this in if Tvheadend and Plex are running on the same network. For example: http://user:[email protected]:9981
  • tuner_count: This is for the number of tuners in Tvheadend.
  • stream_url: Optional field to set a stream URL that is different from the Tvheadend URL, for private Docker networks

Environment variables

If you want to set environment variables instead of modifying the config.yml, you can do so. The environment variable names are the same than the config.yml, except capitalized. So, TVHEADEND_URL and TUNER_COUNT.

Optionally, for private Docker networks that need to expose a different URL for the streams, you can specify a public stream URL using TVHEADEND_STREAM_URL

CLI parameters

  • --config followed by the config path, i.e. --config foo/bar.yml will allow you to set a custom path for the config file
  • --nologo will disable the big ASCII art logo for a simple text one

Contributing

  1. Fork it ( https://github.com/thejf/antennas/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request