plexWatch - Plex Notify Script - Send Push Alerts On New Sessions and Stopped

@brisimmons105 said:
Out of the blue, plexWatch seems to just stopped working.  I can pull up the plexWatchWeb and see content currently being played, but I no longer receive notifications (via pushover) and it’s not writing the plays to the history or log.  Any idea what’s going on?

EDIT: This was an issue with my permissions on my plexWatch folder.  I’ve restored them, and all is well.

Same happened to me… :frowning: What exactly did you “restore”?

Is it possible to see the title in the push notification subject?

[user]: [push_title] - [title] as opposed to just [user]: Watched

I’m currently using boxcar v2.
I know email has this option but I’d prefer the push method through a push server.

Thank you in advance.
~art

Screenshot shown below:
https://www.dropbox.com/s/lma9sdigsoknykj/plex.jpg?dl=0

I answered my own question… sorry guys… I’m sure this isn’t the best method but i ended up modifying the plexwatch.pl boxcar2 ‘cfirst’ option to** {title}** as opposed to** {item _type}** and that seemed to fixed the issue

I am using PlexWatch on my Ubuntu server, but i want to exclude myself from getting notifications. I tried everything but i cannot get this to work.
Is there anyone who can tell me step by step how i can achieve this?

@Arjan1105
I’m only comfortable with Windows, and haven’t tested, but presume if I add
--exclude_user JamminR
to my command line that runs every few minutes, I wouldn’t get notifications on myself.

@JamminR said:
Arjan1105
I’m only comfortable with Windows, and haven’t tested, but presume if I add
--exclude_user JamminR
to my command line that runs every few minutes, I wouldn’t get notifications on myself.

Thnx, i tried something similar.
I added that line at the end of my cronjob, but that way it stopped working at all.
I is kind of annoying because i watch a lot, and i don’t want the notifications…

When i do:

/opt/plexWatch/plexWatch.pl --exclude_user Arjan1105

I get the following message:

* Skipping any Notifications – command line options set, use ‘–notify’ or supply no options to enable notifications

When i do:

opt/plexWatch/plexWatch.pl --notify --exclude_user Arjan1105

I get:

-bash: opt/plexWatch/plexWatch.pl: No such file or directory

So what am i doing wrong??

@Arjan1105 said:
/opt/plexWatch/plexWatch.pl --exclude_user Arjan1105
VERSUS
opt/plexWatch/plexWatch.pl --notify --exclude_user Arjan1105

So what am i doing wrong??

Seems your missing a forward slash on that second command.
/opt versus opt.

How can you get plexwatch twitter to work on windows 10?

Can plexWatch notify me when a User starts to Sync a video?

I followed this guide to install plexwatch on my plex jail in Freenas http://forums.nas4free.org/viewtopic.php?t=7891

I am having a notification issues I can’t resolve. I decided to use Boxcar 2 for my notifications. The iOS app says it is Boxcar v1.5. I didn’t create an account, but that doesn’t seem to be an issue. My config.pl file has the following.

