# plexWatch - Windows Branch

**URL:** <https://forums.plex.tv/t/plexwatch-windows-branch/41818>\
**Category:** Dev/API Corner\
**Tags:** other-dev\
**Created:** [September 1, 2013, 10:52pm UTC](https://forums.plex.tv/t/plexwatch-windows-branch/41818 "2013-09-01T22:52:58Z")\
**Posts on this page:** 20\
**Page:** 4

<div class="post-metadata">

**Author:** ![AntiTrust](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/antitrust/32/299170_2.png) [@AntiTrust](https://forums.plex.tv/u/AntiTrust)\
**Post date:** [October 11, 2013, 6:22pm UTC](https://forums.plex.tv/t/plexwatch-windows-branch/41818/61 "2013-10-11T18:22:12Z")

</div>

> I wouldn't call that a "bug" and I am not sure you are understanding what it does correctly. &nbsp;It's showing you exactly what the end user is doing. It will only notify once if a user was playing an item, and them they pause it. It will not continue to notify if the user keeps it paused. It will also notify on the resume if of course you have push\_resumed enabled. &nbsp;

You are correct, sir! I only had Paused enabled, not Resume - And one of my users kept pausing/resuming a video playback. Just a wierd&nbsp;coincidence.  
  
I've also got Twitter working, so I am one happy camper. Thanks a bunch for this! Now onto PlexWatchWeb testing..&nbsp;

---

<div class="post-metadata">

**Author:** ![ljunkie](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ljunkie/32/6512_2.png) [@ljunkie](https://forums.plex.tv/u/ljunkie)\
**Post date:** [October 11, 2013, 6:25pm UTC](https://forums.plex.tv/t/plexwatch-windows-branch/41818/62 "2013-10-11T18:25:18Z")

</div>

> You are correct, sir! I only had Paused enabled, not Resume - And one of my users kept pausing/resuming a video playback. Just a wierd&nbsp;coincidence.  
>   
> I've also got Twitter working, so I am one happy camper. Thanks a bunch for this! Now onto PlexWatchWeb testing..&nbsp;

Great! It makes me happy when things are actually working properly :)&nbsp;

---

<div class="post-metadata">

**Author:** ![AntiTrust](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/antitrust/32/299170_2.png) [@AntiTrust](https://forums.plex.tv/u/AntiTrust)\
**Post date:** [October 11, 2013, 6:48pm UTC](https://forums.plex.tv/t/plexwatch-windows-branch/41818/63 "2013-10-11T18:48:15Z")

</div>

Regarding twitter, can I just add a new line in alert\_format with 'new' as the definition?&nbsp;

---

<div class="post-metadata">

**Author:** ![ljunkie](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ljunkie/32/6512_2.png) [@ljunkie](https://forums.plex.tv/u/ljunkie)\
**Post date:** [October 11, 2013, 6:58pm UTC](https://forums.plex.tv/t/plexwatch-windows-branch/41818/64 "2013-10-11T18:58:22Z")

</div>

> Regarding twitter, can I just add a new line in alert\_format with 'new' as the definition?&nbsp;

I don't have the option to "format" recently added content the same as the others, since it doesn't really fit into the same criteria as the others. The code is pretty close to allow for it, but I will have to work that in and verify it. Of course the allowed variables will potential be different or just less since it's not a "now playing" item.

Edit: I meant to mention that I will look into this for next release.

---

<div class="post-metadata">

**Author:** ![AntiTrust](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/antitrust/32/299170_2.png) [@AntiTrust](https://forums.plex.tv/u/AntiTrust)\
**Post date:** [October 11, 2013, 7:01pm UTC](https://forums.plex.tv/t/plexwatch-windows-branch/41818/65 "2013-10-11T19:01:20Z")

</div>

Great, thanks for the info.&nbsp;

---

<div class="post-metadata">

**Author:** ![ljunkie](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ljunkie/32/6512_2.png) [@ljunkie](https://forums.plex.tv/u/ljunkie)\
**Post date:** [October 11, 2013, 7:03pm UTC](https://forums.plex.tv/t/plexwatch-windows-branch/41818/66 "2013-10-11T19:03:40Z")

</div>

> Great, thanks for the info.&nbsp;

Can you give me an example of what you want it to look like? For TV and Movies. That way I hopefully don't miss options you were looking for. I usually try to include all of them, but you never know.

---

<div class="post-metadata">

**Author:** ![Solar\_Bang](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/solar_bang/32/6190_2.png) [@Solar\_Bang](https://forums.plex.tv/u/Solar_Bang)\
**Post date:** [October 11, 2013, 7:53pm UTC](https://forums.plex.tv/t/plexwatch-windows-branch/41818/67 "2013-10-11T19:53:37Z")

</div>

Well, I'm clearly missing something. I thought it all worked together. Now I'm thinking their is a web part which reads the db and one on the local system that creates the db. I'm def missing something. ARG!

---

<div class="post-metadata">

**Author:** ![ljunkie](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ljunkie/32/6512_2.png) [@ljunkie](https://forums.plex.tv/u/ljunkie)\
**Post date:** [October 11, 2013, 7:57pm UTC](https://forums.plex.tv/t/plexwatch-windows-branch/41818/68 "2013-10-11T19:57:13Z")

</div>

> Well, I'm clearly missing something. I thought it all worked together. Now I'm thinking their is a web part which reads the db and one on the local system that creates the db. I'm def missing something. ARG!

Correct. You will always need to run plexWatch no matter what. The plexWatch/Web is a front end to display what plexWatch has gathered.

---

<div class="post-metadata">

**Author:** ![pruitt62](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/pruitt62/32/5104_2.png) [@pruitt62](https://forums.plex.tv/u/pruitt62)\
**Post date:** [October 11, 2013, 8:15pm UTC](https://forums.plex.tv/t/plexwatch-windows-branch/41818/69 "2013-10-11T20:15:56Z")

</div>

Installed the new version a little while ago, and it seems to be working as advertised. Thanks!

---

<div class="post-metadata">

**Author:** ![FreakNL](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/freaknl/32/106953_2.png) [@FreakNL](https://forums.plex.tv/u/FreakNL)\
**Post date:** [October 15, 2013, 7:29pm UTC](https://forums.plex.tv/t/plexwatch-windows-branch/41818/70 "2013-10-15T19:29:21Z")

</div>

Been testing this, pretty cool.

Got the Watching/Watched stuff going (by email) but I'm struggling with the "Recently Added". I just get an empty email with subject "New Movie". That's it.. Isn't there supposed to be more info?

---

<div class="post-metadata">

**Author:** ![Solar\_Bang](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/solar_bang/32/6190_2.png) [@Solar\_Bang](https://forums.plex.tv/u/Solar_Bang)\
**Post date:** [October 15, 2013, 7:48pm UTC](https://forums.plex.tv/t/plexwatch-windows-branch/41818/71 "2013-10-15T19:48:24Z")

</div>

You've gotten further than I have buddy. I'm still not sure if we have to schedule the exe to run every so often, or keep it running 24/7, and how to get it all talking.&nbsp;

---

<div class="post-metadata">

**Author:** ![FreakNL](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/freaknl/32/106953_2.png) [@FreakNL](https://forums.plex.tv/u/FreakNL)\
**Post date:** [October 15, 2013, 9:34pm UTC](https://forums.plex.tv/t/plexwatch-windows-branch/41818/72 "2013-10-15T21:34:07Z")

</div>

I'll give you a hand (but I only know about email configuration);  
  
I've downloaded the zip from github and the [plexWatch.exe](https://github.com/ljunkie/plexWatch/raw/dev/plexWatch.exe) and [config.pl-dist-win32](https://github.com/ljunkie/plexWatch/raw/dev/config.pl-dist-win32) from the startpost and put them all in c:\plexwatch (extracted the zip offcourse).  
  
Then I edited the downloaded config.pl-dist-win32 and made these changes&nbsp; (and saved it as config.pl)

```
   ## EMAIL -- multiple destinations are supported
    'EMAIL' => {
    
    '1' =>     {
        'enabled' => 1, ## set to 1 to enable local EMAIL
        'push_recentlyadded'  => 1,
        'push_watched'        => 1,
        'push_watching'       => 1,
        'push_paused'         => 0,
        'push_resumed'        => 0,
        'server' => 'mailserver.mydomain.nl', # your mail server
        'port' => '25', # your mail server port defalt 25 (587 is also a good choice)
        'from' => 'plex@mydomain.nl',   # your From email address: 'user@domain.com'
        'to' => 'mb@mydomain.nl',     # Email address to receive notification: 'user@domain.com'
        'username' => '', # AUTH if needed [optional]
        'password' => '', # AUTH if needed [optional]
        'subject' => '{user} {push_title} {title}', ## push_title is special for EMAIL (for now)
        'enable_tls' => 0,  # ENABLE for TLS support ( your smtp server must allow STARTTLS )
        'alert_format' => {
            'start'    =>  '{title} [{streamtype}] [{year}] [{rating}] on {platform} [{progress} in] {ip_address} {all_details}',
        'paused'   =>  '{title} [{streamtype}] [{year}] [{rating}] on {platform} [{progress} in] [{percent_complete}%] {ip_address} {all_details}',
        'resumed'  =>  '{title} [{streamtype}] [{year}] [{rating}] on {platform} [{progress} in] [{percent_complete}%] {ip_address} {all_details}',
        'stop'     =>  '{title} [{streamtype}] [{year}] [{rating}] on {platform} for {duration} [{percent_complete}%] {ip_address} {all_details}',
        },
    },
    
    '2' =>     {
        'enabled' => 1, ## set to 1 to enable EMAIL
        ## fill in the rest if you need more then 1 email notification
    },
    
    },
    
};
```

Don't really know what the 1 and 2 is? Looks like I have to enable email twice?  
  
After this I scheduled plexWatchNotify.vbs to run every five minutes. Then I watched a show and got nice emails about it ;-)  
  
/edit  
What I actually think the exe is doing is creating some sort of snapshot of the log file. (first run). If you run it again (second run), it just looks up what has changes in the log file since the previous run. And then does some email sending or pushing. And then this process is just repeated over and over again (hence, that's why you have to schedule it over and over again) That's why (I think) you should not run it 24/7 but run it every so often (I choose 5 minutes, because 1 minute is silly).  
  
But perhaps I'm completely wrong here, I'm still learning :)  
  
/edit2  
And my question still stands, why do I only get a blank email saying "New Movie" in the subject? :)

---

<div class="post-metadata">

**Author:** ![ljunkie](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ljunkie/32/6512_2.png) [@ljunkie](https://forums.plex.tv/u/ljunkie)\
**Post date:** [October 15, 2013, 9:40pm UTC](https://forums.plex.tv/t/plexwatch-windows-branch/41818/73 "2013-10-15T21:40:33Z")

</div>

> Been testing this, pretty cool.
> 
> Got the Watching/Watched stuff going (by email) but I'm struggling with the "Recently Added". I just get an empty email with subject "New Movie". That's it.. Isn't there supposed to be more info?

I'll add it as an issue. I have noticed the body is sometimes blank for recently added. That is a different process than all the other notifications ( watched, watching, paused, etc) so it's very possible there is some sort of bug in just the RA stuff.

---

<div class="post-metadata">

**Author:** ![FreakNL](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/freaknl/32/106953_2.png) [@FreakNL](https://forums.plex.tv/u/FreakNL)\
**Post date:** [October 15, 2013, 9:43pm UTC](https://forums.plex.tv/t/plexwatch-windows-branch/41818/74 "2013-10-15T21:43:19Z")

</div>

Okay thanks! Thought it was just me being thick, but I'll be patient then ;-)

Great project btw! :)

---

<div class="post-metadata">

**Author:** ![ljunkie](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ljunkie/32/6512_2.png) [@ljunkie](https://forums.plex.tv/u/ljunkie)\
**Post date:** [October 15, 2013, 9:43pm UTC](https://forums.plex.tv/t/plexwatch-windows-branch/41818/75 "2013-10-15T21:43:58Z")

</div>

> You've gotten further than I have buddy. I'm still not sure if we have to schedule the exe to run every so often, or keep it running 24/7, and how to get it all talking.&nbsp;

The install instructions are [http://forums.plexapp.com/index.php/topic/79616-plexwatch-windows-branch/?p=456754](http://forums.plexapp.com/index.php/topic/79616-plexwatch-windows-branch/?p=456754)

I am not sure I could have made it any easier, but people here are friendly, so run through those steps and just ask any questions about issues you have. It should "just" work if you run it on the same server PMS is running.

---

<div class="post-metadata">

**Author:** ![pruitt62](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/pruitt62/32/5104_2.png) [@pruitt62](https://forums.plex.tv/u/pruitt62)\
**Post date:** [October 15, 2013, 9:48pm UTC](https://forums.plex.tv/t/plexwatch-windows-branch/41818/76 "2013-10-15T21:48:15Z")

</div>

A quick question for ljunkie. I noticed in the config file some new advanced parameters.

> $watched\_show\_completed = 1; ## advanced config -- always show completed show/movie as it's own line  
> $watched\_grouping\_maxhr = 2; ## advanced config -- do not group shows together if start/restart is \> X hours

How exactly should these be used, and are they working in the Windows version? I had thought it would group views of a show that are started and stopped a few times into a single db record for that viewing. But either I am using it wrong, or it's not working, because I get multiple records for a show in those circumstances still. I guess I'm just curious what those parameters should be doing. hehe

---

<div class="post-metadata">

**Author:** ![ljunkie](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ljunkie/32/6512_2.png) [@ljunkie](https://forums.plex.tv/u/ljunkie)\
**Post date:** [October 16, 2013, 1:48am UTC](https://forums.plex.tv/t/plexwatch-windows-branch/41818/77 "2013-10-16T01:48:55Z")

</div>

> A quick question for ljunkie. I noticed in the config file some new advanced parameters.  
>   
>   
> How exactly should these be used, and are they working in the Windows version? I had thought it would group views of a show that are started and stopped a few times into a single db record for that viewing. But either I am using it wrong, or it's not working, because I get multiple records for a show in those circumstances still. I guess I'm just curious what those parameters should be doing. hehe

  
Those are for the cli output only (--watched). If you are referring to the fact plexWatch/Web is not grouping them, don't worry it's coming soon :) The new version will work with existing data, so keep it running.

---

<div class="post-metadata">

**Author:** ![pruitt62](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/pruitt62/32/5104_2.png) [@pruitt62](https://forums.plex.tv/u/pruitt62)\
**Post date:** [October 17, 2013, 3:34am UTC](https://forums.plex.tv/t/plexwatch-windows-branch/41818/78 "2013-10-17T03:34:14Z")

</div>

> Those are for the cli output only (--watched). If you are referring to the fact plexWatch/Web is not grouping them, don't worry it's coming soon :) The new version will work with existing data, so keep it running.

Actually the question was prompted by what I found when I investigated the db structure, and viewed the records in the tables. I saw that there was a separate record for each instance of a show being started by a client, even if they were from the same client, and the same show, and started only minutes apart. I played around with that setting and couldn't see any difference, and came here to ask. Now it makes sense that it was just for your CLI. Thanks for the answer!

And I am also glad to hear that plexWatch/Web will handle this all better in a future release. That wasn't a big concern to me, but glad to hear all the same. Thanks again!

---

<div class="post-metadata">

**Author:** ![SiscoPlex](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/siscoplex/32/6113_2.png) [@SiscoPlex](https://forums.plex.tv/u/SiscoPlex)\
**Post date:** [October 18, 2013, 7:07pm UTC](https://forums.plex.tv/t/plexwatch-windows-branch/41818/79 "2013-10-18T19:07:13Z")

</div>

Awesome!!!!! AWEsome!!!!! AWESOME!!!!!&nbsp;

LOVE what you have done.

Just wanted to say that.

Now ill try to get plexWatchWeb to work.............. Crossing fingers&nbsp; ;)

---

<div class="post-metadata">

**Author:** ![purp23](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@purp23](https://forums.plex.tv/u/purp23)\
**Post date:** [October 18, 2013, 9:42pm UTC](https://forums.plex.tv/t/plexwatch-windows-branch/41818/80 "2013-10-18T21:42:19Z")

</div>

I may have missed this but why do some of my users not show up, I have multiple using Roku's but only 2 out of 5 I get notifications for all have their own accounts and all on the same version.

Great program by the way

[Previous page](https://forums.plex.tv/t/plexwatch-windows-branch/41818.md?page=3)

[Next page](https://forums.plex.tv/t/plexwatch-windows-branch/41818.md?page=5)
