A bot to ombi with
- Ruby >= 1.9.3
- Bundler/RubyGems
- Install git (varies by platform)
- Cone from git
git clone https://github.com/tidusjar/ombibot-1.git
- Install dependencies
$ bundle install
-
Set up Slack bot
- Create a Slack app and configure it in your workspace
- Add features: Bots, Interactive Components, and Permissions
Permissions include:
- chat:write:bot
- bot
- commands
- Collect slack API key for the bot under
OAuth & Permissions
saveBot User OAuth Access Token
(will be needed later) - Under
Interactive Components
fill inRequest URL
for the callback URL- This needs to be the address of the system running the bot, on TCP port 4567 o in cases where the bot is hosted behind a NAT or router, port 4567 must be forwarded to the system hosting the bot o the address needs to be accessible from the internet, so use your WAN IP
- URL can be HTTP (non-secured)
-
Replace environment variables
- Copy
.env.example
to.env
- Edit
.env
with the Ombi information
SLACK_API_TOKEN=(copied from Slack bot setup in step 1) OMBI_API_KEY=(copied from the Ombi server, Settings, Ombi, Ombi Configuration, API Key) OMBI_URL=http://ombi_ip_or_fqdn:5000 OMBI_USER=apiuser
Editing the OMBI_USER is optional, but the user must exist in Ombi.
- Copy
-
Start the server
$ bundle exec foreman start
-
The bot should now be accessible in Slack, add it to a channel!
-
?
-
Profit!
(optional) Linux auto-start:
- create a script with the following lines:
#!/bin/bash
cd /path/to/ombibot
bundle exec foreman start
- add script to statup using /etc/rc.local using screen (before Exit 0):
su - local_username -c "screen -dm bash -c /pathtoscript/script.sh"
- reboot
Note: if there's ever a problem, you can access the bot by logging in as local_username and typing:
screen -r
reboot, or re-run /etc/rc.local as root to restart the bot.
plex search ricky bobby
will return Talladega Nights: The Ballad of Ricky Bobby
Command Structure:
[trigger] [command] [expression]
trigger
- one of "plex" or "ombibot" or "ombi"command
- one of "download" or "find" or "search" or "get" or "request"expression
- the movie you're searching for (TV support coming soon.)
You can also send DMs to the bot, for your more embarassing requests. The DMs don't require the trigger word.