|
SageTV Downloads & Instructions This forum is for discussions containing Downloads and Instructions related to the Open Source version of SageTV. Please do not post questions in this forum. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Prime Network Encoder Install Walkthrough - v1
Installing PrimeNetEncoder with the HDHomeRun Prime - Draft
This post contains a walkthrough for installing the PrimeNetEncoder software with an HDHomeRun Prime (cablecard) on SageTV v9 on Linux. I would imagine that this is similar for windows, but I can not confirm this. I also have an older HDHome Dual ATSC that I will try to verify this against in the future. If anyone has a different encoder and can share variations, please post them in the comments and I will update this first post as I see them. This walkthrough is intended to follow the SageTV V9 Linux walkthrough in this thread (http://forums.sagetv.com/forums/showthread.php?t=62715). I think this should work for any Linux Ubuntu/Debian Install (If you are on RedHat, there are definitely command differences). This walkthrough assumes you are running PrimeNetEncoder on the same machine as your SageTV box. If not, some of the firewall settings and IP information may have to be changed accordingly. Basic Steps will include
Install HDHomeRun (HDHR) Software Install the HDHomeRun software Code:
sudo apt-get install hdhomerun-config hdhomerun-config-gui Test HDHR Software To test your install, first run the hdhomerun_config command as below and you should see the usage. Code:
user@computer:~$ hdhomerun_config Usage: hdhomerun_config discover hdhomerun_config <id> get help hdhomerun_config <id> get <item> hdhomerun_config <id> set <item> <value> hdhomerun_config <id> scan <tuner> [<filename>] hdhomerun_config <id> save <tuner> <filename> hdhomerun_config <id> upgrade <filename> Code:
user@computer:~$ hdhomerun_config discover If discovery does not work, try the following command to adjust your firewall incoming udp rules (thanks Boolah) Code:
sudo iptables -I INPUT -p udp -m udp --sport 65001 -j ACCEPT If you know the IP of the HDHR, you should be able to run the below command Code:
user@computer:~$ hdhomerun_config <ip> get help user@computer:~$ hdhomerun_config <ip> get /sys/model hdhomerun3_cablecard Validate Computer IP Config Validate your computers IP. When using a static IP, Ubuntu expects your IP to be set correctly in the /etc/hosts file. This must be done for PNE to work correctly. Your local host should be listed second with your static ip. If it is not, you need to edit this file and set it. Code:
user@computer:~$ cat /etc/hosts 127.0.0.1 localhost 192.168.1.12 sagetvserver <-- edit this line if it = 127.0.1.1 ... Open up Firewall Assuming you have already run the Linux walkthrough referenced above, you should have already opened the following SageTV related ports. 42024 TCP - Client Server Communication 31100 UDP - Allow clients to auto detect the server 31099 TCP - Allow clients to communicate with the server 8018 TCP - SageTV Locator Service 7818 TCP - Streaming video 7760 TCP - Allow the Program Guide to work (for placeshifters?) The below additional ports need to be opened on your firewall 5000 - 5002 (UDP) : hdhomerun streams 7000 - 7002 (TCP) : Network Encoder streaming 8271 (UDP) : SageTV Network Encoder Discovery Quote:
If you are following the Linux walkthrough, you should already have a Linux GUI Firewall tool. Open this and add the above port ranges as listed above. I have not figured out a simple/easy command line to edit the iptables firewall. (suggestions greatly appreciated) Download PrimeNetEncoder (PNE) Download Prime Net Encoder. I have attempted to update this walkthrough to use v2.0 (latest) but you should be able to use the below link and manually download any version. There appears to be some conversation about the most stable version. This guide does not have any recommendations at this time. (PNE Thread http://forums.sagetv.com/forums/showthread.php?t=62055) Download PNE 2.0 Code:
wget https://docs.google.com/uc?id=0B9h9u1LGV355QnNrX1BGOGI0Nnc&export=download Code:
mv uc?id=0B9h9u1LGV355akF2QlJUVGY2NHc pne2.0.zip Code:
unzip pne2.0.zip Code:
mv PrimeNetEncoder\ v2.0.0 PrimeNetEncoder_v2.0.0 To configure PNE, you must first run it so it will create a config file Code:
>> cd PrimeNetEncoder_v2.0.0 >> mv PrimeNetEncoder.bat PrimeNetEncoder.sh >> chmod a+x PrimeNetEncoder.sh >> ./PrimeNetEncoder.sh PrimeNetEncover Version: 2.0 Author: jvl711 PrimeNetEncoder> This created a "PrimeNetEncoder.properties" file Edit PrimeNetEncoder.properties Code:
nano PrimeNetEncoder.properties Code:
-- If using IP: tuner0.name=PrimeNetEncoder 213-0 tuner0.id=192.168.1.213 tuner1.name=PrimeNetEncoder 213-1 tuner1.id=192.168.1.213 tuner2.name=PrimeNetEncoder 213-2 tuner2.id=192.168.1.213 -- or if using encoder ID: tuner0.name=PrimeNetEncoder 131653b2-0 tuner0.id=131653b2 tuner1.name=PrimeNetEncoder 131653b2-1 tuner1.id=131653b2 tuner2.name=PrimeNetEncoder 131653b2-2 tuner2.id=131653b2 -- Using custom install path: ffmpeg.path=/home/<user>/sagetv/ffmpeg HDHomeRunConfig.path=/usr/bin/hdhomerun_config -- or if using the .deb and the automatic install path: ffmpeg.path=/opt/sagetv/server/ffmpeg HDHomeRunConfig.path=/usr/bin/hdhomerun_config Note2: Set the HDHomeRunConfig.path to the full path of the runtime binary. It should be installed at the above location, but if you are not sure, you can use the unix "which" command to find out "which hdhomerun_config". Note3: Set the ffmpeg path to the full path of the FFMPEG in your SageTV directory (this seems to work, please post comments if this is bad for some reason). The above path assumes that you followed the Linux install guide. Your path may vary. press Ctrl-o to save and Ctrl-x to exit. Run & Test PNE You should now be able to run PNE and validate it can see the HDHR encoder Code:
>> ./PrimeNetEncoder.sh PrimeNetEncover Version: 2.0 Author: jvl711 PrimeNetEncoder>status (0) PrimeNetEncoder 213-0 (192.168.1.213-0) - IDLE (1) PrimeNetEncoder 213-1 (192.168.1.213-1) - IDLE (2) PrimeNetEncoder 213-2 (192.168.1.213-2) - IDLE Enable Directory Access Ensure that all users have the ability to write to the media directory Code:
>> sudo chmod a+rwx /var/media/tv Configure & Run SageTV Reboot your system to allow all changes to take effect Code:
>> sudo reboot Code:
In Terminal 1: >> cd PrimeNetEncoder_v2.0 >> ./PrimeNetEncoder.sh Code:
In Terminal 2: >> cd sagetv (or whatever your sage dir is) >> nano Sage.properties Code:
encoding_discovery_port=8271 -- I had to manually create this entry network_encoder_discovery=true -- this existed but was set to false If this is the only encoder on your system, and you have previously attempted to configure it, you should remove it from your properties file by deleting all of the lines that start with "mmc". Does anyone know what will happen if we do not remove these entries? Will sage still find the encoder? press Ctrl-o to save then Ctrl-x to exit Its now time to run SageTV run "./startsage" in the SageTV server directory. Code:
./startsage 1) ./startsagecore: line 47: /var/run/sagetv.pid: Permission denied -- normal users do not have permission by default to write files to the /var/run directory, you can fix this by running "sudo chmod a+w /var/run". As this is really a link to "/run", you may want to change the access on "/run" also. Please note, this setting appears to reset it self after every reboot... [TODO look for fix]. This allows all users to write files to that directory. This may not be the best practice, but is probably ok on your Sage machine. Note: I'm not sure this is surviving through reboots. I'll try to verify and update a solution if I can find one. 2) Java HotSpot(TM) 64-Bit Server VM warning: -XX:ThreadPriorityPolicy requires root privilege on Linux -- I have not chased down what this means and why, I defer to the code gurus to let us know how important this is. Once you start sage… you may want to give it a minute or so to detect the encoders before you log in. I dont know if its true or not, but my perception is that if I start PNE, then start sage and immediately log in with a client, it can not find the encoders…. Configuring Sage with a Client You need to now log into Sage with a client. This is covered in the original walkthrough. Run "./sageclient.sh" If this is your first time loading Sage, you will have to go through the entire configuration menu process. If you have previously configured sage, the network encoder menu should already be on screen. Note: if you removed all the mmc entries, you will be prompted to select the country, and the video format first. The "Setup Wizard" should now be on screen showing your three new encoders. There should be three lines that say something similar to... Code:
PrimeNetEncoder 213-0 on host:7000 PrimeNetEncoder 213-1 on host:7001 PrimeNetEncoder 213-2 on host:7002 Once you click, a progress window titled "Broadcast standard is being determined. Please wait..." will appear. This should take ~30-60 seconds to complete. You will now have to select a "tuning option." There is only one option it has *lots* of text and starts with "Use Tuner on Capture Card to tune Antenna/Cable TV...." Click this text to continue. Configure Program Guide Information. If you have never configured this before (new setup) chose the appropriate guide option. Either the built-in "US, Canada, XMLTV guide option" (top), or a custom option based on a plugin (Updated) DO NOT DO A CHANNEL SCAN This does not work when using the PrimeNetEncoder and will give you a bunch of strange OK### channels that do not tune correctly. Until someone finds a better method, you will need to have the HDHR Prime scan for channels, then you need to manually select them within sage. To do this... A) open a web browser to your HDHR (http://<HDHR IP>/lineup.html?show=all). Click the "Detect Channels" button. The HDHR will go through and detect all available channels. If you again go to the above link, all possible channels will be displayed, invalid channels will have a line through them. At this point you can manually enable channels in sage. [ToDo: how to configure an external guide plugin] If you have already configured a different encoder for this provider, or previously configured a guide, you can re-use this by clicking the bottom option "Use or Copy an Existing Channel Lineup for this Source." Select the appropriate lineup, tell the system to re-use the channel configuration as appropriate. Now click the "Add New Source" button and repeat the above process for the remaining two encoders. Unless there is a good reason not to, you should ABSOLUTELY do the Copy Existing Channel Lineup option for these tuners as they are the same box on the same tv network. When done with all three (0, 1 and 2) click the "Finish Source Setup" button. You should now have 3 working tunes and be able to test the system by tuning/recording live tv. Another way to verify that the system is working... Tell sage to record a show. Look in the /var/media/tv directory and see if a file exists and is growing. Code:
>> ls -l /var/media/tv/ Last edited by SageWizdom; 02-25-2016 at 11:48 AM. Reason: updated for v2.0 |
#2
|
||||
|
||||
Quote:
Do you mind if I add a link to this write up in the PNE thread. |
#3
|
|||
|
|||
Quote:
|
#4
|
|||
|
|||
I'm trying this with an old school 2 antenna HDHR. I'm not sure PrimeNet is the right thing to be using, but I'm trying it. It's getting to the point in the Extender GUI where it asks for the ZIP code for guide data. I'm then getting a message about the SageTV Server not being available and to check my internet connection. Don't think that's the problem since I've been downloading the install files directly to this server. Any ideas?
__________________
Win7 VM -4gb ram Ubuntu 14.04 VM -4gb ram (attempting with OS v9) 3 extenders through the house Plex integration HDHR |
#5
|
|||
|
|||
Quote:
|
#6
|
|||
|
|||
Ok, I've reached out to Narflex for that.
I also had a weird output when scanning for channels. It simply listed something like 150+ generic channels and when I tried to play any of them, I got no signal. I'm not convinced it's actually doing a channel scan yet.
__________________
Win7 VM -4gb ram Ubuntu 14.04 VM -4gb ram (attempting with OS v9) 3 extenders through the house Plex integration HDHR |
#7
|
||||
|
||||
If you are using PrimeNetEncoder, you do not do a scan in Sage. You have to do that in the HDHomeRun GUI program.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
#8
|
|||
|
|||
I'm all CLI for the server. Can I run the scan through the PrimeNetEncoder CLI interface? I'm being lazy not looking for that in the other thread, I know.
__________________
Win7 VM -4gb ram Ubuntu 14.04 VM -4gb ram (attempting with OS v9) 3 extenders through the house Plex integration HDHR |
#9
|
||||
|
||||
Quote:
Code:
Channel scan: To run a channel scan: format: hdhomerun_config <device id> scan /tuner<n> [<log filename>] eg: hdhomerun_config FFFFFFFF scan /tuner0 scan0.log This command will scan all channels on the selected channelmap plus any additional channelmaps associated with the selected channelmap. All standard modulation types for the selected channelmap are tested. When a digital channel is found it will identify the programs on the channel. The log filename is optional; if included it will log to the given filename.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
#10
|
|||
|
|||
Quote:
1) Go to the web address of the HDHR 2) Click the "Channel Lineup" link (top blue link) 3) Click the "Detect Channels" button at the top of the page. or http://<IP of your HDHR>/lineup.html It will work its way through all the channels. When done, it will display all of the available channels it can see. I prefer the semi-hidden view that shows the valid and invalid channels (I just walk through the channel listing in sage and deselect all the crossed out channels. http://<IP of your HDHR>/lineup.html?show=all |
#11
|
||||
|
||||
Quote:
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
#12
|
|||
|
|||
Quote:
It drives the real question which is... what additional info needs to be added to support other tuners? And what other tuners are the most popular? |
#13
|
||||
|
||||
Quote:
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
#14
|
|||
|
|||
Anyone have wget URL to PNE 2.0?
|
#15
|
|||
|
|||
I followed these instructions and it seems like everything worked. when I try to watch a show I get no picture and this is the error I see in the PrimeNetEncoder terminal. Any help would be appreciated.
Code:
PrimeNetEncoder>Error: SageTV start recording command does not appear to be in the proper format. Please attempt restarting SageTV. java.lang.NullPointerException at jvl.primenetencoder.Tuner.getFileSize(Tuner.java:744) at jvl.primenetencoder.Tuner.run(Tuner.java:244) |
#16
|
|||
|
|||
Quote:
|
#17
|
|||
|
|||
I've attempted to update the instructions to support 2.0. Please note, my host is in the middle of a rebuild, so I have not gotten to run through this on a live system yet. Please let me know if you run into any problems.
Thanks |
#18
|
|||
|
|||
It was working until I tried to watch something and I'm seeing "No Signal" on the screen. I saw the "Tuner Status" on the HDHR tell me that it was properly tuned, so that part was working.
The other strange thing is that the file that showed up in /var/media/tv/ was a .ts file instead of a .mpg and the file size is not incrementing (stays at 0). Any ideas what I can look at to figure out where the problem is? |
#19
|
|||
|
|||
Quote:
Check the ownership of your /var/media/tv/ directory. It should look a lot like the below. The key bits are the start Quote:
rwx = read write execute 3 times, for user, for group and for everyone. In my case, the root user, the root group and everyone can all read, write and execute files in the directory. Execute is needed to be able to do a directory listing for example. If yours is not set to all three, you can do the following Quote:
__________________
Server: Centos Server 14.04 LTS - 64Bit, VM in XenServer, 2 cores of a Intel i7, 2-4 GB Ram, 8 GB system Disk, 1.8 TB storage, SageTV V9.0.4.232, HDHR Prime x 1 Clients: PC Client x 1, HD-300 x 1, AppleTV x 2, WebClient (phone/tablet) x 3 |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Basic Linux V9 Build and Walkthrough - First Draft | SageWizdom | SageTV Downloads & Instructions | 32 | 02-20-2016 09:29 PM |
SageTV as a network encoder / recording on network encoder works, not from server | perfessor101 | SageTV Software | 0 | 06-21-2014 05:59 AM |
network encoder stutters but ok on the encoder pc | stryker | SageTV Software | 4 | 01-09-2008 02:28 PM |
Network Encoder fot DVB-T? | pwiebe | SageTV Linux | 0 | 01-19-2006 09:20 AM |