Linux Schedules Direct Setup on Ubuntu Server
#16
@rpcameron could you post instructions for that, so other users can have the option to do so, such like myself?

@elsmandino Ive had issues with pre-installed distros adding things like TVH and other stuff in the past, hence why I went down the 'Ubuntu/TVH' route, I have in this instance run this in a VM using hyper-v, although I assume it can be done with other FOSS OS's. You could try it with OMV with no plugins first and see how that goes. Or if the Pi is your thing, there is rasping Lite, which this would work on it. But as OMV is Debian based, there isn't really a reason why it shouldn't work, so long as you don't deviate from these instructions I have given.

I know that sounds a bit contradictory, but although in theory it 'shouldn't break anything in OMV' it might! LOL
Server: Ubuntu Server 22TB HDD running SAMBA
Kodi: 4 Raspberry Pi 3 running Libreelec -  on the main PC - running Linux Mint
My Setup thread |
Reply
#17
(2018-02-16, 09:38)tjay260476 Wrote: @rpcameron could you post instructions for that, so other users can have the option to do so, such like myself?

No offense, but if you need instructions on how to clone a repository and copy a single file into your $PATH, then you probably shouldn't be messing around on a command line with root privileges.

The repo is here: https://github.com/azlm8t/tv_grab_zz_sdjson_sqlite

I believe you will need a couple more Perl modules beyond what XMLTV requires. Off the top of my head they are:
  • DateTime::Format::SQLite
  • DBD::SQLite
  • File::Homedir
  • JSON
  • JSON::XS (not required, but makes things MUCH faster)
  • LWP:: Protocols::HTTPS
  • LWP::UserAgent:: Determined
That's not a comprehensive list, and some may be redundant. (On my system I create a base XMLTV that only includes the modules and utilities, but no grabbers, so my initial requirements are different.) If you go to run the grabber and it complains about a missing module, just install it from your OS's repo, then run it again. Keep repeating until it runs.

JSON::XS isn't a necessary module, but it makes a huge difference, so I highly recommend you install it.

(Damn auto-creating smilies ...)
Reply
#18
(2018-02-16, 16:38)rpcameron Wrote:
(2018-02-16, 09:38)tjay260476 Wrote: @rpcameron could you post instructions for that, so other users can have the option to do so, such like myself?

No offense, but if you need instructions on how to clone a repository and copy a single file into your $PATH, then you probably shouldn't be messing around on a command line with root privileges.

The repo is here: https://github.com/azlm8t/tv_grab_zz_sdjson_sqlite

I believe you will need a couple more Perl modules beyond what XMLTV requires. Off the top of my head they are:
  • DateTime::Format::SQLite
  • DBD::SQLite
  • File::Homedir
  • JSON
  • JSON::XS (not required, but makes things MUCH faster)
  • LWP:: Protocols::HTTPS
  • LWP::UserAgent:: Determined
That's not a comprehensive list, and some may be redundant. (On my system I create a base XMLTV that only includes the modules and utilities, but no grabbers, so my initial requirements are different.) If you go to run the grabber and it complains about a missing module, just install it from your OS's repo, then run it again. Keep repeating until it runs.

JSON::XS isn't a necessary module, but it makes a huge difference, so I highly recommend you install it.

(Damn auto-creating smilies ...)  
@rpcameron i'm interested in using tv_grab_zz_sdjson_sqlite, I've copied over the files to usr/bin and ran tv_grab_zz_sdjson_sqlite --manage-lineups the only thing it complained about was LWP::UserAgent:: Determined which I've managed to installed.

Using the hts user i run tv_grab_zz_sdjson_sqlite --manage-lineups and i initialize the the database, choose a name and then exit... when i run tv_grab_zz_sdjson_sqlite --configure, it will ask me for the database name i created, select a lineup and MythTV category processing. however once all selected it will then just jump back to the cmd prompt, i'm kind of thinking it shouldn't do that? and there should be more to configure process, am i right?

