plexWatch - Windows Branch

Hi.  I'm a little confused with initial setup...

1)  The user section - is is that Plex will label users as REAL_USER?   The only people using the server will be people I invited so not sure how their user names translate to "REAL_USER"

2)  Do I have to set up task scheduler for any tracking to happen?

3)  I see pushbullet in the config - So I install Chrome and pushbullet for this to work on the server?   Also, does this mean every time something happens I will get a notification on another device?

2) Yes, you need to set up the task to get logs

Hi.  I'm a little confused with initial setup...

1)  The user section - is is that Plex will label users as REAL_USER?   The only people using the server will be people I invited so not sure how their user names translate to "REAL_USER"

2)  Do I have to set up task scheduler for any tracking to happen?

3)  I see pushbullet in the config - So I install Chrome and pushbullet for this to work on the server?   Also, does this mean every time something happens I will get a notification on another device?

1) PlexWatch will label your friends using their plex usernames. You can change these to familiar names yourself in this section, for example changing the display from "biggyshorty1966" to "Mom".

2) Yes, see the instructions for scheduling the requisite tasks.

3) I have no idea about pushbullet. I use Growl/Prowl.

Any chance you can have the same installation vs 2 PLEX databases?

Confused user looking for help. I have had plexWatch / web working for some time but pretty much ignored it. However, now my kids have Plex accounts, I want to see what they have been watching. Everything was working & log files imported correctly until 24/11/14 - not sure what happened at that time as it could have been a plex server update or moving plex DB to a different drive.

