needo's plexWatch plugin error question


Recommended Posts

"Failed to access plexWatch database. Please check your settings.", I have PlexPass and the following are my details (was wondering if I missed anything):

 

I also tried running plexWatch.pl -watched and it returned this (not sure if this should work with docker or not though):

root@Hades:/mnt/cache/apps/plexWatch# plexWatch.pl -watched
Can't locate LWP/UserAgent.pm in @INC (you may need to install the LWP::UserAgent module) (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl/usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./plexWatch.pl line 16.
BEGIN failed--compilation aborted at ./plexWatch.pl line 16.

 

1. docker log:

Plex Media Server.log located in /log directory
*** Running /etc/rc.local...
*** Booting runit daemon...
*** Runit started as PID 15
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.11. Set the 'ServerName' directive globally to suppress this message
*** Shutting down runit daemon (PID 15)...
*** Killing all processes...
*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
*** Running /etc/my_init.d/edge.sh...
Bleeding edge not requested
*** Running /etc/my_init.d/firstrun.sh...
Plex Media Server.log located in /log directory
*** Running /etc/rc.local...
*** Booting runit daemon...
*** Runit started as PID 12
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.12. Set the 'ServerName' directive globally to suppress this message

 

2. config.php:

<?php

require_once '/var/www/html/plexWatch/includes/functions.php';
$plexWatch['dateFormat'] = 'm/d/Y';
$plexWatch['timeFormat'] = 'g:i a';
$plexWatch['pmsIp'] = '10.10.1.3';
$plexWatch['pmsHttpPort'] = '32400';
$plexWatch['pmsHttpsPort'] = '32443';
$plexWatch['https'] = 'no';
$plexWatch['plexWatchDb'] = '/plexWatch/plexWatch.db';
$plexWatch['myPlexUser'] = '*****';
$plexWatch['myPlexPass'] = '*****';
$plexWatch['myPlexAuthToken'] = '*****';
$plexWatch['globalHistoryGrouping'] = 'yes';
$plexWatch['userHistoryGrouping'] = 'yes';
$plexWatch['chartsGrouping'] = 'yes';

?>

 

3. config.pl:

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

$server_log = '/log/Plex Media Server.log'; ## used to log IP address of user (alpha)
$log_client_ip = 0; ## requires $server_log to be available too. (requires File::ReadBackwards)
## also required DEBUG log to be turned on in the PMS

$debug_logging = 1; ## logs to $data_dir/debug.log ( not verbose enough yet.. still todo )

## myplex user/pass ONLY required if you have set the PMS to 'Require authentication on local networks' and $server is not set to localhost
$myPlex_user = '';
$myPlex_pass = '';

$server = '10.10.1.3'; ## IP of PMS - or localhost
$port = 32400;         ## port of PMS

$notify_started = 1;   # !deprecated -- does nothing anymore (use push_watched, push_watching in $notify)
$notify_stopped = 1;   # !deprecated -- does nothing anymore (use push_watched, push_watching in $notify)

$appname = 'plexWatch';

## Give a user a more friendly name. I.E. REAL_USER will now be Frank
## you may also specify the platform with user+platform
$user_display = {'REAL_USER1' => 'Frank',
                 'REAL_USER2' => 'Rob & Carrie',
                 'REAL_USER2+Roku 3' => 'Family Room',
                 'REAL_USER2+Roku' => 'Family Room',
                 'REAL_USER2+iOS' => 'Rob',
};


