Git Product home page Git Product logo

tauticord's Introduction

Tauticord

A Discord bot that displays live data from Tautulli

Release Docker Licence

Buy Me A Coffee GitHub Sponsors

logo

Features

Tauticord uses the Tautulli API to pull information from Tautulli and display them in a Discord channel, including:

Overview:

  • Number of current streams
  • Number of transcoding streams
  • Total bandwidth
  • Total LAN bandwidth
  • Total remote bandwidth
  • Library item counts

For each stream:

  • Stream state (playing, paused, stopped, loading)
  • Media type (tv show/movie/song/photo)
  • User
  • Media title
  • Product and player
  • Quality profile
  • Stream bandwidth
  • If stream is transcoding
  • Progress of stream
  • ETA of stream completion

Administrator (the bot owner) can react to Tauticord's messages to terminate a specific stream (if they have Plex Pass).

Users can also indicate what libraries they would like monitored. Tauticord will create/update a voice channel for each library name with item counts every hour.

Installation and setup

Requirements

Tauticord runs as a Docker container. The Dockerfile is included in this repository, or can be pulled from Docker Hub or GitHub Packages.

Volumes

You will need to map the following volumes:

Host Path Container Path Reason
/path/to/logs/folder /logs Required, debug log file for bot will be generated here
/path/to/config/folder /config Optional, path to the folder containing the configuration file (override environmental variables)

Environmental Variables

You will need to set the following environment variables:

Environment Variable Required Value Example/Default
TC_DISCORD_BOT_TOKEN (required) Yes Discord Bot Token key from Discord Application above
TC_DISCORD_SERVER_ID (required) Yes Discord Server ID ID, right-click server icon in Discord
TC_TAUTULLI_URL (required) Yes IP of your Tautulli server http://192.168.1.x:8181
TC_TAUTULLI_KEY (required) Yes API key for Tautulli server abcd1234efgh5678ijkl9012mnop3456qrst
TC_PLEX_PASS No Enable PlexPass Features "False"
TC_REFRESH_SECONDS No Seconds between updates (5-second minimum built-in) 15
TC_TERMINATE_MESSAGE No Message sent to users when a stream is killed "Your stream has ended."
TC_SERVER_NAME No Name of the Plex server.
Will use provided; if not provided, will use "Plex"; if provided string is empty, will attempt to extract Plex Media Server name via Tautulli.
"Plex"
TC_USE_24_HOUR_TIME No Whether to display times in 24-hour time "False"
TC_ANON_USERS No Whether to hide usernames in the streams view "False"
TC_VC_STATS_CATEGORY_NAME No Name of the stats voice channel category "Tautulli Stats"
TC_VC_STREAM_COUNT No Whether to display current stream count in a voice channel "False"
TC_VC_TRANSCODE_COUNT No Whether to display current transcode count in a voice channel "False"
TC_VC_BANDWIDTH No Whether to display current bandwidth in a voice channel "False"
TC_VC_LOCAL_BANDWIDTH No Whether to display current local bandwidth in a voice channel "False"
TC_VC_REMOTE_BANDWIDTH No Whether to display current remote bandwidth in a voice channel "False"
TC_VC_PLEX_STATUS No Whether to display Plex online status in a voice channel "False"
TC_VC_LIBRARIES_CATEGORY_NAME No Name of the libraries voice channel category "Tautulli Libraries"
TC_VC_LIBRARY_STATS No Whether to display library statistics in voice channels "False"
TC_VC_LIBRARY_NAMES No Comma-separated list of libraries to display statistics of "Movies,TV Shows,Music"
TC_VC_LIBRARY_REFRESH_SECONDS No Seconds between updates (5-minute minimum built-in) 3600
TC_VC_TV_SERIES_COUNT No Display series counts for all selected "TV Shows" libraries "True"
TC_VC_TV_EPISODE_COUNT No Display episode counts for all selected "TV Shows" libraries "True"
TC_VC_MUSIC_ARTIST_COUNT No Display artist counts for all selected "Music" libraries "True"
TC_VC_MUSIC_TRACK_COUNT No Display track counts for all selected "Music" libraries "True"
TC_DISCORD_ADMIN_IDS No List of Discord IDs with admin privileges ID, right-click user profile in Discord
TC_DISCORD_CHANNEL_NAME No Channel name for updates "Tautulli Status"
TC_DISCORD_NITRO No Whether the Discord server has a Nitro subscription (bot will upload custom emojis) "False"
TC_ALLOW_ANALYTICS No Allow Anonymous Crash Analytics? "True"
TZ No Timezone that your server is in "America/New_York"

You can also set these variables via a configuration file:

  1. Map the /config directory (see volumes above)
  2. Enter the mapped directory on your host machine
  3. Rename the config.yaml.example file in the path to config.yaml
  4. Complete the variables in config.yaml

Please note, if the config.yaml file is present, the application will ONLY use this file for configuration. If you are going to use it, you need to fill it out in its entirety.

Run without Docker

You can run Tauticord outside of Docker by cloning this repository and either:

  • renaming config.yaml.example to config.yaml, filling out the settings inside config.yaml and running the bot with python3 run.py --config config.yaml
  • adding the above environmental variables to your system and running the bot with python3 run.py

Please note, this is NOT ADVISED. Running this application as a Docker container is the only officially-supported method of running Tauticord.

Common Issues

  • On startup, Tauticord attempts to upload a set of custom emojis that it will use when displaying stream information ( if they do not already exist). Your bot will need to have the Manage Emojis permission in order to do this.
    • Discord has a limit of 50 custom emojis per server. If you have reached this limit, you will need to remove some of your existing emojis before Tauticord can upload its own.
    • If you do not want to remove any of your existing emojis, Tauticord will simply skip uploading its own emojis and use the default emojis that Discord provides instead.

Analytics

Tauticord uses Google Analytics to collect statistics such as common errors that will help with future development. This data is limited, anonymous, and never sold or redistributed.

When and what data is collected?

  • Whenever the bot comes online
    • What operating system the bot is running on (Windows, Linux, MacOS, etc.)
  • Whenever an error is logged
    • What function the error occurred in.

What data is NOT collected:

  • Any identifying information about the user
  • Any identifying information about the computer/machine (a random ID is generated on each analytics call, IP addresses are anonymized)
  • Settings for Discord or Tautulli, including passwords, API tokens, URLs, etc.
  • Any data from Tautulli
  • Anything typed in Discord.

Development

This bot is still a work in progress. If you have any ideas for improving or adding to Tauticord, please open an issue or a pull request.

Contact

Please leave a pull request if you would like to contribute.

Follow me on Twitter: @nwithan8

Also feel free to check out my other projects here on GitHub or join the #developer channel in my Discord server below.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Contributors

Nate
Nate Harris
Thomas
Thomas White
Tim
Tim Wilson
Thomas
Thomas Durieux
Roy
Roy Du
benwaco/
benwaco

tauticord's People

Contributors

nwithan8 avatar tomw1605 avatar twilsonco avatar tdurieux avatar yoruio avatar benwaco 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.