So no updates to the plexWatch / plex db since then. If I run plexwatch.exe in a command window, I get the error message "Unable to open script source: No such file or directory" (settings below) - as far as I can tell, plexWatch isn't able to access the Plex log file so nothing is returned but for the life of me, I can't figure out what :( I've tried multiple combinations of folder names, single & double '\' but to no avail. The Plex log file IS at that location as I've just watched some media and checked that the file content of the log file was updated (and it was). I'm hoping it's a simple error on my part with folder / filenames.

Any help appreciated.

  • plexWatch/Web Version: v1.5.4.2
  • plexWatch Version: v0.2.8
  • Plex version 0.9.11.7
  • Home users enabled

$data_dir = 'c:\\plexWatch\\'; ## to store the DB, logfile - can be the same as this script

$server_log = 'D:\\__PlexPMS\Plex Media Server\Logs\Plex Media Server.log\\'; ## used to log IP address of user (alpha)

Hi,

Has anyone used the new user features with Plex but then gets the error "Cannot access Plex Media Server" when loading the spashscreen of Plex Watch Web?

The history of whats been watched etc is all there, its just the dashboard it says it cant connect; my user now uses a PIN because of the new Plex Home features, is that what is causing the problem?

Also, anyone know how to track who syncs whats as that does nto seem to show in the log.

Thanks.,

Hi all,

Anyone else got this problem since moving to the PLEX user access versions now where you can have multiple users using PLEX in the same home?

Still not getting access to the PLEX database but the history of whats been watched is still populating.

How do I configure the frequency of the Pushover notifications? I find I'm getting loads for each time someone watches something.

Thanks!

Is there a way I can exclude ONLY my user from notifications?

Obviously I dont need notifying that I am watching stuff, I can see it on the screen :D

Any chance we can see something like this for UnRAID. I have been looking for something that shows more stats of users on my server. Mainly a kick script, that allows to kick a user, or kick a user for a said period of time. As well, something that would show IPs of the user too.

This is just a windows app for now ?

I have installed the .exe i get the plexwatch.txt file and it works fine... i just cant get the webUi to work at all.  are there any walk troughs i could read?

All sorted now. It would seem that I was just running plexwatch from a command prompt. For some reason you have to actually specify the full filename, as in plexwatch.exe. No idea why really, but at least I've sorted it now!

Just for future reference for everyone else's benefit, here's my config files for plexWatch and plexWatch/web

I just had this issue when trying to set this up and could not figure out why. Thank you for posting the solution. I have never heard of needing to include .exe when running a program from command line. lol!

Does pushbullet support multiple iden devices or only a single at this time? I was hoping to have it send notifications to my phone and chrome. Thanks!

@ljunkie - Kind of a further to this query.. Is it possible to tweak it so I can send a pushbullet notification to my custom channel? I share my library with friends & family and would like to allow them the ability to subscribe to new episode notifications at their leisure. To do so I would need to be able to set the channel_tag field, as per the pushbullet API page snippet below:

Push to a device

Target Parameters
 
Each push has a target, if you don't specify a target, we will broadcast it to all of the user's devices. Only one target may be specified.
 
device_iden - Send the push to a specific device. Appears as target_device_iden on the push. You can find this using the /v2/devices call.
email - Send the push to this email address. If that email address is associated with a Pushbullet user, we will send it directly to that user, otherwise we will fallback to sending an email to the email address (this will also happen if a user exists but has no devices registered).
channel_tag - Send the push to all subscribers to your channel that has this tag.
client_iden - Send the push to all users who have granted access to your OAuth client that has this iden.

This is an amazing plugin btw, thank you very much.

edit: one more thing I'm having an issue with.. In the $user_display option where you can assign users (and their devices) friendly names, I have one person that uses their email address, but I can't parse it. I tried both with and without escaping the @ symbol:

'share\@email.com' => 'JohnDoe'

But the logs just come up as "share" - not the full email, or the assigned name. Any suggestions would be appreciated!

Hi man great work on this! 5 stars (of 5).
i'm having one problem and i don't know if i'm just stupid or what.
Things like "Current activity" works but not the history statistics or users.
windows is running the scripts every 5 mins because it didn't allow me to update every minute is that a possible reason? and if so what can i do about that i have windows 8.1
please help it works if i run the .exe btw.

Tank you for amazing program and sorry for my bad English 

Hi man great work on this! 5 stars (of 5).
i'm having one problem and i don't know if i'm just stupid or what.
Things like "Current activity" works but not the history statistics or users.
windows is running the scripts every 5 mins because it didn't allow me to update every minute is that a possible reason? and if so what can i do about that i have windows 8.1
please help it works if i run the .exe btw.

Tank you for amazing program and sorry for my bad English 

8.1 won't let you select 1 minute, but you can type it in manually. That is what I did.

8.1 won't let you select 1 minute, but you can type it in manually. That is what I did.

Oh ok that did the trick didn't see the option. Thanks.
But that doesn't look like the problem with the update thing. 

Hey guys! First off, thanks to all the devs and members for their support in supporting plexWatch and plexWatchWeb. I've got it (mostly) running and its great! But I would like to post a couple questions regarding my setup that you all could possible help with.

1. Getting scripts to work

  • I have run as a local (admin) user by clicking on PlexWatchNotify.vbs and recentlyadded.vbs and I confirm these work. (I also clicked on the check box saying its okay to run these files so I do not get a prompt everytime I run them.
  • I have set up task scheduler according to this thread
    • Triggers - At system startup - After triggered, repeat every minute indefinitely 
    • Actions:
      • Action = Start program
      • Program/script = Full directory path (C:\plexWatch\plexWatchNotify.vbs) 
      • Start in = Full directory path (C:\plexWatch)
    • Settings - Allow Task to be run on demand, Run task as soon as possible after a scheduled start is missed
  • My Problems with scripts:
    • I do not get notified if I start a new stream or if someone else starts one. 
    • In Task Scheduler = The scripts do not update the 'last run time' nor is Next Run Time listed
      • Tested waiting about 20 minutes and added new folders and starting several new streams and watched for 5-10 minutes and still no notification
    • Once I manually run the task (right click in task scheduler and run), I get alerted
      • While we are on the this topic, I am BLASTED with all manners of pushbullet notifications (several hours old that I have already seen, to the newest notifications) before when I manually run the task. Not sure if this is because I am manually doing this or I have something configured incorrectly.
    • plexWath Web does not update until I manually run the script (you all know this)

3. IP's do not show up plexWatch log / plexWatch Web

  • Are these settings correct? What am I doing wrong?
    • I have set up the Debug to verbose in PMS settings
    • " $server_log = '%LOCALAPPDATA%\Plex Media Server\Logs'; " is what I have in my config.pl
    • " $log_client_ip = 1; " is what I have in my config.pl

4. How do I properly name users? (I have read many posts about this and am still unsure about the nomenclature)

  • I understand that the plexWatch automatically names them based on user which is great and I have seen it work.
  • However:
    • I am sharing my info with my family, of which they use devices that do not support multi-user (PS4, Chromecast, Roku, Xbox 360, Xbox One, Amazon FireTV)
    • Because of the point above, all my my streams are labeled as "John Appleseed + PS4", etc. (you guys already know this)
  • How do I:
    • A: list names + devices (I haven't seen a guide on naming devices - are the names case sensitive? spaces? punctuation? - a little guidance here would be appreciated)
    • B: accommodate a situation where the same user and device are actually two separate users
      • I have two separate users using two separate chrome cast devices but both appear as "Dave Appleseed + Chromecast". How can I distinguish between the two?
      • Do I need to refer to IP addresses for this? (since I can't get IP logging to work I have not been able to even try) Is this even possible with PW?

I tried my best with formatting. Sorry if that is alot but I have basically solved all my issues thus far reading previous messages. I appreciate any help that you all suggest and I can supply addition info (screenshots, config, etc. if that would help).

Is anyone here that can help me? Things like “Current activity” works but not the history statistics or users.

@ljunkie - Kind of a further to this query.. Is it possible to tweak it so I can send a pushbullet notification to my custom channel? I share my library with friends & family and would like to allow them the ability to subscribe to new episode notifications at their leisure. To do so I would need to be able to set the channel_tag field, as per the pushbullet API page snippet below:

This is an amazing plugin btw, thank you very much.

...

I second this, It would be great to be able to push to a channel.

Edit: I looked into this a little more.

Looking at the plexwatch.pl file, specifically the NotifyPushbullet() function on lines 2453 - 2511, there appears to be the call to the Pushbullet API on line 2490. It appears that the call is to the V1 API but the channels feature is a part of the V2 API. I'm guessing that changing the call to use the V2 API instead of the V1 API would solve this. 

So line 2490:

    my $response = $ua->post( "https://$po{'apikey'}\@api.pushbullet.com/api/pushes", [

becomes:

    my $response = $ua->post( "https://$po{'apikey'}\@api.pushbullet.com/v2/pushes", [

I realize that this is for the Linux side of the equation and this is the Windows build thread. Being unable to look at the code for the Windows version I can't be sure but I'm guessing that the call is identical.

Edit:

To test this I setup the Linux version of plexWatch. Making the aforementioned change and adding the channel_tag variable to the config.pl and plexwatch.pl files I was able to push to a channel.

The config.pl file now looks like this:

'pushbullet' => {
   'enabled' => 1,
   'push_recentlyadded'  => 1,
   'push_watched'        => 1,
   'push_watching'       => 1,
   'push_paused'         => 1,
   'push_resumed'        => 1,
   'title'               => '{user}',
   'apikey'              => '', # Pushbullet API key https://ww$
   'device'              => '', # https://api.pushbullet.com/api/devices put yor API key as use$
   'channel'             => '', # Channel tag from https://www.pushbullet.com/my-channels
}, 

and the part of plexWatch.pl that handles the api calls to pushbullet looks like this:

    my $response = $ua->post( "https://$po{'apikey'}\@api.pushbullet.com/v2/pushes", [
                                  "device_iden" => $po{'device'},
                                  "channel_tag" => $po{'channel'},
                                  "type" => 'note',
                                  "title" => $po{'title'},
                                  "body" => $po{'message'},
                              ]);

Yet another edit:

To test I tried the following:

  1. Input a channel tag in the config.pl file and leave the device id blank.
  2. Input a device id in the config.pl file and leave the channel tag blank.
  3. Leave the device id and channel tag blank.

This produces the following results:

  1. Pushes to the specified channel only.
  2. Pushes to the specified device only.
  3. Pushes to all devices associated with the API key.

@ljunkie: Use as you please. I have no experience using github so I have no idea how to proceed with this. Please advice if there's something I should do.

@kristjan.gerhard,

Nice work on this modification. I’m trying it out for new release notifications which works but I have one problem. I currently just had my first new release in my PMS db and have a cron job execute plexWatch.pl --recently_added=movie,show once a minute.

Every time plexWatch.pl --recently_added=movie,show runs a new notification is sent out for the same new release via pushbullet. My Prowl notification was only sent oncelike it should. Would you mind confirming if this occurs for you too? Any thoughts on how to resolve this?

Thanks for looking into this! As you see, it's fairly modular so I am glad the change is pretty simple.  Would you mind adding an issue to the plexWatch repo? That will allow me to get to this when I can find the time, so i can get a windows build out too. Thanks again!

@eleese I don't see any reason why this change would cause that. Can you revert and see if it's still happening? I only see basically two lines that changed in this modifications, and none on which should cause any damage. Please make sure you are not running it with --debug, as that will allow duplicate notifications. 

I second this, It would be great to be able to push to a channel.

Edit: I looked into this a little more.

Looking at the plexwatch.pl file, specifically the NotifyPushbullet() function on lines 2453 - 2511, there appears to be the call to the Pushbullet API on line 2490. It appears that the call is to the V1 API but the channels feature is a part of the V2 API. I'm guessing that changing the call to use the V2 API instead of the V1 API would solve this. 

So line 2490:

    my $response = $ua->post( "https://$po{'apikey'}\@api.pushbullet.com/api/pushes", [

becomes:

    my $response = $ua->post( "https://$po{'apikey'}\@api.pushbullet.com/v2/pushes", [

I realize that this is for the Linux side of the equation and this is the Windows build thread. Being unable to look at the code for the Windows version I can't be sure but I'm guessing that the call is identical.

Edit:

To test this I setup the Linux version of plexWatch. Making the aforementioned change and adding the channel_tag variable to the config.pl and plexwatch.pl files I was able to push to a channel.

The config.pl file now looks like this:

'pushbullet' => {
   'enabled' => 1,
   'push_recentlyadded'  => 1,
   'push_watched'        => 1,
   'push_watching'       => 1,
   'push_paused'         => 1,
   'push_resumed'        => 1,
   'title'               => '{user}',
   'apikey'              => '', # Pushbullet API key https://ww$
   'device'              => '', # https://api.pushbullet.com/api/devices put yor API key as use$
   'channel'             => '', # Channel tag from https://www.pushbullet.com/my-channels
}, 

and the part of plexWatch.pl that handles the api calls to pushbullet looks like this:

    my $response = $ua->post( "https://$po{'apikey'}\@api.pushbullet.com/v2/pushes", [
                                  "device_iden" => $po{'device'},
                                  "channel_tag" => $po{'channel'},
                                  "type" => 'note',
                                  "title" => $po{'title'},
                                  "body" => $po{'message'},
                              ]);

Yet another edit:

To test I tried the following:

  1. Input a channel tag in the config.pl file and leave the device id blank.
  2. Input a device id in the config.pl file and leave the channel tag blank.
  3. Leave the device id and channel tag blank.

This produces the following results:

  1. Pushes to the specified channel only.
  2. Pushes to the specified device only.
  3. Pushes to all devices associated with the API key.

@ljunkie: Use as you please. I have no experience using github so I have no idea how to proceed with this. Please advice if there's something I should do.

@kristjan.gerhard,

Nice work on this modification. I'm trying it out for new release notifications which works but I have one problem. I currently just had my first new release in my PMS db and have a cron job execute plexWatch.pl --recently_added=movie,show once a minute.

Every time plexWatch.pl --recently_added=movie,show runs a new notification is sent out for the same new release via pushbullet. My Prowl notification was only sent oncelike it should. Would you mind confirming if this occurs for you too? Any thoughts on how to resolve this?