plexWatch - Windows Branch



You didn’t need to update the config if you were upgrading the exe, but it sounds like you might need to restart your PMS. Check http://192.168.1.12:32400/status/sessions/ in a web browser. Until that works, plexWatch won’t either.

So I got Plexwatch working last night and then worked on getting Plexwatch/web working. I'm using Windows 7. I have everything working but the IP addresses. For whatever reason I can't get the IP addresses to show. Everything else is good and seems to work great. This is what I have in the config file and I've confirmed debug logging is enabled on PMS. 
 

$server_log = 'C:\Users\Adam\AppData\Local\Plex Media Server\Logs\Plex DLNA Server.log'; ## used to log IP address of user (alpha)
$log_client_ip = 1; ## requires $server_log to be available too. (requires File::ReadBackwards)

The debug log shows this:
Tue Dec 31 09:36:27 2013: Locating IP for 3284:7a9a598c-81d3-431a-8294-cedfa67dbae7 [xxx:Clerks II] from C:\Users\Adam\AppData\Local\Plex Media Server\Logs\Plex DLNA Server.log... NO IP found (160 lines searched)

The other thing I wanted to mention that I don't know how to fix is, my times are all off on plexWatch/web. The logs show the correct time, Plexwatch/web shows me something different(a 5 hour difference, assuming it uses UTC?).

So I got Plexwatch working last night and then worked on getting Plexwatch/web working. I'm using Windows 7. I have everything working but the IP addresses. For whatever reason I can't get the IP addresses to show. Everything else is good and seems to work great. This is what I have in the config file and I've confirmed debug logging is enabled on PMS. 
 

$server_log = 'C:\Users\Adam\AppData\Local\Plex Media Server\Logs\Plex DLNA Server.log'; ## used to log IP address of user (alpha)
$log_client_ip = 1; ## requires $server_log to be available too. (requires File::ReadBackwards)

The debug log shows this:
Tue Dec 31 09:36:27 2013: Locating IP for 3284:7a9a598c-81d3-431a-8294-cedfa67dbae7 [xxx:Clerks II] from C:\Users\Adam\AppData\Local\Plex Media Server\Logs\Plex DLNA Server.log... NO IP found (160 lines searched)

The other thing I wanted to mention that I don't know how to fix is, my times are all off on plexWatch/web. The logs show the correct time, Plexwatch/web shows me something different(a 5 hour difference, assuming it uses UTC?).

Enable verbose and debug logging options on your Plex Media Server in order to start tracking IP addresses. These options can be found under: 

  • Settings/General (Advanced Settings Enabled)

Time in plexWatch/Web is based on your web server's timezone setting. The following portion of the plexWatch/Web wiki details how to change your timezone for XAMPP but you should be able to apply it to your web server assuming you know where your php.ini file is stored.

https://github.com/ecleese/plexWatchWeb/wiki/XAMPP-Users#timezone-notes

Ok, thanks, I've managed to fix the time with no problem.

For the IP address tracking, I've enabled verbose and debug logging and restarted PMS with no luck in anything changing. It seems to be the same logs as well. I goto check where Plexwatch looks for the IP addresses (C:\Users\Adam\AppData\Local\Plex Media Server\Logs\Plex DLNA Server.log) and there doesn't seem to be anything that shows an IP address of a client.

Here's what the debug shows now:
Tue Dec 31 14:02:53 2013: Locating IP for item 8183 from C:\Users\Adam\AppData\Local\Plex Media Server\Logs\Plex DLNA Server.log.1... NO IP found (222 lines searched)

Anything else I'm missing?

You didn't need to update the config if you were upgrading the exe, but it sounds like you might need to restart your PMS. Check http://192.168.1.12:32400/status/sessions/ in a web browser. Until that works, plexWatch won't either.

I restarted pms it is working. but, i am still getting an error the result cannot connect to 192.168.1.12/32400 (timeout)

Can you paste the error or provide a screenshot? What you are saying would make sense as the URL is not /32400 it’s :32400


I restarted pms it is working. but, i am still getting an error the result cannot connect to 192.168.1.12/32400 (timeout)

Yea, you have the wrong log file specified. You need to specify the Plex Media Server log, not the DLNA log

Edit the config.pl

change

$server_log = 'c:\\Users\\Adam\\AppData\\Local\\Plex Media Server\\Plex DLNA Server.log';

