Sundtek Support Forum

English => Sundtek MediaTV Pro (Europe) => Thema gestartet von: ehfred10 am Dezember 29, 2022, 04:10:05 Nachmittag

Titel: Sundtek - TVH - Rpi4 Docker
Beitrag von: ehfred10 am Dezember 29, 2022, 04:10:05 Nachmittag
Hello,

I'm trying to use my adapter through TVH docker on my raspberry pi.

I have two adapter MediaTV Digital Home III

I've installed the driver on the native host.

I've followed the wiki regarding docker use https://sundtek.com/wiki/index.php?title=Docker

I've tryed to change owner of the /dev/dvb folder (recursively)

But no adapter showned on the gui.

Did I missed something?

Thank you
Titel: Re: Sundtek - TVH - Rpi4 Docker
Beitrag von: Sundtek am Dezember 29, 2022, 05:21:37 Nachmittag
Hi,

Docker Image on a Raspberry PI ... ok, most people use it directly on the Raspberry PI.


However if you want to run it inside a docker, following steps are required:

Zitat
sudo -s # switch to root
echo "enabledocker=on" > /etc/sundtek.conf
afterwards it's best to restart the driver on the host
/opt/bin/mediaclient --shutdown
cd /opt/bin
./mediasrv -d

(it will exit immediately and create dummy nodes in /dev/dvb)
afterwards you should create the docker image with access to /dev/dvb and /dev/bus/usb

Did you run that on the native Host?

How did you create the docker image, did you allow access to /dev/dvb and /dev/bus/usb?
Titel: Re: Sundtek - TVH - Rpi4 Docker
Beitrag von: ehfred10 am Dezember 30, 2022, 01:50:11 Nachmittag
Hi, thank you for your help,

I've already created the sundtek.conf file

The TVH docker has been made through docker compose. Here is the part for TVH:

  tvheadend:
    image: lscr.io/linuxserver/tvheadend:latest
    container_name: tvheadend
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Brussels
      - RUN_OPTS= #optional
    volumes:
      - /home/pi/compose/tvheadend/config:/config
      - /recordings:/recordings
    ports:
      - 9981:9981
      - 9982:9982
    devices:
      - /dev/dvb:/dev/dvb
      - /dev/bus/usb:/dev/bus/usb
    restart: always
Titel: Re: Sundtek - TVH - Rpi4 Docker
Beitrag von: Sundtek am Dezember 30, 2022, 02:11:26 Nachmittag
Did you install the driver inside the docker as well (as documented in the wiki)?

The only purpose of the driver on the host is to create some dummy device nodes in /dev/dvb (in case of docker, because the device authorization is a bit weird).
Titel: Re: Sundtek - TVH - Rpi4 Docker
Beitrag von: ehfred10 am Dezember 30, 2022, 02:34:51 Nachmittag
Yup, I followed the wiki.

But inside the docker i got this:

root@9c6320bd9ff0:/# /config/opt/bin/mediaclient --tsscan /dev/dvb/adapter0/dvr0
Connecting to server failed

Titel: Re: Sundtek - TVH - Rpi4 Docker
Beitrag von: Sundtek am Dezember 30, 2022, 02:39:35 Nachmittag
did you restart the docker? - after the installation the docker should be restarted.

And be sure that there's no mediasrv process running on the native host (the configuration option on the host will cause the driver to exit immediately when done correctly - it will only create nodes as mentioned)
Titel: Re: Sundtek - TVH - Rpi4 Docker
Beitrag von: ehfred10 am Dezember 30, 2022, 02:50:18 Nachmittag
Yes, I've restarted the docker and the host to be sure.

pi@pifredge01:~ $ ps -aef | grep mediasrv
pi         56724   42363  0 13:49 pts/0    00:00:00 grep --color=auto mediasrv
pi@pifredge01:~ $ sudo docker exec -it tvheadend /bin/sh
root@9c6320bd9ff0:/# /config/opt/bin/mediaclient --tsscan /dev/dvb/adapter0/dvr0
Connecting to server failed
root@9c6320bd9ff0:/#
Titel: Re: Sundtek - TVH - Rpi4 Docker
Beitrag von: Sundtek am Dezember 30, 2022, 03:44:43 Nachmittag
how did you install the driver inside the docker?

The driver installation inside the docker should rename /usr/bin/tvheadend to /usr/bin/tvheadend.bin and deploy a script which starts the driver inside the docker.
Titel: Re: Sundtek - TVH - Rpi4 Docker
Beitrag von: ehfred10 am Dezember 30, 2022, 07:25:38 Nachmittag
Ok, I've restart the setup process with all mentioned in the wiki and your tips.

I've now my two adapter in TVH

Thank you for your help, again, really appreciated :)

And a happy 2023 ;)