SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV v7 Customizations

Notices

SageTV v7 Customizations This forums is for discussing and sharing user-created modifications for the SageTV version 7 application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss plugins for SageTV version 7 and newer.

Reply
 
Thread Tools Search this Thread Display Modes
  #1381  
Old 11-19-2017, 10:21 PM
ex-tivoman ex-tivoman is offline
Sage User
 
Join Date: Apr 2009
Location: Sacramento
Posts: 18
trouble getting it working

I was hoping to get plex working to allow greater usage of my recordings on plex clients. but am at a standstill. I thought I followed the github install correctly but am getting an error. My most likely thoughts on the cause are either permissions or the JSON location.

I say permissions could be a culprit because I remember a previuous install of Plex creating a plex user which I then had to add to my mediauser group and grant read/write/execute permissions. But i checked and there are no "plex" users. only my standard user.

I say JSON because when I look at the sageplex_scanner.log I see an error
"call: json decode failed: No JSON object could be decoded".
I followed the "easy install method IE: "sudo -u plex python install/sageplex_install.py -i" and then double checked by doing the manual install steps.

when I run plex I used the advanced library scanner --> SageTV scanner, and agebt --> SageTV BMT Agent. But nothing gets added to the library. A possible issue in the com.plexapp.agents.bmtagenttvshows.log is:
2017-11-19 20:11:05,522 (7f4bb2d24700) : INFO (sandbox:19) - ***** Initializing "SageTV BMT Agent (TV Shows)" *****
2017-11-19 20:11:05,522 (7f4bb2d24700) : INFO (sandbox:19) - Config: no env var SAGEPLEX_CFG"

my setup is a linux headless sagetv server which I installed plex onto and I access via putty. I access the plex server via x.x.x.x:32400. I access sagetv via either placeshifter or client depending on what the need is. any help is appreciated.

Last edited by ex-tivoman; 11-19-2017 at 10:27 PM.
Reply With Quote
  #1382  
Old 11-20-2017, 11:56 PM
wildgoose wildgoose is offline
Sage Advanced User
 
Join Date: Jan 2010
Location: CA
Posts: 156
Hi ex-tivoman,

It's been a while since I looked at the Linux side of PLEX. When I wrote the installer, PLEX runs under its own user 'plex'. Hence the install command uses "sudo -u plex", which runs the install script as plex user.

If this is no longer the case, PLEX runs as the standard user, then it probably won't work. You could try the installer without the sudo command, like on macos:

python install/sageplex_install.py -i

or depending on where plex files are,

sudo python install/sageplex_install.py -i

If it still doesn't work for some reason, you can set an explicit environment variable SAGEPLEX_CFG that points to the full path of sageplex_cfg.json (be sure to set it so that the plex process can see it, ie, current user or plex user depending on how plex is installed).

FYI currently the installer will try to detect PLEX in the following 2 locations on Linux:

~plex/Library/Application Support/Plex Media Server
/config/Library/Application Support/Plex Media Server

If PLEX is installed somewhere else, you can try the '--plexdir' parameter with the installer to set it explicitly.
__________________
sagetv-for-plexmediacenter v8.3.1 is available! Github/Download site.
Reply With Quote
  #1383  
Old 11-21-2017, 11:28 PM
ex-tivoman ex-tivoman is offline
Sage User
 
Join Date: Apr 2009
Location: Sacramento
Posts: 18
thanks for the quick reply. i will try this over the next few days.
Reply With Quote
  #1384  
Old 11-22-2017, 08:52 AM
ex-tivoman ex-tivoman is offline
Sage User
 
Join Date: Apr 2009
Location: Sacramento
Posts: 18
OK. I added use plex and made a group for local user and plex so permissions do not seem to be the problem.

