(For needo) - Trying to get PlexWatch docker running...


Recommended Posts

Trouble with plexwatch....getting the "Failed to access plexWatch database. Please check your settings."

root@Tower:/mnt/cache/Docker/appdata/plexWatch# ls -l
total 260
-rw-rw-rw- 1 nobody users    553 Dec  9 20:01 config.php
-rw-rw-rw- 1 nobody users  12041 Dec  9 21:28 config.pl
-rw-rw-rw- 1 nobody users  12114 Dec  9 20:54 config.pl-dist
drwxrwxrwx 1 nobody users    120 Dec  9 16:48 db_backups/
-rw-rw-rw- 1 nobody users  54272 Dec  9 21:01 plexWatch.db
-rw-rw-rw- 1 nobody users 178409 Dec  9 16:47 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 = '192.168.1.6'; ## 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' => '192.168.1.6', # destination ip/host
            'port' => '32400',      # 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.1.6', # destination ip/host
            'port' => '32400',      # 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.ph

 

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

Link to comment
  • 1 month later...
  • Replies 66
  • Created
  • Last Reply

Top Posters In This Topic

I am having the same issues, I have PlexPass and the following are my details:

 

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

Link to comment
  • 1 month later...

i can get the docker installed...it sees my db from previous install (plugins before docker)....it sees when i watch content...sees stuff from plex...but writes nothing to the plexWatch.db file and never creates a log file in the logs directory...

 

I initially had this problem too. I fixed it by making plexWatch.pl executable in the container. For some reason it isn't by default and so the cron job doesn't run it.

 

docker exec -it plexWatch bash
chmod +x /plexWatch/plexWatch.pl
exit

Link to comment
  • 4 weeks later...
  • 4 weeks later...

Been troubleshoot PlexWatch and I've decided its time for help.

 

I have the docker up and running and recieve no errors other than the "apache" one needo says to ignore.

 

PlexWatch sees and reports all new media added to my PMS.  However, it is not reporting the media that I am watching.  The odd thing is that PlexWatch reports the very first video I watch when I installed/enabled the docker, but everything after that initial video is not logged. 

 

I am not getting errors, so I am not sure if this is a PlexWatch or PMS issue. 

 

Any ideas how to troubleshoot this?

 

Thanks

Link to comment

Thanks Dase.

 

I still seem to have the issue (I did confirm plexWatch.pl is now an executable).

 

Can you check what you plexWatch user/group permissions are.  This is how mine looks:

 

-rw-rw-rw- 1 root root     597 Apr 21 21:43 config.php
-rw-rw-rw- 1 root root   13565 Apr 21 21:42 config.pl
drwxrwxrwx 2 root root    4096 Apr 21 21:43 db_backups
-rw-r--r-- 1 root root    5272 Apr 12 17:27 debug.log
-rw-rw-rw- 1   99 users  73728 Apr 21 17:35 plexWatch.db
-rw-r--r-- 1 root root    2096 Apr 12 17:27 plexWatch.log
-rwxr-xr-x 1 root root  181361 Apr 12 17:26 plexWatch.pl

 

Wondering if I should assign it to root (which is how everything else is set).

 

Link to comment

somail,

 

I only changed the permissions on plexWatch.pl and left the rest of the container as is. Here are the permissions I have:

 

-rw-rw-rw- 1   99 users     608 Feb 28 09:26 config.php
-rw-rw-rw- 1   99 users   12064 Apr 18 15:01 config.pl
drwxrwxrwx 1   99 users    4096 Apr 21 13:16 db_backups
-rw-rw-rw- 1   99 users 1356361 Apr 21 23:52 debug.log
-rw-rw-rw- 1   99 users 2753536 Apr 21 23:52 plexWatch.db
-rw-rw-rw- 1   99 users  207353 Apr 21 21:02 plexWatch.log
-rwxrwxrwx 1   99 users  178409 Jan 22 23:37 plexWatch.pl

 

I'm also running it with the Host network type. I can't remember what the default was.

Link to comment

PlexWatch only works in HOST mode.

 

http://lime-technology.com/forum/index.php?topic=34069.msg320316#msg320316

 

From Needo's installation instructions: Run the docker in host mode

 

It works!!  Needo needs to update his instructions. https://github.com/needo37/plexWatch  :-)

 

So the final piece of the puzzle is how do I get SabNZB and Plexwatch to play nicely. Both use port 8080. 

 

EDIT: ya I am slow.  SABNZB and Sonarr both have options to change the port to anything I want.  All is good and 100% working. 

Link to comment
  • 2 weeks later...
  • 2 months later...

So, I seem to be having a similar issue, but in my case it looks like the plexWatch.pl script isn't getting run... There was no .log files being created, and no recreation of the .db file, but if I connect to the terminal and 'perl plexWatch.pl' it creates all the .log files expected, and the .db, and it all appears to be working... However the problem that exists is it doesn't keep running the .pl file regularly as it should, so the files never get updated, though I can tell it's talking to Plex at least since the index page shows the live details from my Plex server activity... Thoughts?

Link to comment
  • 2 weeks later...

So, I seem to be having a similar issue, but in my case it looks like the plexWatch.pl script isn't getting run... There was no .log files being created, and no recreation of the .db file, but if I connect to the terminal and 'perl plexWatch.pl' it creates all the .log files expected, and the .db, and it all appears to be working... However the problem that exists is it doesn't keep running the .pl file regularly as it should, so the files never get updated, though I can tell it's talking to Plex at least since the index page shows the live details from my Plex server activity... Thoughts?

 

This is exactly what is suddenly happening to me. My last database entry is on 7/30. My plexWatch.db, debug.log, and plexWatch.log files have remained unmodified since 7/30. However, the app is running fine and is showing the live streams, it's just failing to log them into the database. The docker log shows no obvious errors. I'm not sure what to do, this is a shame to suddenly lose all this data.

 

Dase's post on march 1 in this thread had steps that fixed it.

Link to comment
  • 3 months later...

I tried bridge (this was the default!) mode and change port to 81 (i couldn't use 8080) and it couldn't connect to PMS (I used localhost). So I changed to 127.0.0.1, also didn't work. So I switched to HOST mode, localhost didn't work, so I used 127.0.0.1 and it worked (weird huh?). But because of the mode, I couldn't select the port to use - I had to use the defaulted 8080... 2 questions:

 

1. why can't we select port?

2. why did localhost not work, but 127.0.0.1 did?

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.