'boxcar_v2' => { 'enabled' => 1, ## set to 1 to enable local boxcar_v2 ( device specific ) 'push_recentlyadded' => 1, 'push_watched' => 1, 'push_watching' => 1, 'push_paused' => 1, 'push_resumed' => 1, 'access_token' => 'xxxxx', ## Access token from your Device 'from' => 'user_xxxx', ## From Name displayed on boxcar 'sound' => 'bird-1', 'icon_url' => 'https://rarforge.com/images/plexWatch.57x57.png', },

I never receive notifications. Where/how can I troubleshoot this?

I’m having some issues with what I presume is Socket::SSL. Fresh install of the latest Ubuntu server.

/opt/plexWatch$ /opt/plexWatch/plexWatch.pl --test_notify=stop
Failed to post Pushover notification -- user watched title [T or D - for Transcoded or Direct] on client platform for duration watched [Percent of video watched -- user could have only watched 5 minutes, but skipped to end = 100%%] result:SSL_verify_mode must be a number and not a string at /usr/share/perl5/IO/Socket/SSL.pm line 2130.

@radiocolin said:
I’m having some issues with what I presume is Socket::SSL. Fresh install of the latest Ubuntu server.

/opt/plexWatch$ /opt/plexWatch/plexWatch.pl --test_notify=stop
Failed to post Pushover notification -- user watched title [T or D - for Transcoded or Direct] on client platform for duration watched [Percent of video watched -- user could have only watched 5 minutes, but skipped to end = 100%%] result:SSL_verify_mode must be a number and not a string at /usr/share/perl5/IO/Socket/SSL.pm line 2130.

I solved this by deleting this line from plexWatch.pl:

SSL_verify_mode => "SSL_VERIFY_NONE",

I removed mulitple instances, but I believe it’s the one here (around line 3800):

`sub myPlexToken() {
if (!$myPlex_user || !$myPlex_pass) {
print "* You MUST specify a myPlex_user and myPlex_pass in the config.pl
";
print "
$myPlex_user = ‘your username’
";
print " $myPlex_pass = ‘your password’

";
exit;
}
my $ua = LWP::UserAgent->new( ssl_opts => {
verify_hostname => 0,
SSL_verify_mode => “SSL_VERIFY_NONE”,
});`

I’m sure there will be a more official solution at some point :slight_smile:

That seems to have done it. Probably subject to MITM attacks but… oh well.

Great script and accompanying front end, I’ve got it configured 90% to my liking (sending prowl notifications when stuff starts being watched etc), but can’t seem to figure out how to get recently added posted to twitter.

I’ve successfully setup the twitter app, and using the --test_notify=recent flag on on the script, an example is tweeted as you’d expect, but when things are actually added to libraries nothing is tweeted. I’m sure it’s just a switch to flip, but it’s not clear where that is, seems most of the doc/wiki I’m looking at is deprecated and haven’t been able to find an example searching this thread. Any help would be appreciated, thanks.

note: running in a freebsd jail on freenas for reference.

Just updated the Plex Server to 0.9.16.3 from 0.9.14.6 … plexWatch stopped reporting the ip address in the notifications. Tried updating plexWatch.pl to 0.3.4 (I was using 0.3.1) without luck. Any advice?

Thanks

I’m using pushover and want to be able to get notifications but with priority of -1. Refer to this link for the priority parameters: pushover.net/api#priority

I’m not sure how to implement this into the plexWatch.pl file. I tried to add "priority" => $po{'priority'}, to the lines below in the plexWatch.pl file, but couldn’t get anything to work:

my $response = $ua->post( "https://api.pushover.net/1/messages.json", [ "token" => $po{'token'}, "user" => $po{'user'}, "sound" => $po{'sound'}, "title" => $po{'title'}, "priority" => $po{'priority'}, "message" => $po{'message'}, ]);

I also added 'priority' => '-1', in the config file under pushover.

The original code is below to allow you to find the code I tried editing in the plexWatch.pl file:

my $response = $ua->post( "https://api.pushover.net/1/messages.json", [ "token" => $po{'token'}, "user" => $po{'user'}, "sound" => $po{'sound'}, "title" => $po{'title'}, "message" => $po{'message'}, ]);

If someone can edit the code, and show me how to get priority for pushover notifications working I would really appreciate it :slight_smile:

@simonx said:
Just updated the Plex Server to 0.9.16.3 from 0.9.14.6 … plexWatch stopped reporting the ip address in the notifications. Tried updating plexWatch.pl to 0.3.4 (I was using 0.3.1) without luck. Any advice?

Thanks

One of the recent updates to plex changed the location of the log file into a sub folder i think. Or they renamed it can’t really remember one or the other. Just look through the root folders and try finding its folder path that way. Ive manually changed the location from default so can’t tell you exactly where the log file is.

My plexWatch all of a sudden stopped working. Tried ./plexWatch.pl and returned this:

    DBD::SQLite::db do failed: unable to open database file at ./plexWatch.pl line 1655.
    
    DBD::SQLite::db prepare failed: unable to open database file at ./plexWatch.pl line 1656.
    
    Can't call method "execute" on an undefined value at ./plexWatch.pl line 1657.

Any ideas? At first I thought it was a corrupt dB, but replacing it with a backup from before the time it stopped working (and also the last time of the last item in my plexWatch.db) did not do anything. PlexWatchWeb also just says could not load database, please check settings. Help please! Thank you!

I started getting myPlex username and password errors… I think this is related to my update of PMS to 1.1.0.2611 (Ubuntu) as now other apps that I use that request plex to run a library update are now also getting authentication errors. Is there a fix in the works or anything that I can change?