## format of alert - default. You can also override this per provider  ($notify below)
## run ./plexWatch.pl --format_options -- to see all
#       start = notification for start of video
#       stop = notification for stop of video
#       watched = cli output for watched content
#       watching = cli output content being watched
$alert_format = {'start'    =>  '{title} [{streamtype}] [{year}] [{rating}] on {platform} [{progress} in] {ip_address}',
                 'paused'   =>  '{title} [{streamtype}] [{year}] [{rating}] on {platform} [{progress} in] [{percent_complete}%] {ip_address}',
                 'resumed'  =>  '{title} [{streamtype}] [{year}] [{rating}] on {platform} [{progress} in] [{percent_complete}%] {ip_address}',
                 'stop'     =>  '{title} [{streamtype}] [{year}] [{rating}] on {platform} for {duration} [{percent_complete}%] {ip_address}',
                 'watched'  =>  '{user} watched {title} [{streamtype}] [{year}] [{length}] [{rating}] on {platform} for {duration} [{percent_complete}%] {ip_address}',
                 'watching' =>  '{user} {state} {title} [{streamtype}] [{year}] [{rating}] [{length}] on {platform} for {duration} [{percent_complete}%] [{time_left} left] {ip_address}'
};

## Notification Options
$notify = {

    'file' => {
        'enabled' => 1,  ## 0 or 1 - set to 1 to enable File Logging
        'filename' => "$data_dir/plexWatch.log", ## default is plexWatch.log
    },

    'prowl' => {
        'enabled' => 0, ## 0 or 1 - set to 1 to enable PROWL
        'push_recentlyadded'  => 0,
        'push_watched'        => 0,
        'push_watching'       => 0,
        'push_paused'         => 0,
        'push_resumed'        => 0,
        'apikey' => 'YOUR API KEY', ## your API key
        'application' => '{user}',
        'priority' => 0,
        'url' => '',
    },

    'pushover' => {
        'enabled' => 0, ## set to 1 to enable Pushover
        'push_recentlyadded'  => 0,
        'push_watched'        => 0,
        'push_watching'       => 0,
        'push_paused'         => 0,
        'push_resumed'        => 0,
        'token' => 'YOUR APP TOKEN', ## your app token
        'user' => 'YOUR USER TOKEN',  ## your user token
        'title' => '{user}',
        'sound' => 'intermission',
    },

    'growl' => {
        'enabled' => 0, ## set to 1 to enable local growl (You should probably used GNTP - growl supported for multiple platforms - below)
        'push_recentlyadded'  => 0,
        'push_watched'        => 0,
        'push_watching'       => 0,
        'push_paused'         => 0,
        'push_resumed'        => 0,
        'application' => '{user}',
        'script' => '/usr/local/bin/growlnotify',
        'icon' => '/Applications/Plex Media Server.app/Contents/Resources/MyPlex.icns',
    },


    'twitter' => {
        'enabled'             => 0, ## set to 1 to enable local growl
        'push_recentlyadded'  => 0,
        'push_watched'        => 0,
        'push_watching'       => 0,
        'push_paused'         => 0,
        'push_resumed'        => 0,
        'title'               => '{user}',
        'consumer_key'        => '',
        'consumer_secret'     => '',
        'access_token'        => '',
        'access_token_secret' => '',
        'alert_format' => {
            'start'    =>  '{title} [{streamtype}] [{year}] [{rating}] on {platform} [{progress} in]',
            'paused'   =>  '{title} [{streamtype}] [{year}] [{rating}] on {platform} [{progress} in] [{percent_complete}%]',
            'resumed'  =>  '{title} [{streamtype}] [{year}] [{rating}] on {platform} [{progress} in] [{percent_complete}%]',
            'stop'     =>  '{title} [{streamtype}] [{year}] [{rating}] on {platform} for {duration} [{percent_complete}%]',
        },
    },

    'boxcar' => {
        'enabled' => 0, ## set to 1 to enable local boxcar
        'push_recentlyadded'  => 0,
        'push_watched'        => 0,
        'push_watching'       => 0,
        'push_paused'         => 0,
        'push_resumed'        => 0,
        'email' => '',                          ## YOUR email address registered at boxcar
        'from' => '{user}',                     ## From Name displayed on boxcar
        'provider_key' => 'o2eI7rcwya5XFETaXdlh',                        ## plexWatch app is 'o2eI7rcwya5XFETaXdlh'. You may supply your own.
        'provider_secret' => 'h4pJjyBoEMk1rwK2EH3NLemO4fQ0ql9HnRgVfwg4', ## plexWatch app is 'h4pJjyBoEMk1rwK2EH3NLemO4fQ0ql9HnRgVfwg4'. You may supply your own.
        'icon_url' => '', # Leave empty ('') for plexWatch icon. You may supply your own (57x57)
    },

    'boxcar_v2' => {
        'enabled' => 0, ## set to 1 to enable local boxcar_v2 ( device specific )
        'push_recentlyadded'  => 0,
        'push_watched'        => 0,
        'push_watching'       => 0,
        'push_paused'         => 0,
        'push_resumed'        => 0,
        'access_token'        => '', # Access token from your Device
        'from' => '{user}',          ## From Name displayed on boxcar
    },

    'pushbullet' => {
        'enabled' => 0,
        'push_recentlyadded'  => 0,
        'push_watched'        => 0,
        'push_watching'       => 0,
        'push_paused'         => 0,
        'push_resumed'        => 0,
        'title'               => '{user}',
        'apikey'              => 'API KEY', # Pushbullet API key https://www.pushbullet.com/account
        'device'              => 'DEVICE IDEN', # https://api.pushbullet.com/api/devices put yor API key as username and password empty
    },

    ## GNTP (GROWL) -- multiple destinations are supported
    'GNTP' => {
        '1' => 	{
            'enabled' => 0, ## set to 1 to enable local growl
            'push_recentlyadded'  => 0,
            'push_watched'        => 0,
            'push_watching'       => 0,
            'push_paused'         => 0,
            'push_resumed'        => 0,
            'application' => $appname,
            'title' => '{user}',
            'server' => '10.0.0.1', # destination ip/host
            'port' => '23053',      # default 23053
            'password' => '',       # '' for no pass
            'icon_url' => 'https://rarforge.com/images/plexWatch.57x57.png',
            'sticky' => 1,
        },

        '2' => 	{
            'enabled' => 0, ## set to 1 to enable local growl
            'push_recentlyadded'  => 0,
            'push_watched'        => 0,
            'push_watching'       => 0,
            'push_paused'         => 0,
            'push_resumed'        => 0,
            'application' => '{user}',
            'server' => '192.168.10.100', # destination ip/host
            'port' => '23053',      # default 23053
            'password' => '',       # '' for no pass
            'icon_url' => 'https://rarforge.com/images/plexWatch.57x57.png',
            'sticky' => 0,
        },
    },


    ## EMAIL -- multiple destinations are supported
    'EMAIL' => {

        '1' => 	{
            'enabled' => 0, ## set to 1 to enable local EMAIL
            'push_recentlyadded'  => 0,
            'push_watched'        => 1,
            'push_watching'       => 1,
            'push_paused'         => 1,
            'push_resumed'        => 1,
            'server' => '', # your mail server
            'port' => '25', # your mail server port defalt 25 (587 is also a good choice)
            'from' => '',   # your From email address: '[email protected]'
            'to' => '',     # Email address to receive notification: '[email protected]'
            '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' => 0, ## set to 1 to enable EMAIL
            ## fill in the rest if you need more then 1 email notification
        },


    },


    'external' => {

        'transmissionServer1' => {
            'enabled'       => 0, ## 0 or 1 - set to 1 to enable
            'push_watched'  => 1, #stop
            'push_watching' => 1, #start
            'push_paused'   => 1, #pause
            'push_resumed'  => 1, #resume

            'script_format' => {
                'start'   =>  '/usr/local/bin/start.pl {user} {state}',
                'paused'  =>  '/usr/local/bin/paused.pl {user} {state}',
                'resumed' =>  '/usr/local/bin/resumed.pl {user} {state}',
                'stop'    =>  '/usr/local/bin/stop.pl {user} {state}',
            },
        },


        'homeAutomation' => 	{
            'enabled'       => 0, ## 0 or 1 - set to 1 to enable homeAutomation script
            'push_watched'  => 1, #stop
            'push_watching' => 1, #start
            'push_paused'   => 1, #pause
            'push_resumed'  => 1, #resume

            'script_format' => {
                'start'   =>  '/usr/local/bin/homeAutomation.pl {user} {state}',
                'paused'  =>  '/usr/local/bin/homeAutomation.pl {user} {state}',
                'resumed' =>  '/usr/local/bin/homeAutomation.pl {user} {state}',
                'stop'    =>  '/usr/local/bin/homeAutomation.pl {user} {state}',
            },
        },

    },

};

