Your personal butler for all your arr needs
Butlarr is a telegram bot that allows the interaction of multiple people with arr instances. It allows the addition and managment of movies, series, and more to come.
Butlarr has been created with hackability and base-compatibility in mind. If you have a service that behaves logically the same as Sonarr or Radarr it will be compatible with Butlarr. Even if it is not compatible, it is relatively simple to extend the exesting code base for various other services.
After following the Setup and Configuration, ensure that the bot is running.
If not you can start it using: python -m butlarr
from the repository directory.
Open the telegram chat to the bot and authorize yourself using your previously set AUTH_PASSWORD
:
/auth <A_SECURE_PASSWORD>
Show a basic help page using /help
To add a movie for example, you could send /movie Alvin
-
First clone the repository and cd into it
git clone [email protected]:TrimVis/butlarr.git && cd butlarr
-
Run start script
./scripts/start_linux.sh
This will do steps 2, 3 and 5 of the Manual Setup.
-
First clone the repository and cd into it
git clone [email protected]:TrimVis/butlarr.git && cd butlarr
-
(Optional) Create a new venv & source it
python -m venv venv && source venv/bin/activate
-
Install dependencies
python -m venv venv && source venv/bin/activate
-
Configure butlarr (see Configuration)
-
Start the service
python -m butlarr
There is an automatic setup helper available. You can run it by executing the ./scripts/autosetup_linux.sh
file from the repository directory.
After cloning the repository and cd
ing into the repository, create a new file at butlarr/config/secrets.py
.
Paste and adapt the following template secrets.py
:
TELEGRAM_TOKEN = "<YOUR_TELEGRAM_TOKEN>"
AUTH_PASSWORD = "<A_SECURE_PASSWORD>"
APIS = {
"movie": ("http://localhost:7878/", "<RADARR_API_KEY>"),
"series": ("http://localhost:8989/", "<SONARR_API_KEY>"),
}
You will also have to add service instances, create a new file at butlarr/config/services.py
.
Paste and adapt the following template services.py
:
from .secrets import APIS
from ..services.radarr import Radarr
from ..services.sonarr import Sonarr
SERVICES = [
Radarr(
commands=["movie"],
api_host=APIS.get("movie")[0],
api_key=APIS.get("movie")[1],
),
Sonarr(
commands=["series"],
api_host=APIS.get("series")[0],
api_key=APIS.get("series")[1],
),
]
Create a new file under /etc/systemd/user
(recommended: /etc/systemd/user/butlarr.service
)
The new file should have following content (you have to adapt the REPO_PATH
):
[Unit]
Description = Butlarr Telegram Bot for Arr Service Managment
After = network.target
After = systemd-user-sessions.service
After = network-online.target
[Service]
Type = simple
WorkingDirectory = <REPO_PATH>
ExecStart = /bin/bash -c 'source venv/bin/activate; python -m butlarr'
ExecReload = /bin/kill -s HUP $MAINPID
KillMode = mixed
TimeoutStopSec = 300
Restart = always
RestartSec = 60
SyslogIdentifier = butlar
[Install]
WantedBy = multi-user.target
You can find a template at: templates/butlarr.service
Start it using: systemctl --user start butlarr
Enable it to start on reboots using: systemctl --user enable butlarr
- Create docker instructions
- Create a pip package