Schedules Direct (1 Viewer)

njsteve

Portal Member
September 7, 2009
9
0
Home Country
United States of America United States of America
I just installed MediaPortal on my Windows 7 computer. I had it running with Schedules Direct on my old XP computer. I've forgotten how to get Schedules Direct incorporated as a plug-in. Can anyone help me, instruct me on how to do this? Thanks.
 

njsteve

Portal Member
September 7, 2009
9
0
Home Country
United States of America United States of America
Okay. Now I've got the Schedules Direct plug-in installed in the right place and I think that I configured it correctly. However, it's not working. What have I missed?
 

milhouse

Portal Pro
November 9, 2006
363
54
50
Raleigh, NC U.S.
Home Country
United States of America United States of America
How can you tell it's not working?

In general, I find the challenge is between matching the channels in MP that were found from a scan, and making them use the data that was downloaded by schedules direct.

I generally do this:
1) scan and name channels
2) set up username/password in schedules direct plugin, and check the boxes fro "add new channels" and "run on next startup"
3) stop/start TV server. This should force SD to update. Give it 5 mins or so.
4) (probably a better way for this, but what I do is) Use SQL Server to copy the external_id information from the recently added channels (from SD) to the original scanned channels. Then I delete the recently added channels.
5) Re-config the plug to NOT "add new channels" and re-enable "run on next startup"
6) stop/start TV Service to get the schedule data again
 

valdi

Portal Member
November 21, 2011
23
6
Toronto
Home Country
Canada Canada
Hello, My first post, certainly not the last one:) I've got mediaportal going with schedules direct over ATSC in canada. But my problem is with SD plugin not pulling down the right channel information. scan, re-scan delete rinse and repeat is not something I want to do with 60 channels of cable and 20 channels of OTA. I was wondering if anyone knew of a wiki page or forum post that could instruct me on how to change the station ID within MediaPortal/SD plugin via the SQL Database?

I just want to manually add my analog cable channels within TVserver Configuration program, do a scan, let SD pull whatever it's going to pull down and then enter the database (mptvdb?) and update the channel ID from SchedulesDirect website with the correct channel ID and then update the EPG data with a TVServer restart, and have the channels updated all at once (OTA and CABLE). My problem is I can't find the database to manipulate nor the program to open the database. I've tried sql lite and MySQL but have not be able to find the database to open.

Once I get this going, then I start working on IR Blasting for cable set top box channel changing (found all the wiki pages for this one). I know it's free and I love the tinkering, but having a hard time with the above item. Any suggestions or push in the proper direction (wiki, forum) would be greatly appreciated.

Thanx.


Yay.....I posted in frustration too soon literally, hours too soon . I opened the mptvdb with MySQL Workbench and opened a local instance of the channel table and found what I was looking for. I was confused with MySQL Workbench and how to open the database. I was assuming it was a single file with all the goodies(tables/fields etc) in one file ready to be edited. Not so....whoever finds this post concerning opening the mptvdb process for adjusting channel Id's manually for schedulesdirect feel free to use what I did below.

Within in MySQL Workspace - Edit Table Data....(lower right part of screen)
Stored Connection: Local Instance MySQL (located in dropdown box tab.
Password: MediaPortal (Case Specific)
Click Next
Schema: mptvdb
Table: channel
Click Finish
The editor opens up
field externalID is the number you want to change i.e.
17593.43.schedulesdirect.org - 17593 = schedulesdirect Id number found associated with the line-up you have already selected.
Lo and Behold it worked!!!

Love the program.
 
T

tomtj7964

Guest
I feel like this is so close to what I really need to get my SchedulesDirect EPG plugin to pick up one final station listing. I am quite at a loss when it comes to the SQL part though. It would be really great if somebody with this experience may be able to give me a push in the right direction. Like what do I even need to do to get the mptvdb table open. I don't even know what kind of tool I need, did it come with the MP install? If not where can I find one?
Where do I find the mptvdb? I wouldn't know a schema until it slugged me between the eyes. Specifics would help me out a lot.
This MP tool generally stretches me, which can be a good thing. In this case I am at quite loss in a maze of twisting passages, and leaning into the construcitive community I see modeled here.

Tony
 

valdi

Portal Member
November 21, 2011
23
6
Toronto
Home Country
Canada Canada
Hey Tony, I know how you feel, so close yet so far away. You read and read and pick up bits from here and there and try to put it all together.

Hope the more expanded how-to below helps you out.

The program you need (or what I used) is called MySQL Workbench.

Found here: http://www.mysql.com/downloads/workbench/
Download the following: mysql-workbench-gpl-5.2.38-win32.msi
It's the first program listed, install and then do a restart just for kicks.
I'm not sure, but I would turn off TV Server after the reboot just to be sure that the database is closed for editing.
After you have rebooted and turned off the TV Server, Open MySQL Workbench from the short-cut that was created. You will then brought to the following screen:

MySQL Workbench - Opening Screen.jpg

Within the MySQL Workbench screen your will see on the lower left hand area of window "Edit Table Data" Click on that command and you will be shown the following screen:

MySQL Workbench - Local Connection.jpg

Now, the "Stored Connection" Combo Box will be blank when the screen opens, so the first thing you will do is access the already existing
"Local Instance MySQL" by selecting it in the topmost combo box. Next it's password time, you will 1) Click on "Store in Vault" to access the password prompt text box. 2) Enter the password - "MediaPortal" it is case specific and will only have to be entered once. Next time you want to enter the database your password has been "Stored in the Vault"

MySQL Workbench - Password.jpg

Click Next to get to the following screen

MySQL Workbench - Table Selection.jpg

When you installed MediaPortal a database was created named "mptvdb"

1) When you first open the 'Table Selection Window seen above, under the first combo box "Schema:" you will see "information schema" change it to "mptvdb"