$push_titles = {
    'push_watched'        =>  'Watched',
    'push_watching'       =>  'Watching',
    'push_resumed'        =>  'Resumed',
    'push_paused'         =>  'Paused',
    'push_recentlyadded'  =>  'New',
};


# Advanced
$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
$count_paused = 0;            ## included paused time in time watched ( probably do not want this )
$inc_non_library_content = 0; ## non library content (channels) are excluded. Set to 1 to include them
#@exclude_library_ids = (999, 998); ## exclude this library section (by id) -- full exclusion

 

4. permissions:

root@Hades:/mnt/cache/apps/PlexWatch# ls -l
total 248
-rwxrwxrwx 1 nobody users    620 Jan 11 12:46 config.php*
-rwxrwxrwx 1 nobody users  12039 Jan 11 12:55 config.pl*
drwxrwxrwx 2 nobody users    168 Jan 11 12:34 db_backups/
-rwxrwxrwx 1 nobody users  54272 Jan 11 12:58 plexWatch.db*
-rwxrwxrwx 1 nobody users 178409 Jan 11 12:30 plexWatch.pl*

 

Note, regarding permissions I tried slimserver:user, root:root and nobody:users. I also did this chmod -R 777 PlexWatch to make sure I wasn't crazy. I have tried host mode, bridge mode, different ports and nothing gets me past this point.

