Add delay to tvheadend service on osmc

I have finally got a working setup of tvheadend, everything works great except after a reboot my hdhomerun tuners do not show up. I have to restart the tvheadend service after I assume the hdhomerun drivers have loaded. Is there are way to delay tvheadend app (I installed it from the osmc app store) from starting for a while or until the tuner cards are found?

how do you load the hdhomerun kernel module/driver and userhdhomerun software? from rc.local?

I am not sure where the drivers are loaded, the drivers are whatever came with osmc or the tvheadend from the osmc app store because I did not install any additional drivers. I opened my /etc/rc.local and it only has exit 0 in it.

what hdhomerun tuner do you have model and country?.

With my hdhomerun DUAL tuner i have to manually install “userhdhomerun” an program that tvheadend needs to talk to my network tuner.

can you do a search for me and paste me the output.

sudo find / -name userhdhomerun
sudo find / -name dvb_hdhomerun
sudo journalctl | paste-log

SiliconDust HomeRun HD Ethernet Network Dual Digital TV Tuner 1080i ATSC HDHR-US

osmc@osmc:~$ sudo find / -name userhdhomerun
osmc@osmc:~$ sudo find / -name dvb_hdhomerun
/lib/modules/3.18.13-1-osmc/kernel/drivers/staging/dvb_hdhomerun
/lib/modules/3.18.9-5-osmc/kernel/drivers/staging/dvb_hdhomerun
osmc@osmc:~$ sudo journalctl | paste-log
http://paste.osmc.io/iyuhagafus

You are using the built in “tvhdhomerun” in tvheadend, not the kernel module… i have not testet that part yet, but you can do it like this…

sudo systemctl disable tvheadend

add before exit 0 in “/etc/rc.local” this line.

sleep 4
systemctl start tvheadend &

should work, then tvheadend will start later when the network is up… please get back to me if or if not it actually works.

-H

Ok, so this is what I did:

I ran this command:
sudo systemctl disable tvheadend

Then added systemctl start tvheadend &
to /etc/rc.local
and restarted.

then went to the web config on tvheadend and under DVB inputs -> TV adapters
the tuner was not listed.

I went back to the terminal and ran sudo service tvheadend restart
and then they showed up.
So problem still exists, any ideas what I should do?

it seems you have the PI on wifi, i would recommend ethernet/network cable…wifi is not always that fast to actually get an IP via DHCP… so try that…

or use the wait for network option in the My OSMC settings in kodi.