to

$server_log = 'c:\\Users\\Adam\\AppData\\Local\\Plex Media Server\\Plex Media Server.log';

Ok, thanks, I've managed to fix the time with no problem.

For the IP address tracking, I've enabled verbose and debug logging and restarted PMS with no luck in anything changing. It seems to be the same logs as well. I goto check where Plexwatch looks for the IP addresses (C:\Users\Adam\AppData\Local\Plex Media Server\Logs\Plex DLNA Server.log) and there doesn't seem to be anything that shows an IP address of a client.

Here's what the debug shows now:
Tue Dec 31 14:02:53 2013: Locating IP for item 8183 from C:\Users\Adam\AppData\Local\Plex Media Server\Logs\Plex DLNA Server.log.1... NO IP found (222 lines searched)

Anything else I'm missing?

PlexWatch v0.2.0

  • Grouping could be incorrect -- no data loss occured -- will fix itself

Upgrade instructions:

  • replace plexWatch.exe
  • that's it ( it will upgrade/fix itself )

ljunkie, this is an amazing product that I have long awaited for! I am so glad that i stumbled upon it tonight after doing some generic forum searching.  Thank you for your excellent effort.  It took me a little while to get up and running, I too stumbled over the not running the plexWatch.exe problem from the command prompt and the not specifying the database file name with the full path in config.pl file, but now I am up and running. 

I do have a question though, I have read through this forum and the PlexWatchWeb forum and hopefully didn't miss the answer to my question.  I do not have a lot of other users using my server, I have limited web server knowledge and I have fear that if I setup a webserver on my PMS box that it could potentially be compromised from the outside world.. 

Thus, I am looking for a simple way that I can quickly and perhaps easily view the data of who is watching what.. I understand that from the command line I can run: plexWatch.exe -watching or plexWatch.exe -watched, but is there perhaps a GUI app or anything anyone knows of that this can be done from the Windows Desktop side? 

Or can some one shore me up on the security of running a XAMPP or WAMP server? I would like to be able to see what is being watched on my phone at work or remotely without having to remote into the server from an outside location.. 

Thanks!

Thanks for the kind words, always appreciated. The simple way to have a front-end is to use the plexWatch/Web. The only other option is the cli. I will not be creating some sort of GUI app as web front works. That being said, it's open source and anyone who wants to create front ends is more than welcome :) That is how plexWeb/Watch came about.

For questions relating to XAMPP/WAMP and the front-end, i'd suggest asking them over here in the plexWatch/Web thread. There is also a wiki on the setup, but I am not sure it addresses any security concerns you may have.

I do know for one, you can run the server locally and you don't have to expose it to the world. This way you don't have to worry about any external compromises. Of course though, you'd only be able to browse this info from your lan.

ljunkie, this is an amazing product that I have long awaited for! I am so glad that i stumbled upon it tonight after doing some generic forum searching.  Thank you for your excellent effort.  It took me a little while to get up and running, I too stumbled over the not running the plexWatch.exe problem from the command prompt and the not specifying the database file name with the full path in config.pl file, but now I am up and running. 

I do have a question though, I have read through this forum and the PlexWatchWeb forum and hopefully didn't miss the answer to my question.  I do not have a lot of other users using my server, I have limited web server knowledge and I have fear that if I setup a webserver on my PMS box that it could potentially be compromised from the outside world.. 

Thus, I am looking for a simple way that I can quickly and perhaps easily view the data of who is watching what.. I understand that from the command line I can run: plexWatch.exe -watching or plexWatch.exe -watched, but is there perhaps a GUI app or anything anyone knows of that this can be done from the Windows Desktop side? 

Or can some one shore me up on the security of running a XAMPP or WAMP server? I would like to be able to see what is being watched on my phone at work or remotely without having to remote into the server from an outside location.. 

Thanks!

This is the error I’m getting

Thanks for the heads up! I will head over there to check out their setup guide..

I am having an issue though, which probably has to do with logging.. 

I have watched a few things today and I ran plexWatch.exe -Watched from the command line, but it only returned the thing I watched last night and not the shows I watched today.. is logging something I have to setup? I saw a bit about that in other conversations, but I am really at a loss on what to use or how to do that..

Here's a screenshot

167uy6h.jpg