Link to comment

Did you try to fill this ?

 

## myplex user/pass ONLY required if you have set the PMS to 'Require authentication on local networks' and $server is not set to localhost
$myPlex_user = '';
$myPlex_pass = '';

 

I had couple of issues with mine. I ended up forking it for my needs.

 

What version are you using?

 

I did try filling that out as well to no avail unfortunately. Regarding the version, what are you referring to?

 

Plex: 0.9.11.7 (needo docker)

plexWatch/Web Version: v1.5.4.2 (needo docker)

plexWatch Version: v0.3.2

Link to comment

Does the plexwatch.db gets updated? I might be the database that got corrupted on setup. (It happened to me in the past)

Can you look at its last modified date? (If it's the case try to delete it/move it)

 

the database does get updated, and I have also tried reinstalling about 10 times, so unless I am 0 for 10 with corruption haha :)

 

that being said, it never gets bigger than 53kb, so the date modified changes but the file size does not

Link to comment

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

(remove the / at the end)

 

    'REAL_USER2+iOS' => 'Rob',
};

(remove the "," at the end of Rob

 

Those are the only differences I see with my config files.

Let me check back if that doesn't do anything, I need to remmeber what I did to fix that I had a similar issue in the past. (the scripts are very sensible)

Link to comment

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

(remove the / at the end)

 

    'REAL_USER2+iOS' => 'Rob',
};

