Need some help here guys..."config file missing data" - trying to use email and/or pushbullet
$data_dir = 'C:\\PlexWatch'; ## to store the DB, logfile - can be the same as this script
$server_log = 'C:\Users\Kenneth\AppData\Local\Plex Media Server\Logs\Plex Media Server.log'; ## used to log IP address of user (alpha)
$log_client_ip = 1; ## 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 = 'user';
$myPlex_pass = 'password';
$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 Ken
## you may also specify the platform with user+platform
$user_display = {'REAL_USER1' => 'Ken',
'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' => 0, ## 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 twitter
'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
'sound' => 'bird-1',
'icon_url' => 'https://rarforge.com/images/plexWatch.57x57.png'
},
'pushbullet' => {
'enabled' => 1,
'push_recentlyadded' => 0,
'push_watched' => 0,
'push_watching' => 1,
'push_paused' => 1,
'push_resumed' => 1,
'title' => '{user}',
'apikey' => 'xxxxxxxxxxxxxxxxxxxxxxx', # Pushbullet API key https://www.pushbullet.com/account
'device' => 'xxxxxxxxxxxxxxxxxxxxxxx', # https://api.pushbullet.com/v2/devices put yor API key as username and password empty - Leave blank to use all or channel
'channel' => , # Channel tag from https://www.pushbullet.com/my-channels - Leave blank if unused
},
'pushalot' => {
'enabled' => 0,
'push_recentlyadded' => 0,
'push_watched' => 0,
'push_watching' => 0,
'push_paused' => 0,
'push_resumed' => 0,
'title' => '{user}',
'token' => 'AUTHORIZATION TOKEN', # Pushalot API authorization token from https://pushalot.com/manager/authorizations
'isimportant' => 'False', # True or False, Indicator whether the message should be visually marked as important within client app. Does not have any other implication on message delivery.
'issilent' => 'False', # True or False, If set to True will prevent sending toast notifications to connected devices, resulting in silent delivery, as only badge icon will indicate new message.
'timetolive' => '0', # Time in minutes after which message automatically gets purged.
},
## 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 => 1, ## set to 1 to enable local EMAIL
'push_recentlyadded' => 1,
'push_watched' => 1,
'push_watching' => 1,
'push_paused' => 1,
'push_resumed' => 1,
'server' => 'imap.gmail.com', # your mail server
'port' => 993, # your mail server port defalt 25 (587 is also a good choice)
'from' => 'vermillion42@gmail.com', # Email address to receive notification: 'user@domain.com'
'username' => $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