OSMC RC Unable to install TVHEADEND

I would be interested in Sam’s reply. I want to use OSMC but a working Tvheadend is essential.

Same for me too. TVheadend has to be working

I’ve added muxes manually. Scanning of theses muxes didn’t work. No Services have been found.

The building of TVheadend is pretty easy, been doing it for year now my self ;-)…

And doesn’t brake anything… the error installing earlier was the package manager that for some weird reason try’d to manipulate /home/osmc/.hts (user folder) folder something an installing package never should do in my book ;-(.

Just use the git version like this.

sudo -s

apt-get install git build-essential pkg-config libssl-dev dvb-firmware-osmc dvb-tools libdvbv5-0 liburiparser-dev liburiparser1 libavahi-client-dev zlib1g-dev libavcodec-dev libavutil-dev libavformat-dev libswscale-dev

cd /usr/src
git clone https://github.com/tvheadend/tvheadend
cd tvheadend
./configure
make

start tvheadend by running

" /usr/src/tvheadend/build.linux/tvheadend -u osmc -g video -C &"

tvheadend homepage http://PI_IP/:9981

and if you want to try the app store version, just move the /home/osmc/.hts before you install that package, sam will probably fix this or some one will… as i read sam’s reply… he does not have a tuner him self to test with ;-)).

Hi Harry

We tweak .hts to add the osmc:osmc user. I think it only does it on a fresh install though. At least it should, and if the directory exists it should be graceful

CC @DBMandrake

I am compiling TVHeadend from master too, so I am not sure why it is working for you.

Are you saying (just to clarify): that scanning did not work with my version (no muxes), but does with yours? It may be a dependency issue here.

Sam

Looking at the package scripts, it currently checks for the existence of:

/home/osmc/.hts/tvheadend/accesscontrol/1

And only if this doesn’t exist, does it create one from a template. It will however be doing this test on both new installs and upgrades of the package - that can be changed to only new installs if necessary. (It takes a bit of hacking to achieve this in a postinst script)

See below:

I don’t have any tvheadend compatible hardware unfortunately, so I can’t test tvheadend myself.

From my perspective, with the AppStore Tvheadend I can manually enter the muxes, then by entering the network name and enabling the adaptor the Initial Scan is initiated but no Services are found. With Tvheadend versions in Raspbmc and Openelec services are found.

Have checked the accesscontrol file on my Pi2, and it seems to be as one would expect from Sam’s script.

One thing I have suspected is that the problem may be associated with the start up order, though I can’t be sure. when I run " systemctl status tvheadend" having just booted at around 10 am on 26/3/2015 I get:

“* tvheadend.service - TVHeadend Server
Loaded: loaded (/lib/systemd/system/tvheadend.service; enabled)
Active: active (running) since Wed 2015-03-25 18:59:20 UTC; 15h ago
Process: 248 ExecStart=/usr/bin/tvheadend -f -p /run/tvheadend.pid -C -u osmc -g video (code=exited, status=0/SUCCESS)
Main PID: 292 (tvheadend)
CGroup: /system.slice/tvheadend.service
`-292 /usr/bin/tvheadend -f -p /run/tvheadend.pid -C -u osmc -g video”

so it is obviously starting before the Pi has downloaded a valid time. Could this be part of the problem?

What happens if you restart the service after the time is correct ?

sudo systemctl restart tvheadend

If the problem is the time I would expect it to work after this.

Hi Sam,

If i use my .hts folder, that my own compiled version from git have made, then the package manger is not finishing installation… just braks/exits…

I can se that i don’t have an "/home/osmc/.hts/tvheadend/accesscontrol/1" >1< im running password less… but there is an random named file in there with some of the same infomation… so just check if the folder exists (preferably .hts folder) not the file…

did a new try with the app store version…

here is the error

and in dmesg i finde this:

[64295.380450] usb 1-1.3.3: DVB: adapter 0 frontend 0 symbol rate 6875 out of range (500000..8000000)
[64495.531436] usb 1-1.3.3: DVB: adapter 0 frontend 0 symbol rate 6875 out of range (500000..8000000)

also there is no EPG over-the-air grapper installed:

This is from my on version, and it’s log:

Her is my compile log .config.mk
http://paste.osmc.io/wimetabosa.coffee

Did try to enable more debug, but there where no new infomation…

@DBMandrake - restarting Tvheadend as you suggest did not fix the problem of not finding any services, which probably does not surprise you. However the nearest I have ever come to getting a Tvheadend to work on my Pi 2 was when I started it manually, but presumably this was a coincidence.

The result of running “sudo systemctl status tvheadend -l” after the restart and creating 2 new muxes was:

  • tvheadend.service - TVHeadend Server
    Loaded: loaded (/lib/systemd/system/tvheadend.service; enabled)
    Active: active (running) since Thu 2015-03-26 18:24:30 UTC; 9min ago
    Process: 497 ExecStop=/usr/bin/rm /run/tvheadend.pid (code=exited, status=203/EXEC)
    Process: 500 ExecStart=/usr/bin/tvheadend -f -p /run/tvheadend.pid -C -u osmc -g video (code=exited, status=0 /SUCCESS)
    Main PID: 501 (tvheadend)
    CGroup: /system.slice/tvheadend.service
    `-501 /usr/bin/tvheadend -f -p /run/tvheadend.pid -C -u osmc -g video