(remove the "," at the end of Rob

 

Those are the only differences I see with my config files.

Let me check back if that doesn't do anything, I need to remmeber what I did to fix that I had a similar issue in the past. (the scripts are very sensible)

 

thanks, no luck on that either though :/

Link to comment

Is there any trace in debug.log or plexWatch.log ? (in your plexWatch folder)

 

and what is your docker configuration ?

 

no debug or plexWatch log get made. Docker configuration details are as follows, also I started fresh again so here is all the details again:

 

Docker Configuration:

root@localhost:# /usr/bin/docker run -d --name="plexWatch" --net="host" -e TZ="America/New_York" -p 8080:8080/tcp -v "/mnt/cache/apps/Plex/Library/Application Support/Plex Media Server/Logs/":"/log":rw -v "/mnt/cache/apps/plexWatch/":"/plexWatch":rw needo/plexwatch

 

Permissions:

-rw-rw-rw- 1 root root    620 Jan 13 10:04 config.php
-rw-rw-rw- 1 root root  12039 Jan 13 10:02 config.pl
drwxrwxrwx 2 root root    168 Jan 13 10:03 db_backups/
-rw-r--r-- 1 root root  54272 Jan 13 10:05 plexWatch.db
-rwxr-xr-x 1 root root 178409 Jan 13 10:02 plexWatch.pl*

 

config.pl:

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

$server_log = '/log/Plex Media Server.log'; ## used to log IP address of user (alpha)
$log_client_ip = 0; ## requires $server_log to be available too. (requires File::ReadBackwards)
## also required DEBUG log to be turned on in the PMS

$debug_logging = 1; ## logs to $data_dir/debug.log ( not verbose enough yet.. still todo )

## myplex user/pass ONLY required if you have set the PMS to 'Require authentication on local networks' and $server is not set to localhost
$myPlex_user = '';
$myPlex_pass = '';

$server = 'localhost'; ## IP of PMS - or localhost
$port = 32400;         ## port of PMS

$notify_started = 1;   # !deprecated -- does nothing anymore (use push_watched, push_watching in $notify)
$notify_stopped = 1;   # !deprecated -- does nothing anymore (use push_watched, push_watching in $notify)

$appname = 'plexWatch';

## Give a user a more friendly name. I.E. REAL_USER will now be Frank
## you may also specify the platform with user+platform
$user_display = {'REAL_USER1' => 'Frank',
                 'REAL_USER2' => 'Rob & Carrie',
                 'REAL_USER2+Roku 3' => 'Family Room',
                 'REAL_USER2+Roku' => 'Family Room',
                 'REAL_USER2+iOS' => 'Rob',
};


## format of alert - default. You can also override this per provider  ($notify below)
## run ./plexWatch.pl --format_options -- to see all
#       start = notification for start of video
#       stop = notification for stop of video
#       watched = cli output for watched content
#       watching = cli output content being watched
$alert_format = {'start'    =>  '{title} [{streamtype}] [{year}] [{rating}] on {platform} [{progress} in] {ip_address}',
                 'paused'   =>  '{title} [{streamtype}] [{year}] [{rating}] on {platform} [{progress} in] [{percent_complete}%] {ip_address}',
                 'resumed'  =>  '{title} [{streamtype}] [{year}] [{rating}] on {platform} [{progress} in] [{percent_complete}%] {ip_address}',
                 'stop'     =>  '{title} [{streamtype}] [{year}] [{rating}] on {platform} for {duration} [{percent_complete}%] {ip_address}',
                 'watched'  =>  '{user} watched {title} [{streamtype}] [{year}] [{length}] [{rating}] on {platform} for {duration} [{percent_complete}%] {ip_address}',
                 'watching' =>  '{user} {state} {title} [{streamtype}] [{year}] [{rating}] [{length}] on {platform} for {duration} [{percent_complete}%] [{time_left} left] {ip_address}'
};

## Notification Options
$notify = {

    'file' => {
        'enabled' => 1,  ## 0 or 1 - set to 1 to enable File Logging
        'filename' => "$data_dir/plexWatch.log", ## default is plexWatch.log
    },

    'prowl' => {
        'enabled' => 0, ## 0 or 1 - set to 1 to enable PROWL
        'push_recentlyadded'  => 0,
        'push_watched'        => 0,
        'push_watching'       => 0,
        'push_paused'         => 0,
        'push_resumed'        => 0,
        'apikey' => 'YOUR API KEY', ## your API key
        'application' => '{user}',
        'priority' => 0,
        'url' => '',
    },

    'pushover' => {
        'enabled' => 0, ## set to 1 to enable Pushover
        'push_recentlyadded'  => 0,
        'push_watched'        => 0,
        'push_watching'       => 0,
        'push_paused'         => 0,
        'push_resumed'        => 0,
        'token' => 'YOUR APP TOKEN', ## your app token
        'user' => 'YOUR USER TOKEN',  ## your user token
        'title' => '{user}',
        'sound' => 'intermission',
    },

    'growl' => {
        'enabled' => 0, ## set to 1 to enable local growl (You should probably used GNTP - growl supported for multiple platforms - below)
        'push_recentlyadded'  => 0,
        'push_watched'        => 0,
        'push_watching'       => 0,
        'push_paused'         => 0,
        'push_resumed'        => 0,
        'application' => '{user}',
        'script' => '/usr/local/bin/growlnotify',
        'icon' => '/Applications/Plex Media Server.app/Contents/Resources/MyPlex.icns',
    },


    'twitter' => {
        'enabled'             => 0, ## set to 1 to enable local growl
        'push_recentlyadded'  => 0,
        'push_watched'        => 0,
        'push_watching'       => 0,
        'push_paused'         => 0,
        'push_resumed'        => 0,
        'title'               => '{user}',
        'consumer_key'        => '',
        'consumer_secret'     => '',
        'access_token'        => '',
        'access_token_secret' => '',
        'alert_format' => {
            'start'    =>  '{title} [{streamtype}] [{year}] [{rating}] on {platform} [{progress} in]',
            'paused'   =>  '{title} [{streamtype}] [{year}] [{rating}] on {platform} [{progress} in] [{percent_complete}%]',
            'resumed'  =>  '{title} [{streamtype}] [{year}] [{rating}] on {platform} [{progress} in] [{percent_complete}%]',
            'stop'     =>  '{title} [{streamtype}] [{year}] [{rating}] on {platform} for {duration} [{percent_complete}%]',
        },
    },

    'boxcar' => {
        'enabled' => 0, ## set to 1 to enable local boxcar
        'push_recentlyadded'  => 0,
        'push_watched'        => 0,
        'push_watching'       => 0,
        'push_paused'         => 0,
        'push_resumed'        => 0,
        'email' => '',                          ## YOUR email address registered at boxcar
        'from' => '{user}',                     ## From Name displayed on boxcar
        'provider_key' => 'o2eI7rcwya5XFETaXdlh',                        ## plexWatch app is 'o2eI7rcwya5XFETaXdlh'. You may supply your own.
        'provider_secret' => 'h4pJjyBoEMk1rwK2EH3NLemO4fQ0ql9HnRgVfwg4', ## plexWatch app is 'h4pJjyBoEMk1rwK2EH3NLemO4fQ0ql9HnRgVfwg4'. You may supply your own.
        'icon_url' => '', # Leave empty ('') for plexWatch icon. You may supply your own (57x57)
    },

    'boxcar_v2' => {
        'enabled' => 0, ## set to 1 to enable local boxcar_v2 ( device specific )
        'push_recentlyadded'  => 0,
        'push_watched'        => 0,
        'push_watching'       => 0,
        'push_paused'         => 0,
        'push_resumed'        => 0,
        'access_token'        => '', # Access token from your Device
        'from' => '{user}',          ## From Name displayed on boxcar
    },

    'pushbullet' => {
        'enabled' => 0,
        'push_recentlyadded'  => 0,
        'push_watched'        => 0,
        'push_watching'       => 0,
        'push_paused'         => 0,
        'push_resumed'        => 0,
        'title'               => '{user}',
        'apikey'              => 'API KEY', # Pushbullet API key https://www.pushbullet.com/account
        'device'              => 'DEVICE IDEN', # https://api.pushbullet.com/api/devices put yor API key as username and password empty
    },

    ## GNTP (GROWL) -- multiple destinations are supported
    'GNTP' => {
        '1' => 	{
            'enabled' => 0, ## set to 1 to enable local growl
            'push_recentlyadded'  => 0,
            'push_watched'        => 0,
            'push_watching'       => 0,
            'push_paused'         => 0,
            'push_resumed'        => 0,
            'application' => $appname,
            'title' => '{user}',
            'server' => '10.0.0.1', # destination ip/host
            'port' => '23053',      # default 23053
            'password' => '',       # '' for no pass
            'icon_url' => 'https://rarforge.com/images/plexWatch.57x57.png',
            'sticky' => 1,
        },

        '2' => 	{
            'enabled' => 0, ## set to 1 to enable local growl
            'push_recentlyadded'  => 0,
            'push_watched'        => 0,
            'push_watching'       => 0,
            'push_paused'         => 0,
            'push_resumed'        => 0,
            'application' => '{user}',
            'server' => '192.168.10.100', # destination ip/host
            'port' => '23053',      # default 23053
            'password' => '',       # '' for no pass
            'icon_url' => 'https://rarforge.com/images/plexWatch.57x57.png',
            'sticky' => 0,
        },
    },


    ## EMAIL -- multiple destinations are supported
    'EMAIL' => {

        '1' => 	{
            'enabled' => 0, ## set to 1 to enable local EMAIL
            'push_recentlyadded'  => 0,
            'push_watched'        => 1,
            'push_watching'       => 1,
            'push_paused'         => 1,
            'push_resumed'        => 1,
            'server' => '', # your mail server
            'port' => '25', # your mail server port defalt 25 (587 is also a good choice)
            'from' => '',   # your From email address: '[email protected]'
            'to' => '',     # Email address to receive notification: '[email protected]'
            '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' => 0, ## set to 1 to enable EMAIL
            ## fill in the rest if you need more then 1 email notification
        },


    },


    'external' => {

        'transmissionServer1' => {
            'enabled'       => 0, ## 0 or 1 - set to 1 to enable
            'push_watched'  => 1, #stop
            'push_watching' => 1, #start
            'push_paused'   => 1, #pause
            'push_resumed'  => 1, #resume

            'script_format' => {
                'start'   =>  '/usr/local/bin/start.pl {user} {state}',
                'paused'  =>  '/usr/local/bin/paused.pl {user} {state}',
                'resumed' =>  '/usr/local/bin/resumed.pl {user} {state}',
                'stop'    =>  '/usr/local/bin/stop.pl {user} {state}',
            },
        },


        'homeAutomation' => 	{
            'enabled'       => 0, ## 0 or 1 - set to 1 to enable homeAutomation script
            'push_watched'  => 1, #stop
            'push_watching' => 1, #start
            'push_paused'   => 1, #pause
            'push_resumed'  => 1, #resume

            'script_format' => {
                'start'   =>  '/usr/local/bin/homeAutomation.pl {user} {state}',
                'paused'  =>  '/usr/local/bin/homeAutomation.pl {user} {state}',
                'resumed' =>  '/usr/local/bin/homeAutomation.pl {user} {state}',
                'stop'    =>  '/usr/local/bin/homeAutomation.pl {user} {state}',
            },
        },

    },

};

$push_titles = {
    'push_watched'        =>  'Watched',
    'push_watching'       =>  'Watching',
    'push_resumed'        =>  'Resumed',
    'push_paused'         =>  'Paused',
    'push_recentlyadded'  =>  'New',
};


# Advanced
$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
$count_paused = 0;            ## included paused time in time watched ( probably do not want this )
$inc_non_library_content = 0; ## non library content (channels) are excluded. Set to 1 to include them
#@exclude_library_ids = (999, 998); ## exclude this library section (by id) -- full exclusion

 

config.php:

<?php

require_once '/var/www/html/plexWatch/includes/functions.php';
$plexWatch['dateFormat'] = 'm/d/Y';
$plexWatch['timeFormat'] = 'g:i a';
$plexWatch['pmsIp'] = 'localhost';
$plexWatch['pmsHttpPort'] = '32400';
$plexWatch['pmsHttpsPort'] = '32443';
$plexWatch['https'] = 'no';
$plexWatch['plexWatchDb'] = '/plexWatch/plexWatch.db';
$plexWatch['myPlexUser'] = '*****';
$plexWatch['myPlexPass'] = '*****';
$plexWatch['myPlexAuthToken'] = '*****';
$plexWatch['globalHistoryGrouping'] = 'yes';
$plexWatch['userHistoryGrouping'] = 'yes';
$plexWatch['chartsGrouping'] = 'yes';

?>

 

I have tried host mode/bridge mode, changing localhost to my IP, removing the end / in the config.pl, removing a , in the config.pl, changing permissions to 777, changing the owner to various things as well. I am stuck :)

