How to Install plexWatch on Ubuntu (14.04+ Trusty Tahr)


This guide will show you how to install and configure plex watch, Plex watch will Notify and Log ‘Now Playing’ and ‘Watched’ content from a Plex Media Server + ‘Recently Added’ (…and more)

What it does

  • notify when a user starts watching a video
  • notify when a user stops watching a video
  • notify when a user pauses watching a video
  • notify when a user resumes watching a video
  • notify on recently added content to a PMS server
  • notifies via email, prowl, pushover, growl, twitter, boxcar, pushbullet, GNTP and/or a log file
  • enable/disable notifications per provider & per notification type (start, stop, paush, resume, recently added)
  • backed by a SQLite DB (for state and history)
  • CLI to query watched videos, videos being watched and stats on time watched per user
  • Limit output per user or exclude users

Perl Requirements

  • LWP::UserAgent
  • XML::Simple
  • DBI
  • Time::Duration;
  • Time::ParseDate;
  • JSON


Download and to /opt/plexWatch/

  • WGET

sudo wget -P /opt/plexWatch/

sudo wget -P /opt/plexWatch/


  • CURL

sudo mkdir -p /opt/plexWatch/

sudo curl -o /opt/plexWatch/

sudo curl -o /opt/plexWatch/

Now lets change the Permission of the files

sudo chmod 777 /opt/plexWatch && sudo chmod 755 /opt/plexWatch/

sudo cp /opt/plexWatch/ /opt/plexWatch/

Lets edit the PlexWatch configuration file

sudo nano /opt/plexWatch/


$server = 'localhost';   ## IP of PMS - or localhost
$port   = 32400;         ## port of PMS
$notify_started = 1;   ## notify when a stream is started (first play)
$notify_stopped = 1;   ## notify when a stream is stopped


$notify = {...
* to enable a provider, i.e. file, prowl, pushover
set 'enabled' => 1, under selected provider
* Prowl     : 'apikey' required
* Pushover  : 'token' and 'user' required
* Growl     : 'script' required :: GrowlNotify from (GNTP replaces this)
* twitter   : 'consumer_key', 'consumer_secret', 'access_token', 'access_token_secret' required
* boxcar    : 'email' required
* pushover  : 'apikey' and 'device' required
* GNTP      : 'server', 'port' required. 'password' optional. You must allow network notifications on the Growl Server

Now lets install some of the perl requirements

sudo apt-get install libwww-perl libxml-simple-perl libtime-duration-perl libtime-modules-perl libdbd-sqlite3-perl perl-doc libjson-perl

run the script manually to verify it works: /opt/plexWatch/

  • start video(s)
  • /opt/plexWatch/
  • stop video(s)
  • /opt/plexWatch/

setup crontab to run the script every minute

sudo nano /etc/crontab

lets add

* * * * * YOUR_USERNAME /opt/plexWatch/

Now its setup and ready to go, now lets add some notifications

Supported Push Notifications

Twitter setup

  • create a new app @
  • click “Create New App”
    • Name: unique name for for your app
    • Description: fill something in…
    • Website: you need some valid website..
    • (read) and accept terms
    • click “Create you Twitter Application”
  • click “Modify app permission” under the Details Tab
    • change to Read and Write
    • update settings
  • click the “API keys” tab
    • click “create my access token”
    • click “Test OAuth” button to view the required API keys need for
  • Edit the
    • enable notification for twitter in
    • enter in the required keys, secrets and tokens



Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.