Here is what I am getting in my sageplex_scanner.log for each of my sage recordings. [userassword] have been changed, but are correct in the log.
2017-11-22 06:33:04,037| DEBUG | Getting media info from SageTV ...
2017-11-22 06:33:04,037| DEBUG | openUrl: http://[localuser]:[localuser'spassword]@localhost:8080/sagex/api?c=plex:GetMediaFileForName&1=SaturdayNightLive-CameronDiazMarkRonsonBrunoMars-248050-0.mpg&encoder=json
2017-11-22 06:33:04,038| ERROR | call: json decode failed: No JSON object could be decoded
2017-11-22 06:33:04,039| ERROR | No media info from SageTV: SaturdayNightLive-CameronDiazMarkRonsonBrunoMars-248050-0.mpg
Reply With Quote
  #1385  
Old 11-22-2017, 09:02 AM
dstanley's Avatar
dstanley dstanley is online now
Sage Advanced User
 
Join Date: Sep 2008
Location: Brantford, Ontario, Canada
Posts: 170
Did you edit your sageplex_cfg.json file to represent YOUR system?

Mine is in my Plex Media Server folder and the contents are like this:

Code:
{
    "sagex": {
        "host"     : "192.168.1.5",
        "port"     : 8080,
        "user"     : "MySageWebUIUsername",
        "password" : "MySageWebUIPassword"
    },
    "plex": {
        "host"     : "192.168.1.5",
        "port"     : 32400,
        "token"    : "MyPlexToken"
    },
    "scanner": {
        "ext"      : [".mpg", ".avi", ".mkv", ".mp4", ".ts", ".m4v"],
        "log"      : "config/Library/Application Support/Plex Media Support/Logs/sageplex_scanner.log",
        "debug"    : true
    },
    "agent": {
        "locking"  : true
    },

    "ignored":  {
        "log_win"  : "%LOCALAPPDATA%\\Plex Media Server\\Logs\\sageplex_scanner.log",
        "log_xp"   : "%USERPROFILE%\\Local Settings\\Application Data\\Plex Media Server\\Logs\\sageplex_scanner.log",
        "log_mac"  : "~/Library/Logs/sageplex_scanner.log",
        "log_lin"  : "config/Library/Application Support/Plex Media Support/Logs/sageplex_scanner.log",
        "dummy"    : "last"
    }
}
Obviously you need to change this to your SageWebUI username/password and ipaddress/port as well as your Plex Token.

Looks like the error you are getting may be because those items are not declared properly!?

Dwight
__________________
SERVER: Intel Core i7-3770 CPU @ 3.40GHz - UnRaid Server 6.3.5 with Docker stuckless-sagetv-server-java8 MOTHERBOARD: ASRock-Z77 Extreme4 / 16GB RAM CACHE DRIVE: SSD 240GB ARRAY: 12TB/5 DRIVES PARITY: 4TB
EXTERNAL DEVICES: 4x HD-PVR's Firewire Channel Changing
TUNERS:SA3250HD, SA4250HD, SA4250HD, CISCO4642HD, ROGERS CABLE-ON, CANADA
CLIENTS: 2xHD300 2xHD200 SONY ANDROIDTV MINI-CLIENT
Reply With Quote
  #1386  
Old 11-22-2017, 06:10 PM
ex-tivoman ex-tivoman is offline
Sage User
 
Join Date: Apr 2009
Location: Sacramento
Posts: 18
It looks like yours in most ways. The order, which I doubt makes a difference, is different. See below.

But,
1. for host I just have "localhost" since I have plex running on the machine where sagetv is.
2. i didnt have a token set for plex. but i figured it out from here. https://forums.plex.tv/discussion/12...or-your-app/p1

3. I have been noodling around trying to figure this out. One other thought/possibility. in the Batch Metadata Tools webui, how do I fix this: xxx.xxx.xxx.xxx:8080/bmt/#status I have an error:
--> Error Failed to get status for: Phoenix

Still getting the same error in the sageplex log.