when i run tv_grab_zz_sdjson_sqlite it does seem to run ok and bring back data, however, when i run the internal grabber in TVH, i get:

Code:

2018-02-18 09:49:39.924 spawn: Executing "/usr/bin/tv_grab_zz_sdjson_sqlite"
2018-02-18 09:49:40.404 spawn: Opening the local database
2018-02-18 09:49:40.404 spawn: Can't call method "errstr" on an undefined value at /usr/bin/tv_grab_zz_sdjson_sqlite line 3897.
2018-02-18 09:49:40.411 xmltv: /usr/bin/tv_grab_zz_sdjson_sqlite: no output detected
2018-02-18 09:49:40.411 xmltv: /usr/bin/tv_grab_zz_sdjson_sqlite: grab returned no data

Which makes me think it cant open up the database, any pointers in working out whats wrong?
Reply
#19
After you've initialized the database, you need to use the manage lineups option to actually select/modify the lineups in your SD account, and to choose which stationIDs on those lineups to grab information for. After you've done that, then run the grabber.
Reply
#20
OK, tried that, same issue, i don't understand if i run tv_grab_zz_sdjson_sqlite (with hts) then i can see it download the lineups, channels, programs etc.... does it matter where i run the  tv_grab_zz_sdjson_sqlite --manage-lineups e.g i've run it both in ~/ and in .xmltv and should it matter what i call the database and presumably i should use the extension DB?
Reply
#21
The SQLite grabber operates the same as all of the other grabbers:

First, configure it (--configure). If you haven't run it before, it tells you to initialize your database and setup your lineups (--manage-lineups). Once your database is created, you've selected which lineup from your account, and you've selected which stationIDs from the lineup to grab, make sure the grabber knows where your DB is by running configure again (--configure).

Once the grabber is set up, give it a quick brief run to make sure it works, something like only 2 days and output to a file (--days 2 --output tv.xml). Once that works, then you can enable it in Tvheadend.

It shouldn't need to be said, but all of these steps should always be run as the same system user that Tvheadend runs as to ensure that it will use the same configuration that was created at first run.
Reply
#22
thanks for your efforts.... everything works ok when running under the hts user in the cmd line... but not in TVheadend, really can cant work out why.... i've given up for the time being, back to tv_grab_zz_sdjson !
Reply
#23
(2018-02-15, 22:02)rpcameron Wrote: I've found azlm8t's fork of tv_grab_zz_sdjson_sqlite to be much better than the non-sqlite grabber, and better than the original with support for artwork and <premiere /> tagging in the generated output. Just install the xmltv package as provided, then clone and install the other grabber into /usr/bin and use that. Much less friction, and only uses the modules from xmltv, not its grabbers.
 Can I just check something, please - when you say "clone" in the above, is this just a term for downloading the file tv_grab_zz_sdjson_sqlite into my /usr/bin folder?

Sometimes it is Linux terms, rather than processes, that confuse me as to what to do.
Reply
#24
(2018-02-19, 15:30)elsmandino Wrote:
(2018-02-15, 22:02)rpcameron Wrote: I've found azlm8t's fork of tv_grab_zz_sdjson_sqlite to be much better than the non-sqlite grabber, and better than the original with support for artwork and <premiere /> tagging in the generated output. Just install the xmltv package as provided, then clone and install the other grabber into /usr/bin and use that. Much less friction, and only uses the modules from xmltv, not its grabbers.
 Can I just check something, please - when you say "clone" in the above, is this just a term for downloading the file tv_grab_zz_sdjson_sqlite into my /usr/bin folder?

Sometimes it is Linux terms, rather than processes, that confuse me as to what to do.

"Clone" is a command you issue to git, to make a local copy of a git version control repository.


You can also just download a copy of the archive.
Reply
#25
Is the directions for Ubuntu Server 17.10 or 16.04?
I am using 17.10 and getting the following error after

