Autor Thema: linuxserver/tvheadend + sundtek  (Gelesen 168 mal)

tomasl

  • Newbie
  • *
  • Beiträge: 9
    • Profil anzeigen
linuxserver/tvheadend + sundtek
« am: November 19, 2021, 11:49:38 Nachmittag »
Hi, I have issues getting adapter present in tvheadend, I think I did everything as I supposed to and can't figure out with my poor knowledge what's wrong.
I have HC4 with odroid's ubuntu image, docker installed and use the image from linuxserver.io based on alpine linux.
I tried both ./sundtek_netinst.sh and ./sundtek_netinst_testing.sh. in fact I don't know what's the difference, haven't tried to make a diff check.

so, on the host I ran:
cd /var/lib/docker/volumes/tvh/_data/
wget http://sundtek.de/media/sundtek_netinst.sh
chmod 777 sundtek_netinst.sh
./sundtek_netinst.sh –createnodes

inside the docker container I ran:
docker exec -it tvh /bin/bash
cd /config
./sundtek_netinst.sh -docker -use-custom-path=/config

the docker CLI to create container is:
docker create --name=tvh \
-v tvh:/config \
-v tvhpicons:/picons \
-v /drives/data2/REC/:/recordings \
-e PUID=1000 -e PGID=1000 \
-e TZ=CET \
-p 9981:9981 \
-p 9982:9982 \
--device=/dev/dvb:/dev/dvb \
--device=/dev/sundtek:/dev/sundtek \
--device=/dev/bus/usb:/dev/bus/usb \
--restart unless-stopped \
linuxserver/tvheadend

and obviously it is installed inside the docker container as mediaclient shows it:
root@f53cfe724529:/opt/bin# ./mediaclient -e
**** List of Media Hardware Devices ****
device 0: [SkyTV Ultimate 6 2016/Q1]  DVB-S/S2, ANALOG-TV, REMOTE-CONTROL, OSS-AUDIO
  [INFO]:
     STATUS: STANDBY
  [BUS]:
     ID: 1-2.4
  [SERIAL]:
     ID: U171212190229
  [DVB-S/S2]:
     FESTATUS: STANDBY
     LNBVOLTAGE: DISABLED
     LNBSUPPLY: ACADAPTER
     LNBSTATUS: OK
     FRONTEND: /dev/dvb/adapter0/frontend0
     DVR: /dev/dvb/adapter0/dvr0
     DMX: /dev/dvb/adapter0/demux0
  [ANALOG-TV]:
     VIDEO0: /dev/video0
     VBI0: /dev/vbi0
  [REMOTECONTROL]:
     INPUT0: /dev/mediainput0
  [OSS]:
     OSS0: /dev/dsp0

Anything you see I'm not doing or doing wrong?


Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8270
    • Profil anzeigen
Re: linuxserver/tvheadend + sundtek
« Antwort #1 am: November 21, 2021, 11:00:47 Vormittag »
Hi,

will check on Monday.
- check which architecture the tvheadend binary and the driver has
./mediaclient --arch

- there needs to be an LD_PRELOAD=/path/to/libmediaclient.so in the tvheadend start script

« Letzte Änderung: November 21, 2021, 01:49:53 Nachmittag von Sundtek »
Failure is a good thing! I'll fix it

norbertk

  • Newbie
  • *
  • Beiträge: 10
    • Profil anzeigen
Re: linuxserver/tvheadend + sundtek
« Antwort #2 am: November 21, 2021, 05:22:10 Nachmittag »
Zitat
there needs to be an LD_PRELOAD=/path/to/libmediaclient.so in the tvheadend start script

Is this only required for docker ? I have some hard to track down problems with tvheadend too but work under lxc and not docker.
Sundtek SkyTV Ultimate 8 2018 (DVB-S/S2/S2X) unter proxmox/lxc, debian

tomasl

  • Newbie
  • *
  • Beiträge: 9
    • Profil anzeigen
Re: linuxserver/tvheadend + sundtek
« Antwort #3 am: November 22, 2021, 12:36:38 Vormittag »
Hi, thank for response. see the answers for your questions.

tvheadend startup script content:
#!/bin/sh
/opt/bin/mediasrv -d --wait-for-devices --pluginpath=/opt/bin
LD_PRELOAD=/opt/lib/libmediaclient.so /usr/bin/tvheadend.bin $@

sundtek driver is arm64:
root@odroid:/opt/bin# ./mediaclient --arch
Architecture: arm64

and I asumed same for tvheadend container as it started just fine without specifically downloading the arm64 image. but just to be sure I explicitly downloaded arm64 image with arm64v8-latest tag and I can see the sundtek adapter finally. thank you.

Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8270
    • Profil anzeigen