HTML Code:
{
    "agent": {
        "locking": true
    },
    "ignored": {
        "dummy": "last",
        "log_lin": "~plex/Library/Application Support/Plex Media Server/Logs/sageplex_scanner.log",
        "log_mac": "~/Library/Logs/sageplex_scanner.log",
        "log_win": "%LOCALAPPDATA%\\Plex Media Server\\Logs\\sageplex_scanner.log",
        "log_xp": "%USERPROFILE%\\Local Settings\\Application Data\\Plex Media Server\\Logs\\sageplex_scanner.log"
    },
    "plex": {
        "host": "localhost",
        "port": 32400,
        "token": "xxxxxxxxxxxxxxxxxxxx"
    },
    "sagex": {
        "host": "localhost",
        "password": "sageuserpwordxxxxx",
        "port": 8080,
        "user": "sageuserxxxxxx"
    },
    "scanner": {
        "debug": true,
        "ext": [
            ".mpg",
            ".avi",
            ".mkv",
            ".mp4",
            ".ts",
            ".m4v"
        ],
        "log": "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs/sageplex_scanner.log"
    }
}

Last edited by ex-tivoman; Yesterday at 12:42 PM.
Reply With Quote
  #1387  
Old Yesterday, 01:26 PM
dstanley's Avatar
dstanley dstanley is online now
Sage Advanced User
 
Join Date: Sep 2008
Location: Brantford, Ontario, Canada
Posts: 170
Code:
http://192.168.1.5:8080/bmt/#status
This works fine on my system - I would rule out the 'localhost' and make it a fixed address of the Plex/Sage server just in case.

My unraid server is 192.168.1.5 and hosts Plex Media Server and SageTV running in dockers.

If you were to access your server from another machine using 'localhost' I am sure it would fail as the server is NOT your localhost.

Plex doesn't know that Sage is on the same machine - but if both are directed by IP addresses then they 'should' work.

Dwight
__________________
SERVER: Intel Core i7-3770 CPU @ 3.40GHz - UnRaid Server 6.3.5 with Docker stuckless-sagetv-server-java8 MOTHERBOARD: ASRock-Z77 Extreme4 / 16GB RAM CACHE DRIVE: SSD 240GB ARRAY: 12TB/5 DRIVES PARITY: 4TB
EXTERNAL DEVICES: 4x HD-PVR's Firewire Channel Changing
TUNERS:SA3250HD, SA4250HD, SA4250HD, CISCO4642HD, ROGERS CABLE-ON, CANADA
CLIENTS: 2xHD300 2xHD200 SONY ANDROIDTV MINI-CLIENT
Reply With Quote
  #1388  
Old Yesterday, 04:08 PM
ex-tivoman ex-tivoman is offline
Sage User
 
Join Date: Apr 2009
Location: Sacramento
Posts: 18
Thank you. I did "hardcode" the IP address of the localhost. it made no difference.

I think there is a problem running Phoenix and that is the root of this problem because, having read a lot of threads, it seems that BMT uses phoenix to populate metadata. And the phoenix-metadata.log file has nothing in it.

I have always in the past used the default sageTV.xml user interface. When I try to switch to the phoenix3.xml user interface the system freezes with a time and weather screen.

I have attached my phoenix.log file
I have attached a screenshot of my BMT / Phoenix error BMT.jpg

also the bmt.log file clearly shows a phoenix error. see:
2017-11-23 13:40:06,382 [EventRouter-902b345df187] INFO bmt.BMT - ========= BEGIN BATCH METADATA TOOLS ENVIRONMENT ==============
2017-11-23 13:40:06,382 [EventRouter-902b345df187] INFO bmt.BMT - BMT Version: 4.9.8
2017-11-23 13:57:15,631 [1559269531@qtp-1678359570-2] ERROR org.jdna.bmt.web.server.StatusServicesImpl - Status Failed: phoenix
Attached Images
File Type: jpg BMT.jpg (111.0 KB, 4 views)
Attached Files
File Type: txt phoenix.txt (35.1 KB, 3 views)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparing to Plex heffneil Batch Metadata Tools 20 01-08-2012 04:54 PM
Need help with SJQv4 remote agent coppit SageTV v7 Customizations 4 12-19-2010 11:03 AM
Plex in a TV? What about sage? rwc General Discussion 9 09-05-2010 04:38 PM
Possible to get SageTV to handle my library more like Plex? DAMAC SageTV Mac Edition 0 06-10-2009 10:33 AM
SagetTVService Virus Win32.Agent.dwo Ponchera SageTV Software 6 02-04-2008 06:33 PM


All times are GMT -6. The time now is 12:38 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.