Link to comment

A couple of ideas:

 

1) According to this:

 

-rw-r--r-- 1 root root  54272 Jan 13 10:05 plexWatch.db

 

Your plexWatch.db file is readonly to everyone but root.  Make it world-writable:

 

* cd /mnt/cache/apps/plexWatch/

* chmod 666 plexWatch.db

 

2) You have specified a username/password in your config.php file:

 

$plexWatch['myPlexUser'] = '*****';
$plexWatch['myPlexPass'] = '*****';

 

But not your config.pl file:

 

$myPlex_user = '';
$myPlex_pass = '';

 

You need to add the same username/password to both files.  This Docker contains two different products (plexWatch and plexWatchWeb) and they both need to be configured to access Plex.

 

 

Link to comment

A couple of ideas:

 

1) According to this:

 

-rw-r--r-- 1 root root  54272 Jan 13 10:05 plexWatch.db

 

Your plexWatch.db file is readonly to everyone but root.  Make it world-writable:

 

* cd /mnt/cache/apps/plexWatch/

* chmod 666 plexWatch.db

 

2) You have specified a username/password in your config.php file:

 

$plexWatch['myPlexUser'] = '*****';
$plexWatch['myPlexPass'] = '*****';

 

But not your config.pl file:

 

$myPlex_user = '';
$myPlex_pass = '';

 