Mar 26 18:25:40 osmc tvheadend[501]: linuxdvb: /dev/dvb/adapter0/frontend0 - FE_READ_STATUS error Remote I/O er ror
Mar 26 18:26:00 osmc tvheadend[501]: mpegts: 754000 - initial scan complete
Mar 26 18:27:19 osmc tvheadend[501]: mpegts: 768000 - starting for ‘initial scan’ (weight 1)
Mar 26 18:27:19 osmc tvheadend[501]: mpegts: 768000 - tuning on /dev/dvb/adapter0/frontend0
Mar 26 18:27:33 osmc tvheadend[501]: linuxdvb: /dev/dvb/adapter0/frontend0 - FE_READ_STATUS error Remote I/O er ror
Mar 26 18:27:49 osmc tvheadend[501]: mpegts: 768000 - initial scan complete
Mar 26 18:29:03 osmc tvheadend[501]: mpegts: 658000 - starting for ‘initial scan’ (weight 1)
Mar 26 18:29:03 osmc tvheadend[501]: mpegts: 658000 - tuning on /dev/dvb/adapter0/frontend0
Mar 26 18:29:16 osmc tvheadend[501]: linuxdvb: /dev/dvb/adapter0/frontend0 - FE_READ_STATUS error Remote I/O er ror
Mar 26 18:29:33 osmc tvheadend[501]: mpegts: 658000 - initial scan complete"

Does this indicate a problem in linuxdvb?

HarryL, thank you, thank you, thank you!!!

I followed your instructions to build Tvheadend on OSMC. Having set up the muxes it scanned and found all the Freeview channels in my area. All I had to do was to set it to run at start up and all is working well.

Paul

Hi @HarryL
Thank you very much for the instructions I am now up and running with a smile on my face :smile:

I took a fresh install and tried your instructions but it all failed. I then installed the App Store version and then immediately uninstalled it and your instructions then worked

I have a PCTV 292e USB tuner and when I tried to use it Tvheadend could see it but it would’t find any services. When I looked at DMESG I saw that dvb-demod-si2168-02.fw was not being loaded. I discovered that it was not in /lib/firmware so I downloaded it and put it in the folder and the tuner burst into life.

Thank you again for the instructions

Keith

I am still not finding any channels with either HarryL’s or the latest App Store version of Tvheadend with my Pi 2 + Hauppage WINTV-HR 900H (which appears as a Zarlink ZL 10353 DVB-T).

Have just done a clean install with HarryL’s version, which has the advantage over the App Store version of allowing you to initiate scans. dmesg then gave the following apparent error message:

[ 14.104376] usb 1-1.2.4: DVB: adapter 0 frontend 0 frequency 0 out of range (174000000…862000000)

on start-up.

Using RASBMC on a Pi 1 I had to run:

cd /lib/firmware
sudo wget goo.gl/xZSPH -O dvb_firmware.tar.gz
sudo tar -xzf dvb_firmware.tar.gz

so I tried that and noticed references to Rasbmc while doing so. Are these correct for OSMC & Pi 2?

After running that I still got the above entry from dmesg. However attemting to rescan, I got a series of messages of the form:

[ 28.670875] xc2028 0-0061: Loading SCODE for type=DTV78 DTV8 ZARLINK456 SCODE HAS_IF_4560 (62000300), id 0000000000000000.
[ 28.686029] xc2028 0-0061: Incorrect readback of firmware version.

which looks like confirmation that I am downloading the wrong firmware. Can anyone advise a better link to download the firmware?

Using HarryL’s instructions I have TVHeadend up and running and loading and scanning all the pre-defined Muxes for ATSC and it finds all the channels I’d expect it to using a WinTV-HVR-950Q

I also have enabled the TVHeadend HTSP Client, and it connects to the TVHeadend server.

But I don’t see the “Live TV” tab in the main menu.

Any idea what I might be missing?

@ObvB - have you mapped the channels using the Tvheadend web-type page? If not they will not be visble to Kodi/OSMC.

Check if the addon is enabled, sometimes you have to enable it more than once before it sticks

This was it.

But I’m not finished yet :frowning:

Now the “Live TV” menu appears, and it has the channels that I have mapped in TVHeadend, but when I try and view a channel, all I see is a spinning grid of rainbow colored squares. In the TVHeadend “web-page”, in the status tab, it show a connection that is streaming the expected number of kb/s. Could this be because I don’t (yet) have an MPEG2 hardware license?

(I should also mention that it took quite a bit of “trial end error” to get this far. I had to follow withakw’s method of installing TVHeadend from github using HarryL’s instructions, then install and uninstalling the OSMC App Store version, and then running and configuring the github version. I haven’t yet got it running automatically on startup, I manually start TVHeadend on each reboot … one step at a time :slight_smile: )

Do you have audio? Before I installed the MPEG2 codec I had audio but the screen was black. I get the spinning coloured grid when tuned to a radio station. Are you sure it is not a radio station you are tuned to?