2) Change the "Table:" Combo Box to "channel"

3) Click Finish

Next is the edit database screen seen below:

MySQL Workbench - Edit Selection.jpg

Here's the time consuming part: The red arrow is pointing to a column called: "externalID" Here is where the SchedulesDirect plugin gets it information on which channel to pull for your channel line up in your epg. In my case, I'm using Schedules Direct for Set top Box Cable and Over the Air HD. I ensure my schedules direct account has the aapropriate line-up selected from the SchedulesDirect website. as seen below:

schedulesDirect Edit.jpg

Click on edit and you will be taken to your line-up where you can get the first 5 numbers of the channel id needed. See Below:

SchedulesDirect - Channel ID.jpg

If you hover your mouse over the particulair channel your interested in the channel id will appear, write that number down.
You can also click on "Report in the previous image to get a columned listing with all the channel ids.

Now that you have the channel id you need, go back to the MySQL Workbench "channel" table that you have previously opened and edit the channel thats giving you problems.
11182.30.schedulesdirect.org
The externalId format is as follows: XXXXXX.00.schedulesdirect.org
XXXXX = channelID from Schedulesdirect Website
00 = channel number from Schedulesdirect Website

After you have entered the correct channel ID for all the channels that are incorrect. Click on "Apply" In the lower right-hand side of the edit tables screen and close up MySQL Workbench.

open up your TV Server Configuration and access your schedules direct plugin configuration screen and click on the check box that will force update of your channel guide on next TV Server restart.

TV Server Config - Force Update SD Plugin.jpg

Restart the service under Manual Control and give it 10 min or so and bingo, Bob's your Uncle, or Shirley's your Aunt. Whatever it works.

Remember, Open Source needs Community Support - Pay It Forward.

Let me know if it worked or if you have any other questions or changes we can make to this post, HAPPY to help. Amazing program.

S
 

Attachments

  • MySQL Workbench - Set Parameters Screen.jpg
    MySQL Workbench - Set Parameters Screen.jpg
    52 KB

STEVENJ

Portal Pro
September 7, 2009
66
0
Home Country
United States of America United States of America
I had an extended e-mail conversation with Geoff regarding getting this SchedulesDirect plug-in to work with Media Portal. I'm still having problems with this. However it may be helpful for others to see this conversation:

On Mar 17, 2012 4:04 PM, "njsteve" wrote:

I've now got Schedules Direct installed but there's no
data for any of the channels. Further, the channels appear in no
discernable order (neither numerical or alphabetical). I'm in the U.S.
(Philadelphia market) and a Schedules Direct subscriber.

On March 17, 2012 4:21 PM Geoff Stewart wrote:

do you have the plunging enabled?
if its enabled, do you have it setup to create channels for you?
when you start mediaportal, the log has some info to help figure out what's happening
takes a while to download data
as for the order.... in the mediaportal client config, there is a checkbox about order...play with that.. it defaults to some weird order
good luck

On Mar 17, 2012 5:10 PM, "Steven Apel" wrote:
Dear Geoff:

Thanks for replying to me so quickly.

I've managed to get the channel order sorted out. Also have gotten the channels re-labeled for their appearance in the TV Guide. However, I still don't have updated program listings. You mention "plunging" but I have no idea what you're talking about. Usually if I don't know the software intimately I can hack my way around it and learn. But for this I'm stumped. Can you outline the steps that I need to take to get guide data?

Steve

On Saturday, March 17, 2012 6:49 PM Geoff Stewart wrote:

plunging is auto correct on my phone ;) meant plugin ...
start mediaportal server
take a look at tv.log
it will give you some insight...
send me a copy if you like
g

On Mar 18, 2012 3:27 PM, "Steven Apel" wrote:
Dear Geoff:

The problem appears to be that the schedule never updates. In Schedule Direct under advanced options, even though I check the box for "force guide update on TV service startup", the checkmark keeps getting dropped. Consequently, the guide never updates. Have you any idea how to fix this?

Steve
On Sunday, March 18, 2012 3:43 PM Geoff Stewart wrote:
the checkbox only lasts one restart and then it gets cleared by the plugin
i can't help without the log... tv.log
g

On Mar 18, 2012 4:15 PM, "Steven Apel"wrote:
Where do I find the log to send you?
On Sunday, March 18, 2012 4:21 PM Geoff Stewart wrote:
at the top left of the server config tool is a button that says log files or something like that.... send the newest tv.log file.....
On Sunday, March 18, 2012 6:43 PM Geoff Stewart wrote:
Hey Steve,