Re: linuxserver/tvheadend + sundtek
« Antwort #4 am: November 22, 2021, 04:54:04 Vormittag »
Also be sure that the permissions of /dev/dvb and /dev are ok, if you still cannot figure out what's wrong maybe you can set up remote access to that system (eg. Anydesk) so we can have a quick look at it.
Failure is a good thing! I'll fix it

tomasl

  • Newbie
  • *
  • Beiträge: 9
    • Profil anzeigen
Re: linuxserver/tvheadend + sundtek
« Antwort #5 am: November 22, 2021, 09:45:05 Vormittag »
everything is working alright now, thank you.

tomasl

  • Newbie
  • *
  • Beiträge: 9
    • Profil anzeigen
Re: linuxserver/tvheadend + sundtek
« Antwort #6 am: November 28, 2021, 10:24:44 Nachmittag »
aaand it doesn't work again...
I haven't touched it. I turned up the TV and HTSP client couldn't connected.
so I restarted TVH container and I got this error:
root@odroid:~# docker start tvh
Error response from daemon: error gathering device information while adding custom device "/dev/dvb": no such file or directory
Error: failed to start containers: tvh

so I checked directory and it's not present...
root@odroid:~# cd /dev/dvb
-bash: cd: /dev/dvb: No such file or directory

I stopped container, ran ./sundtek_netinst.sh –createnodes and started the container and adapter was missing.

so I installed it inside the container again with ./sundtek_netinst.sh -docker -use-custom-path=/config and still nothing.
I removed container, added it again, ran ./sundtek_netinst.sh -u, then ./sundtek_netinst.sh –createnodes again and ./sundtek_netinst.sh -docker -use-custom-path=/config inside the container, restarted the container and nothing.
I checked tvheadend startup script under /usr/bin and LD_PRELOAD is there with correct values, I checked mediaclient -e and it shows the adapter on the host as well as inside docker container. what the...

Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8270
    • Profil anzeigen
Re: linuxserver/tvheadend + sundtek
« Antwort #7 am: November 29, 2021, 06:19:21 Nachmittag »
If you can set up anydesk we can have a look at it.
Be sure you're using the OTG Port of the Odroid system, which one do you have?

Odroid N2 has known USB Bugs, there's a followup product available from Hardkernel
Failure is a good thing! I'll fix it

tomasl

  • Newbie
  • *
  • Beiträge: 9
    • Profil anzeigen
Re: linuxserver/tvheadend + sundtek
« Antwort #8 am: November 29, 2021, 09:35:38 Nachmittag »
I'll get Anydesk set up and then I'll ping you. please let me know when you're usually available and how I could contact you. it will be difficult to align as with my 3 year old I can't do anything next to him as he wants to do everything with me and instead of me...
btw I'm using HC4 and it has only one USB port and I'm using small powered USB hub. I'm afraid to plug the sundtek dongle directly to the USB port of HC4.

Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8270
    • Profil anzeigen
Re: linuxserver/tvheadend + sundtek
« Antwort #9 am: November 30, 2021, 02:44:46 Vormittag »
Hi,

maybe you can check the online chat today?

The tuner needs around 450mA (two tuners powered), if you connect it directly the host should provide enough power. Active USB Hubs ... they have a certain quality. However we can check what's going on on your side.
Failure is a good thing! I'll fix it

tomasl

  • Newbie
  • *
  • Beiträge: 9
    • Profil anzeigen
Re: linuxserver/tvheadend + sundtek
« Antwort #10 am: November 30, 2021, 11:54:16 Vormittag »
what do you mean two tuners? both analog and DVB-S2 on SkyTV 6? I don't need that analog one.
HC4 USB port is rated 500mA, so I don't want to take the risk something happens to the USB port or the HW behind that.
do you know of some reliable USB self-powered hub?

I'll try to catch you on the chat one day evening.

Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8270
    • Profil anzeigen
Re: linuxserver/tvheadend + sundtek
« Antwort #11 am: November 30, 2021, 07:09:57 Nachmittag »
early in the morning is best!

oh you have another tuner, sorry I thought you have a dual dvb-s2 tuner.
Failure is a good thing! I'll fix it

tomasl

  • Newbie
  • *
  • Beiträge: 9
    • Profil anzeigen
Re: linuxserver/tvheadend + sundtek
« Antwort #12 am: November 30, 2021, 09:35:20 Nachmittag »
nope, I'm waiting for the quad tuner. ;)

I'll try to get to you early in the morning then. in upcoming 3 days.