plexWatch is the glue that keeps the history, this means you have to run plexWatch every minute for it to query the PMS for anything being watched and it will log ( and notify if enabled) the history accordingly.

Make sure you did these steps: The second is only optional if you want to notify yourself on recently added content.

 

Automatically notify on watching/watched content: 

* schedule a task (every minute) to execute c:\plexWatch\plexWatchNotify.vbs  ( specify the start in folder as c:\plexWatch\

 

Automatically notify on Recently Added Content:

* schedule a task (every 5 minutes or more) to execute c:\plexWatch\plexWatchRecentlyAdded.vbs  ( specify the start in folder as c:\plexWatch\ )

Thanks for the heads up! I will head over there to check out their setup guide..

I am having an issue though, which probably has to do with logging.. 

I have watched a few things today and I ran plexWatch.exe -Watched from the command line, but it only returned the thing I watched last night and not the shows I watched today.. is logging something I have to setup? I saw a bit about that in other conversations, but I am really at a loss on what to use or how to do that..

Here's a screenshot

167uy6h.jpg

This is a pretty basic one. plexWatch is telling you that it could not query the PMS for the Now Playing content ( a simple HTTP call to the PMS api url). The URL in it's failing to query is

http://192.169.1.12:32400/status/sessions

So a couple steps for you to check:

1) in a web browser, on a machine other than the PMS, can you go to "http://192.169.1.12:32400/status/sessions"

2) Are you running plexWatch on the same machine as the PMS? If so, just change the PMS IP to 127.0.0.1 in the config.pl

3) If you are not running plexWatch on the same machine, then #1 is still the main question, however maybe your PMS IP changed? Is your PMS ip 192.169.1.12? If not, change it to the right IP in the config.pl

This is the error I'm getting

Thanks!  I had originally created the tasks last night but I had set them to run indefinately thinking that would work.. 

I am not too familiar with creating tasks so I had to use this guide http://stackoverflow.com/questions/4249542/windows-scheduler-to-run-a-task-every-x-minutes to figure it out.. but now it's running every minute.. 

I just noticed that my Plexwatch/Web still says “plexWatch Version: v0.1.9” even though i replaced it with the one downloaded from the link a few posts up. I also saw that in the file properties it says the same.
Is it just that the version number wasn’t updated on the actual .exe or is the link pointing to the wrong file?

Edit: I tried downloading the whole zip from GitHub and checked the properties of that .exe file. That one says v0.2.0, so it seems that the link https://github.com/ljunkie/plexWatch/raw/v0.2.0/plexWatch.exe somehow downloads the old .exe

Sorry! Another PEBKAC issue. It's been fixed. Please download again at the same URL.

I just noticed that my Plexwatch/Web still says "plexWatch Version: v0.1.9" even though i replaced it with the one downloaded from the link a few posts up. I also saw that in the file properties it says the same.

Is it just that the version number want updated on the actual .exe or ie the link pointing to the wrong file?

Edit:  I tried downloading the whole zip from GitHub and checked the properties of that .exe file. That one says v0.2.0, so it seems that the link https://github.com/ljunkie/plexWatch/raw/v0.2.0/plexWatch.exe somehow dowlods the old .exe

Hi,

I'm justing using email. When starting, stopping and pausing a movie, it works just great.

But is the Recently_added stuff working yet? When I do a
plexWatch.exe --test_notify=recent
is see this in the command window:
Fri Jan 10 14:11:16 2014: DEBUG test_notify: New Movie: Title [PG-13] [2013] 108min

The received email is empty, with subject with "New Movie"

When I do a

plexWatch.exe --recently_added=movie

nothing happens

I’ve heard of empty emails happening randomly not not all the time.

plexWatch.exe --test_notify=recent : is correct. There is no option for test to notify per recent type. It will also only notify on anything added within the last day of it being ran.

Hi,

I’m justing using email. When starting, stopping and pausing a movie, it works just great.

But is the Recently_added stuff working yet? When I do a
plexWatch.exe --test_notify=recent
is see this in the command window:
Fri Jan 10 14:11:16 2014: DEBUG test_notify: New Movie: Title [PG-13] [2013] 108min

The received email is empty, with subject with “New Movie”

When I do a

plexWatch.exe --recently_added=movie

nothing happens

I'm also having empty emails for new movies/tv shows. recently watched works fine

all notifications on prowl work, however