2014-08-26, 19:26
I am in the process of setting up a TBS MOI+ which is a free-to-air satellite TV tuner box that includes the TVHeadEnd software. It runs on a ARM-based processor and runs a fairly lightweight version of Linux with busybox. Of particular note is that is does not include bash (just sh), so bash scripts apparently don't run correctly (at least not without modification), and as far as I can tell there is no package management system like apt or yum, so installing new software is a no-go (perhaps someone with a lot more Linux experience than I could do it, but I would have no idea where to start). There's also no perl or python interpreters that I can find. Yet somehow they have managed to include TVHeadEnd (3.9 branch) and it works surprisingly well, both in streaming Live TV to XBMC and in recording signals (using TVHeadEnd's web interface to set the start and stop times of recordings) and sending those recordings to XBMC.
What I have not been able to figure out is how to get EPG data into the device. I know how to create an xmltv.xml file containing the channels I want, but I do not know how to get TVHeadEnd to read it in. Much of what I see online talks about "grabbers", including one called tv_grab_file which turns out to be a bash script. But nowhere have a I found a real overview of how the process works in TVHeadEnd, so I'm having trouble conceptualizing the process by which TVHeadEnd might take a xmltv.xml file and import it into its database.
To be clear, as far as I know it is not possible to install software on this device, so the actual .xml file will need to be created on another machine on the local network and then dropped into a directory on this device. In other software such as MediaPortal I could just drop the file into a specific directory (and in the specific case of MediaPortal, rename it to tvguide.xml) and the software would see that a new file is available and import it. But as far as I have been able to determine, TVHeadEnd doesn't appear to work that way, unless I have totally missed something.
Even though it's a bash script, I did try putting the tv_grab_file script into /usr/bin as a couple posts I found suggested, and changing the permission using chmod 777. From what I read, I should have then been able to go into TVHeadEnd (to Configuration | Channel/EPG | EPG Grabber) and under "Internal Grabber" a new module should have appeared in the "Module" dropdown, but it didn't - the only choice there is "Disabled". I even rebooted the box and still no go. I also found that on that same page, under "External Interface", there is a selection for XMLTV but checking that doesn't seem to do anything. I read somewhere that with that enabled, you can use "netcat" with the -u option to send an xml file to TVHeadEnd (at least I think that's how it's supposed to work), but the version of netcat provided by busybox (called nc) doesn't include a -u option (-u sets "UDP mode" and there is no equivalent in the busybox version). So no matter what I have looked at I seem to run up against another wall. I keep thinking there has got to be some way to get schedule data into TVHeadEnd, and this is the last thing I need to figure out in order to have a truly functional system and get guide data into XBMC. Any ideas on how I might be able to get TVHeadEnd to import a pre-made xmltv.xml file?
In case it matters, running uname -a on this device returns the following:
Linux moi 2.6.35.14 #57 Mon Aug 4 03:00:56 SGT 2014 armv5tel GNU/Linux
The version of TVHeadEnd is: HTS Tvheadend 3.9.636~g03a69ff
What I have not been able to figure out is how to get EPG data into the device. I know how to create an xmltv.xml file containing the channels I want, but I do not know how to get TVHeadEnd to read it in. Much of what I see online talks about "grabbers", including one called tv_grab_file which turns out to be a bash script. But nowhere have a I found a real overview of how the process works in TVHeadEnd, so I'm having trouble conceptualizing the process by which TVHeadEnd might take a xmltv.xml file and import it into its database.
To be clear, as far as I know it is not possible to install software on this device, so the actual .xml file will need to be created on another machine on the local network and then dropped into a directory on this device. In other software such as MediaPortal I could just drop the file into a specific directory (and in the specific case of MediaPortal, rename it to tvguide.xml) and the software would see that a new file is available and import it. But as far as I have been able to determine, TVHeadEnd doesn't appear to work that way, unless I have totally missed something.
Even though it's a bash script, I did try putting the tv_grab_file script into /usr/bin as a couple posts I found suggested, and changing the permission using chmod 777. From what I read, I should have then been able to go into TVHeadEnd (to Configuration | Channel/EPG | EPG Grabber) and under "Internal Grabber" a new module should have appeared in the "Module" dropdown, but it didn't - the only choice there is "Disabled". I even rebooted the box and still no go. I also found that on that same page, under "External Interface", there is a selection for XMLTV but checking that doesn't seem to do anything. I read somewhere that with that enabled, you can use "netcat" with the -u option to send an xml file to TVHeadEnd (at least I think that's how it's supposed to work), but the version of netcat provided by busybox (called nc) doesn't include a -u option (-u sets "UDP mode" and there is no equivalent in the busybox version). So no matter what I have looked at I seem to run up against another wall. I keep thinking there has got to be some way to get schedule data into TVHeadEnd, and this is the last thing I need to figure out in order to have a truly functional system and get guide data into XBMC. Any ideas on how I might be able to get TVHeadEnd to import a pre-made xmltv.xml file?
In case it matters, running uname -a on this device returns the following:
Linux moi 2.6.35.14 #57 Mon Aug 4 03:00:56 SGT 2014 armv5tel GNU/Linux
The version of TVHeadEnd is: HTS Tvheadend 3.9.636~g03a69ff