Looks in the log like the TV server cannot connect to your database.... do you have it configured for MySQL or SqlServer?

Is the database running?

Here's the log message I mean:
2012-03-18 15:18:27.909528 [MPMain(1)]: BusinessLayer: GetProgramsForAllChannels caused an Exception - Table '.\mptvdb\program' is marked as crashed and should be repaired, at MySql.Data.MySqlClient.MySqlStream.OpenPacket()
at MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64& affectedRows, Int64& lastInsertId)
at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet()
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at TvDatabase.TvBusinessLayer.GetProgramsForAllChannels(DateTime startTime, DateTime endTime, List`1 channelList)
2012-03-18 15:18:27.915528 [MPMain(1)]: RemoteControl - Connected


Forget the marked as crashed.... it's the openpacket() call failing that means that it cannot connect to your database....

Oh, I guess it thinks it's MySQL by the log as I look at it again...

g
On 19 March 2012 09:31, Steven Apelwrote:
Geoff:

Thanks for looking over the log.

I don't know the answers to either of your questions. Perhaps you can guide me through doing whatever is needed to get this working.

Steve
On Monday, March 19, 2012 10:10 AM Geoff Stewart wrote:
Sure thing.

The MP tv server needs a database. Looks like you are using MySQL database. Can you confirm that MySQL is running?

If you don't see mysql installed, then that's a problem :)

First, just try and confirm that you have a database installed.

If it's installed, then right-click on my computer->Manage->Services
Look for MySQL service and confirm that it is running.

If that's good, then launch the MySQL client software that should have been installed when MP installed mysql

To do so, you probably just need to look in your start menu for a MySQL folder (MySQL Server 5.1) or something like that.... the default setup when you install MediaPortal is to install MySQL with the user name: root with password MediaPortal (case-sensitive)

Launch the command-line client... it will prompt you just for a password (assumes a user root)... enter MediaPortal

If you can connect, then you have MySQL running... good.

Now, we need to confirm that the mediaportal database is installed.

type the following in the command-line client:

connect mptvdb

If it says connection id: <something> with current database: mptvdb, then it worked... otherwise it did not.

Let me know how it goes.

Cheers.

Geoff
On 19 March 2012 10:42, Steven Apel wrote:

Geoff:

Okay, I've confirmed I have MySQL installed and running. I also have a MySQL Server 5.1 folder. Now comes the roadblock. I can not find a "command-line" client in this folder. Going to the DOS command line (which I don't think you mean) gives me only an un-prompted space in which to type. So you see, I can't get beyond this point.

Is something really fouled up on this new computer (which runs Windows 7) or am I missing the bloody obvious?

Steve
On 19 March 2012 10:44, Geoff Stewartwrote:

The command line client is in the start menu.... start->MySQL Server 5.1->command-line client (or something to that effect)

see if you can see it there.

g


On 19 March 2012 12:18, Steven Apel wrote:
Geoff:

I've done what you've said. I've also waited some time and still no new schedule data. Do I need to do all things in my SQL workbench as described in the forum in order to make this work or is there something else that I'm missing?



 

geoffstewart

MP Donator
  • Premium Supporter
  • October 12, 2008
    346
    112
    Ottawa
    Home Country
    Canada Canada
    Hey Steve,

    Thanks for moving our conversation to the forum.

    If you check the box for Force schedule update on TvService restart, and look at your tv.log again, that would help. Post it here so others can see it. If you still get the same error (or similar) that shows the MySQL client having difficulty connecting to the MySQL database, then we still have work to do in this respect.

    You've shown that the database is installed.

    I think you've shown that you can connect to the mptvdb database with the command-line utility ... can you confirm this statement, please?

    If so, it means that perhaps the MP TvService configuration is messed up as it is not able to connect to the database. In that case, can you please post a file called Gentle.config in the following directory:

    C:\ProgramData\Team MediaPortal\MediaPortal TV Server\

    This contains the config that MP TV Server uses to connect to the database.

    Cheers.

    Geoff
     

    valdi

    Portal Member
    November 21, 2011
    23
    6
    Toronto
    Home Country
    Canada Canada
    MySQL Workbench is a Graphical User Interface. Using a command-line editor is the same thing but a little trickier since you have to know all the commands. I use Workbench because I'm lazy.

    I had a problem with my SD Plugin not updating itself, so I checked "Always try to fill holes" and "Always try to update existing entries" under the "DVB EPG" tab within TV SERVER Configuration. It then filled all my holes (no pun intended), quite nicely.

    S

    I'll shut up now.
     

    STEVENJ

    Portal Pro
    September 7, 2009
    66
    0
    Home Country
    United States of America United States of America
    Geoff:

    Yes, I seem to be able to connect to the mptvdb database with the command-line utility.

    The log file is attached.

    I can't find the gentle.config file in the location you list. Is its missing status the root of my problem?
     

    Users who are viewing this thread

    Top Bottom