You need to add the same username/password to both files.  This Docker contains two different products (plexWatch and plexWatchWeb) and they both need to be configured to access Plex.

 

Ok, so first thank you, even though I swear I have done that like 12 times it works now. Odd thing, permissions is what fixed it for me... but I thought "777" was god mode, which is what I had tried previously and it doesn't work, yet '666' works.

Link to comment

Glad you got it working :)

 

Either 666 or 777 would work, but 666 is more correct since a database is not an executable file. 

 

FYI, this is 644, so only the owner (root) had write privs:

-rw-r--r-- 1 root root  54272 Jan 13 10:05 plexWatch.db

 

ya, I didn't change anything prior to posting this time so it was fresh, at some point in the past i had it at 777, although maybe I had a different user set at that point, haha I tried so many damn things :) Thanks again, now I can follow what my moochers watch :)

Link to comment
  • 1 month later...

Hi Guys,

I know this is a closed case but I just wanted to add for others that I've been fighting getting this going for a few days now and this post was the one that finally got me working. I'm not sure what I had wrong. I as well have done everything in this post, but I think it just takes the right combination of settings. My last changes that got it working:

1) Changed back from my server's 'IP address' to 'localhost' in both config files

2) Changed from my email address for the username to just my plex username in both config files

3) chmod 666 on plexWatch.db

4) My plexWatch.db file (even new ones that got auto created if I changed the name in the web console) had sshd as the owner. I did a chown root:root plexWatch.db to match what I saw in this post.

Thanks for helping me get this going.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.