sudo apt-get update

  404  Not Found
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/alex-tomlins/xmltv/ubuntu artful Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Reply
#26
(2018-02-19, 19:21)LongMan Wrote: Is the directions for Ubuntu Server 17.10 or 16.04?
I am using 17.10 and getting the following error after
16.04 i think

https://launchpad.net/~alex-tomlins/+arc...untu/xmltv
Reply
#27
(2018-02-18, 23:59)AshG Wrote: thanks for your efforts.... everything works ok when running under the hts user in the cmd line... but not in TVheadend, really can cant work out why.... i've given up for the time being, back to tv_grab_zz_sdjson !
oh my god i think i may have done it...  i changed the database line in the config file to home/hts/.xmltv/databasename.db form just databasename.db maybe i'm suppose to put the full path of the DB when doing the configuration?

here's what i did (i'm using Ubuntu 16.04)


create new directory clone/download the file:

Then just copy tv_grab_zz_sdjson_sqlite file to usr/bin
Code:

cp -i tv_grab/tv_grab_zz_sdjson_sqlite/tv_grab_zz_sdjson_sqlite /usr/bin

Run the file with mange lineup option: 
Code:

tv_grab_zz_sdjson_sqlite --manage-lineups

For me it complained that i didnt have LWP::UserAgent: : Determined module installed, so I:
Code:

perl -MCPAN -e 'install Bundle::LWP'
sudo perl -MCPAN -e 'install LWP::UserAgent:: Determined

change the user to hts (or whatever user runs TVHEADEND)
Code:

sudo su - hts

Run the file with manage-lineups again:
>Enter your Schedules Direct username & Password
>The select 4 - initialize/update local database
>Choose the database name
> Then 5 Manage database lineup channel selection

Now run the configuration:
Code:

tv_grab_zz_sdjson_sqlite --configure

> enter the database name (and it's full path) so for me it was /home/hts/.xmltv/databasename.db
>Answer the rest of the questions (i think you have to choose which lineup up you want and something about MythTV categories)

Then enable the "internal XMLTV Multinational (schedules Direct JSON web services with SQLite DB) in TVheadend
Reply
#28
Thank you very much!

Got the SQLite grabber running and it works fantastically well - as a bit of a Linux novice I wasn't particularly clear on what I had to do but ASHG's really helped.

One thing I would quickly say is that this step

perl -MCPAN -e 'install Bundle::LWP'
sudo perl -MCPAN -e 'install LWP::UserAgent:: Determined

should actually be 

perl -MCPAN -e 'install Bundle::LWP'
sudo perl -MCPAN -e 'install LWP::UserAgent:Big Grinetermined'

just in case anyone is copying and pasting but really pleased with the result.
Reply
#29
Yeah i couldn't workout how to get rid of the smiley face! so i stuck a space in - probably should have said that!
Reply
#30
Hey guys, need to dig in here again.
I setup schedules direct with sql database without errors, fetching runs fine, but:

2018-07-13 11:58:54.379 xmltv: /usr/bin/tv_grab_zz_sdjson_sqlite: channels tot= 40 new= 40 mod= 40
2018-07-13 11:58:54.379 xmltv: /usr/bin/tv_grab_zz_sdjson_sqlite: brands tot= 0 new= 0 mod= 0
2018-07-13 11:58:54.379 xmltv: /usr/bin/tv_grab_zz_sdjson_sqlite: seasons tot= 0 new= 0 mod= 0
2018-07-13 11:58:54.379 xmltv: /usr/bin/tv_grab_zz_sdjson_sqlite: episodes tot= 0 new= 0 mod= 0
2018-07-13 11:58:54.379 xmltv: /usr/bin/tv_grab_zz_sdjson_sqlite: broadcasts tot= 0 new= 0 mod= 0

Tvheadend only parses the channels so I'm having no epg. Are there any specific settings I need to set to make tvh recognize the programm information?
Reply

Logout Mark Read Team Forum Stats Members Help
Schedules Direct Setup on Ubuntu Server1