If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

PlexPy - Another Plex Monitoring Program

1457910317

Comments

  • mkennedy2547mkennedy2547 Posts: 74Members, Plex Pass Plex Pass
    edited July 2015

    *facepalm*  ISPConfig has a separate firewall from ufw.  So even though it was showing as listening on 8181 in netstat, ISPConfig was blocking port 8181.  I added 8181 to the firewall there, and now I connect.  I am getting the sqlite3 dll error though.  Not sure how to update that on Ubuntu.   

    Not the same error... is this permissions?

    Ideas?

    Traceback (most recent call last):
      File "/opt/plexpy/lib/cherrypy/_cprequest.py", line 670, in respond
        response.body = self.handler()
      File "/opt/plexpy/lib/cherrypy/lib/encoding.py", line 217, in __call__
        self.body = self.oldhandler(*args, **kwargs)
      File "/opt/plexpy/lib/cherrypy/_cpdispatch.py", line 61, in __call__
        return self.callable(*self.args, **self.kwargs)
      File "/opt/plexpy/plexpy/webserve.py", line 84, in home_stats
        stats_data = plex_watch.get_home_stats(time_range)
      File "/opt/plexpy/plexpy/plexwatch.py", line 595, in get_home_stats
        myDB = db.DBConnection()
      File "/opt/plexpy/plexpy/db.py", line 51, in __init__
        self.connection.execute("PRAGMA synchronous = OFF")
    OperationalError: unable to open database file
     
     
  • ludiludi Posts: 10Members, Plex Pass Plex Pass

    After update, plexpy not loading.

    Ive included output of plexpy.log as appears in console.    Error third line from bottom.  All was well however after using the "update" link via the popup on the webserver Ive encountered an issue.  Any help?

    01-Jul-2015 14:07:08 - INFO    :: MainThread : PlexPy is updating...
    01-Jul-2015 14:07:08 - INFO    :: MainThread : Downloading update from: https://github.com/drzoidberg33/plexpy/tarball/master
    01-Jul-2015 14:07:08 - DEBUG   :: MainThread : Requesting URL via GET method: https://github.com/drzoidberg33/plexpy/tarball/master
    01-Jul-2015 14:07:10 - INFO    :: MainThread : Extracting file: /Applications/PlexPy/master-github
    01-Jul-2015 14:07:10 - INFO    :: MainThread : Deleting file: /Applications/PlexPy/master-github
    01-Jul-2015 14:07:10 - INFO    :: MainThread : PlexPy is restarting...
    01-Jul-2015 14:07:10 - INFO    :: MainThread : Restarting PlexPy with
    01-Jul-2015 14:07:41 - INFO    :: MainThread : Checking to see if the database has all tables....
    01-Jul-2015 14:07:41 - INFO    :: MainThread : Retrieving latest version information from GitHub
    01-Jul-2015 14:07:41 - DEBUG   :: MainThread : Requesting URL via GET method: https://api.github.com/repos/drzoidberg33/plexpy/commits/master
    01-Jul-2015 14:07:41 - DEBUG   :: MainThread : Latest version is 2d822c8468b5e414a6ce75404921294ad44af1c1
    01-Jul-2015 14:07:41 - INFO    :: MainThread : PlexPy is up to date
    01-Jul-2015 14:07:41 - INFO    :: MainThread : Starting PlexPy web server on http://192.168.1.120:8181/
    01-Jul-2015 14:07:41 - INFO    :: MainThread : Web server authentication is enabled, username is 'ludi'
    01-Jul-2015 14:07:42 - INFO    :: MainThread : Scheduled background task: Check GitHub for updates
    01-Jul-2015 14:37:10 - INFO    :: MainThread : Signal 15 caught, saving and exiting...
    01-Jul-2015 14:37:10 - INFO    :: MainThread : Writing configuration to file
    01-Jul-2015 14:37:10 - INFO    :: MainThread : PlexPy is shutting down...
    01-Jul-2015 14:40:10 - INFO    :: MainThread : Checking to see if the database has all tables....
    01-Jul-2015 14:40:10 - INFO    :: MainThread : Retrieving latest version information from GitHub
    01-Jul-2015 14:40:10 - DEBUG   :: MainThread : Requesting URL via GET method: https://api.github.com/repos/drzoidberg33/plexpy/commits/master
    01-Jul-2015 14:40:10 - DEBUG   :: MainThread : Latest version is 2d822c8468b5e414a6ce75404921294ad44af1c1
    01-Jul-2015 14:40:10 - INFO    :: MainThread : PlexPy is up to date
    01-Jul-2015 14:40:10 - INFO    :: MainThread : Starting PlexPy web server on http://192.168.1.120:8181/
    01-Jul-2015 14:40:10 - INFO    :: MainThread : Web server authentication is enabled, username is 'ludi'
    01-Jul-2015 14:40:11 - INFO    :: MainThread : Scheduled background task: Check GitHub for updates
    01-Jul-2015 14:42:18 - INFO    :: CP Server Thread-5 : Users list refreshed.
    01-Jul-2015 14:42:22 - INFO    :: CP Server Thread-5 : Users list refreshed.
    01-Jul-2015 14:48:27 - INFO    :: MainThread : Signal 15 caught, saving and exiting...
    01-Jul-2015 14:48:27 - INFO    :: MainThread : Writing configuration to file
    01-Jul-2015 14:48:27 - INFO    :: MainThread : PlexPy is shutting down...
     
    Can anyne assist?
  • drzoidberg33drzoidberg33 Posts: 2,563Members, Plex Employee, Plex Pass, Plex Ninja Plex Employee
    mkennedy2547 wrote on July 1 2015, 7:02 PM: »

    *facepalm*  ISPConfig has a separate firewall from ufw.  So even though it was showing as listening on 8181 in netstat, ISPConfig was blocking port 8181.  I added 8181 to the firewall there, and now I connect.  I am getting the sqlite3 dll error though.  Not sure how to update that on Ubuntu.   

    Not the same error... is this permissions?

    Ideas?

    Traceback (most recent call last):
      File "/opt/plexpy/lib/cherrypy/_cprequest.py", line 670, in respond
        response.body = self.handler()
      File "/opt/plexpy/lib/cherrypy/lib/encoding.py", line 217, in __call__
        self.body = self.oldhandler(*args, **kwargs)
      File "/opt/plexpy/lib/cherrypy/_cpdispatch.py", line 61, in __call__
        return self.callable(*self.args, **self.kwargs)
      File "/opt/plexpy/plexpy/webserve.py", line 84, in home_stats
        stats_data = plex_watch.get_home_stats(time_range)
      File "/opt/plexpy/plexpy/plexwatch.py", line 595, in get_home_stats
        myDB = db.DBConnection()
      File "/opt/plexpy/plexpy/db.py", line 51, in __init__
        self.connection.execute("PRAGMA synchronous = OFF")
    OperationalError: unable to open database file
     
     

    Looks like permissions issue.

    Note you'll have to give PlexPy full read/write access to your db. If you're worried about something **** your db up just make a copy before hand then chmod the db to 777.

  • drzoidberg33drzoidberg33 Posts: 2,563Members, Plex Employee, Plex Pass, Plex Ninja Plex Employee
    ludi wrote on July 1 2015, 7:07 PM: »

    After update, plexpy not loading.

    Ive included output of plexpy.log as appears in console.    Error third line from bottom.  All was well however after using the "update" link via the popup on the webserver Ive encountered an issue.  Any help?

    01-Jul-2015 14:07:08 - INFO    :: MainThread : PlexPy is updating...
    01-Jul-2015 14:07:08 - INFO    :: MainThread : Downloading update from: https://github.com/drzoidberg33/plexpy/tarball/master
    01-Jul-2015 14:07:08 - DEBUG   :: MainThread : Requesting URL via GET method: https://github.com/drzoidberg33/plexpy/tarball/master
    01-Jul-2015 14:07:10 - INFO    :: MainThread : Extracting file: /Applications/PlexPy/master-github
    01-Jul-2015 14:07:10 - INFO    :: MainThread : Deleting file: /Applications/PlexPy/master-github
    01-Jul-2015 14:07:10 - INFO    :: MainThread : PlexPy is restarting...
    01-Jul-2015 14:07:10 - INFO    :: MainThread : Restarting PlexPy with
    01-Jul-2015 14:07:41 - INFO    :: MainThread : Checking to see if the database has all tables....
    01-Jul-2015 14:07:41 - INFO    :: MainThread : Retrieving latest version information from GitHub
    01-Jul-2015 14:07:41 - DEBUG   :: MainThread : Requesting URL via GET method: https://api.github.com/repos/drzoidberg33/plexpy/commits/master
    01-Jul-2015 14:07:41 - DEBUG   :: MainThread : Latest version is 2d822c8468b5e414a6ce75404921294ad44af1c1
    01-Jul-2015 14:07:41 - INFO    :: MainThread : PlexPy is up to date
    01-Jul-2015 14:07:41 - INFO    :: MainThread : Starting PlexPy web server on http://192.168.1.120:8181/
    01-Jul-2015 14:07:41 - INFO    :: MainThread : Web server authentication is enabled, username is 'ludi'
    01-Jul-2015 14:07:42 - INFO    :: MainThread : Scheduled background task: Check GitHub for updates
    01-Jul-2015 14:37:10 - INFO    :: MainThread : Signal 15 caught, saving and exiting...
    01-Jul-2015 14:37:10 - INFO    :: MainThread : Writing configuration to file
    01-Jul-2015 14:37:10 - INFO    :: MainThread : PlexPy is shutting down...
    01-Jul-2015 14:40:10 - INFO    :: MainThread : Checking to see if the database has all tables....
    01-Jul-2015 14:40:10 - INFO    :: MainThread : Retrieving latest version information from GitHub
    01-Jul-2015 14:40:10 - DEBUG   :: MainThread : Requesting URL via GET method: https://api.github.com/repos/drzoidberg33/plexpy/commits/master
    01-Jul-2015 14:40:10 - DEBUG   :: MainThread : Latest version is 2d822c8468b5e414a6ce75404921294ad44af1c1
    01-Jul-2015 14:40:10 - INFO    :: MainThread : PlexPy is up to date
    01-Jul-2015 14:40:10 - INFO    :: MainThread : Starting PlexPy web server on http://192.168.1.120:8181/
    01-Jul-2015 14:40:10 - INFO    :: MainThread : Web server authentication is enabled, username is 'ludi'
    01-Jul-2015 14:40:11 - INFO    :: MainThread : Scheduled background task: Check GitHub for updates
    01-Jul-2015 14:42:18 - INFO    :: CP Server Thread-5 : Users list refreshed.
    01-Jul-2015 14:42:22 - INFO    :: CP Server Thread-5 : Users list refreshed.
    01-Jul-2015 14:48:27 - INFO    :: MainThread : Signal 15 caught, saving and exiting...
    01-Jul-2015 14:48:27 - INFO    :: MainThread : Writing configuration to file
    01-Jul-2015 14:48:27 - INFO    :: MainThread : PlexPy is shutting down...
     
    Can anyne assist?

    I suggest you just delete the PlexPy folder and checkout a clean install directly using git.

  • mkennedy2547mkennedy2547 Posts: 74Members, Plex Pass Plex Pass
    edited July 2015
    DrJohnZoidberg wrote on July 1 2015, 7:18 PM: »

    Looks like permissions issue.

    Note you'll have to give PlexPy full read/write access to your db. If you're worried about something **** your db up just make a copy before hand then chmod the db to 777.

    So at this point its a linux thing.  I just redid the CIFS share to be 

    //PMS-IP/plexWatch  /media/plexwatch  cifs  uid=plexpy,credentials=/home/michael/.smbcredentials,iocharset=utf8,sec=ntlm,file_mode=0777,dir_mode=0777   0       0

    Windows share user credentials in the credentials file.

    /home/michael/.smbcredentials

     
    username=WindowsUser
    password=WindowsPassword
     
    Everything seems to be working now.  
     
    Thank you very much for your assistance.  This is a great piece of software, and I will keep checking back for your donate button.  I owe you a beer.  
  • drzoidberg33drzoidberg33 Posts: 2,563Members, Plex Employee, Plex Pass, Plex Ninja Plex Employee

    I've been busy while the forums have been down.

    A lot of work has been done to improve PlexPy and add new features. I have just committed the initial code that logs watch history, I wouldn't recommend enabling it yet as it doesn't really add anything useful at this stage because all the watch data is still being pulled from the PlexWatch db.

    Hopefully this week I can start writing the code to take advantage of the new history database and I'll try and write something to convert an existing PW db to the PlexPy format. Once this is done it will no longer be necessary to have two separate programs running as PlexPy will do it all.

    Still lots to be done though until I'm comfortable even replacing my own PlexWatch database.

  • Patschi95Patschi95 Posts: 55Members, Plex Pass Plex Pass

    @drzoidberg33: Nice work you have done! I just found a typo in Settings > Notification Agents: You wrote "XMBC" instead of "XBMC" in the headline. I already created a little pull request on GitHub for that, but it seems that you didn't recognized it since couple of days :)

    PlexPass Life-Time
    My plex setup
    HomeServer with virtualized Plex Media Server on Ubuntu 14.04 LTS: HP MicroServer Gen8 | Intel Xeon E3-1230 v2 @ 3.30 GHz (Turbo-Boost) | 2x 8 GB Kingston ECC - DDR3 1600 | VMware HP-ESXi 5.5 U2 (MicroSD-Card) | 2x Samsung SSD 840 EVO 120 GB (RAID1) + 2x Sandisk SSD 32 GB (RAID0) (Cache) | 4x 4 TB Western Digital Red (RAID5) | HP Smart Array P420 FBWC/2GB
    Mobile phone: OnePlus One
    Tablet: Samsung Galaxy Tab 2 10.1"
  • Patschi95Patschi95 Posts: 55Members, Plex Pass Plex Pass
    edited July 2015

    And will be there any functionality to remove users with their data from the PlexWatch database with one-click on the site? Somehow I got an user "Local" in my database and PlexPy always reports errors, that the user data could not been retrieved - so I guess that must be that user:

    PlexPass Life-Time
    My plex setup
    HomeServer with virtualized Plex Media Server on Ubuntu 14.04 LTS: HP MicroServer Gen8 | Intel Xeon E3-1230 v2 @ 3.30 GHz (Turbo-Boost) | 2x 8 GB Kingston ECC - DDR3 1600 | VMware HP-ESXi 5.5 U2 (MicroSD-Card) | 2x Samsung SSD 840 EVO 120 GB (RAID1) + 2x Sandisk SSD 32 GB (RAID0) (Cache) | 4x 4 TB Western Digital Red (RAID5) | HP Smart Array P420 FBWC/2GB
    Mobile phone: OnePlus One
    Tablet: Samsung Galaxy Tab 2 10.1"
  • drzoidberg33drzoidberg33 Posts: 2,563Members, Plex Employee, Plex Pass, Plex Ninja Plex Employee

    @Patschi95 said:
    And will be there any functionality to remove users with their data from the PlexWatch database with one-click on the site? Somehow I got an user "Local" in my database and PlexPy always reports errors, that the user data could not been retrieved - so I guess that must be that user:

    I've also got the "Local" user in my db, I don't get any errors though. What errors do you see and where?

  • Patschi95Patschi95 Posts: 55Members, Plex Pass Plex Pass

    In the terminal on my plex server:
    12-Jul-2015 00:32:54 - INFO :: MainThread : Scheduled background task: Check for active sessions 12-Jul-2015 00:32:54 - INFO :: MainThread : Scheduled background task: Refresh users list 12-Jul-2015 00:33:54 - DEBUG :: Thread-12 : Removing sessionKey 32 ratingKey 90031 from session queue 12-Jul-2015 00:33:57 - WARNING :: CP Server Thread-10 : Unable to retrieve sync data for user. ^C12-Jul-2015 00:34:12 - INFO :: MainThread : Signal 2 caught, saving and exiting... 12-Jul-2015 00:34:16 - INFO :: MainThread : Writing configuration to file 12-Jul-2015 00:34:16 - INFO :: MainThread : PlexPy is shutting down...

    PlexPass Life-Time
    My plex setup
    HomeServer with virtualized Plex Media Server on Ubuntu 14.04 LTS: HP MicroServer Gen8 | Intel Xeon E3-1230 v2 @ 3.30 GHz (Turbo-Boost) | 2x 8 GB Kingston ECC - DDR3 1600 | VMware HP-ESXi 5.5 U2 (MicroSD-Card) | 2x Samsung SSD 840 EVO 120 GB (RAID1) + 2x Sandisk SSD 32 GB (RAID0) (Cache) | 4x 4 TB Western Digital Red (RAID5) | HP Smart Array P420 FBWC/2GB
    Mobile phone: OnePlus One
    Tablet: Samsung Galaxy Tab 2 10.1"
  • drzoidberg33drzoidberg33 Posts: 2,563Members, Plex Employee, Plex Pass, Plex Ninja Plex Employee

    @Patschi95 said:
    In the terminal on my plex server:
    12-Jul-2015 00:32:54 - INFO :: MainThread : Scheduled background task: Check for active sessions 12-Jul-2015 00:32:54 - INFO :: MainThread : Scheduled background task: Refresh users list 12-Jul-2015 00:33:54 - DEBUG :: Thread-12 : Removing sessionKey 32 ratingKey 90031 from session queue 12-Jul-2015 00:33:57 - WARNING :: CP Server Thread-10 : Unable to retrieve sync data for user. ^C12-Jul-2015 00:34:12 - INFO :: MainThread : Signal 2 caught, saving and exiting... 12-Jul-2015 00:34:16 - INFO :: MainThread : Writing configuration to file 12-Jul-2015 00:34:16 - INFO :: MainThread : PlexPy is shutting down...

    Oh, that will appear for any user that doesn't have anything synced. I will make the logging clearer.

  • Patschi95Patschi95 Posts: 55Members, Plex Pass Plex Pass

    Which "synced" do you mean? Synced videos for offline viewing, zero for total plays, ...?

    PlexPass Life-Time
    My plex setup
    HomeServer with virtualized Plex Media Server on Ubuntu 14.04 LTS: HP MicroServer Gen8 | Intel Xeon E3-1230 v2 @ 3.30 GHz (Turbo-Boost) | 2x 8 GB Kingston ECC - DDR3 1600 | VMware HP-ESXi 5.5 U2 (MicroSD-Card) | 2x Samsung SSD 840 EVO 120 GB (RAID1) + 2x Sandisk SSD 32 GB (RAID0) (Cache) | 4x 4 TB Western Digital Red (RAID5) | HP Smart Array P420 FBWC/2GB
    Mobile phone: OnePlus One
    Tablet: Samsung Galaxy Tab 2 10.1"
  • drzoidberg33drzoidberg33 Posts: 2,563Members, Plex Employee, Plex Pass, Plex Ninja Plex Employee

    @Patschi95 said:
    Which "synced" do you mean? Synced videos for offline viewing, zero for total plays, ...?

    Synced as in Plex Sync for offline viewing.

  • drzoidberg33drzoidberg33 Posts: 2,563Members, Plex Employee, Plex Pass, Plex Ninja Plex Employee

    First progress on fully PlexPy-powered history logging (no PlexWatch involved) :)

    image

  • elRadixelRadix Posts: 65Members, Plex Pass Plex Pass
    edited July 2015

    I have an issue regarding the update of the config.ini file

    when I do the updates to the file manually ie. adding plex log folder for IP logging and when I restart the plexpy "service plexpy restart' and the config get reverted back to the prevoius state, the additions that I made are not saved

  • drzoidberg33drzoidberg33 Posts: 2,563Members, Plex Employee, Plex Pass, Plex Ninja Plex Employee

    @elRadix said:
    I have an issue regarding the update of the config.ini file

    when I do the updates to the file manually ie. adding plex log folder for IP logging and when I restart the plexpy "service plexpy restart' and the config get reverted back to the prevoius state, the additions that I made are not saved

    What do you mean "manually"? There is an option in the settings for that.

  • elRadixelRadix Posts: 65Members, Plex Pass Plex Pass

    i'm trying to add '/mnt/imac/Users/Admin/Library/Logs' but plexy is trowing an error

  • drzoidberg33drzoidberg33 Posts: 2,563Members, Plex Employee, Plex Pass, Plex Ninja Plex Employee
    edited July 2015

    @elRadix said:
    i'm trying to add '/mnt/imac/Users/Admin/Library/Logs' but plexy is trowing an error

    What kind of error? Is there anything in the log?

    Here is mine for Mac, and works fine:

  • elRadixelRadix Posts: 65Members, Plex Pass Plex Pass
    edited July 2015

    ignore, restarted the server again, no error anymore
    plex log files are not showing correctly

    thanks again for your quick support!!

  • elRadixelRadix Posts: 65Members, Plex Pass Plex Pass
    edited July 2015

    Can you check why IP logging is not stored and shown in the history tab ?

1457910317
Sign In or Register to comment.