new plugin for changing channels (DirecTV w/serial port) (2 Viewers)

patrick

Portal Pro
April 20, 2005
608
45
Southeast
Home Country
United States of America United States of America
Not sure what to make of this. If anyone else can offer advise, please jump in.

Hi natrlhy,

You are getting an exception trying to parse a string to a number.

You can tell where to look here:
Code:
at DirecTV.TunerPlugin.TunerPlugin.OnThreadMessage(GUIMessage message)

I downloaded the "DirecTV_new_09082006.zip" and that looks like it
is in TunerPlugin.cs about line 59
Code:
channelNumber = Convert.ToInt32(message.Label);

Putting the code in a try{} catch{} block will prevent the exception
and adding a log output in the catch{} you could write out the
message.Label string to see what it is and why it is causing an error.

spachti, is the external channel set correctly in the MP configuration?


HTH,
patrick
 

spachti

Portal Pro
July 27, 2005
374
100
Bible Belt
Home Country
United States of America United States of America
Hi Patrick,

thanks for trying to help.
First, i've set up the external channels as described in the postings. I hope, i've got this right.
Second, since it's working perfectely with DTVControl, i've installed a serial monitor watcher program. As soon as i start DTV, data are streaming back and forth between Com 1 and the HTL. When i open MP, nothing. Nothing when i try to change channels either. But i can't open DTV, while MP is running, so MP seems to open Com 1 but that's already it.
 

natrlhy

Retired Team Member
  • Premium Supporter
  • August 2, 2006
    324
    0
    Bay Area, CA
    Home Country
    United States of America United States of America
    Not sure what to make of this. If anyone else can offer advise, please jump in.

    Hi natrlhy,

    You are getting an exception trying to parse a string to a number.

    You can tell where to look here:
    Code:
    at DirecTV.TunerPlugin.TunerPlugin.OnThreadMessage(GUIMessage message)

    I downloaded the "DirecTV_new_09082006.zip" and that looks like it
    is in TunerPlugin.cs about line 59
    Code:
    channelNumber = Convert.ToInt32(message.Label);

    Putting the code in a try{} catch{} block will prevent the exception
    and adding a log output in the catch{} you could write out the
    message.Label string to see what it is and why it is causing an error.

    spachti, is the external channel set correctly in the MP configuration?


    HTH,
    patrick

    I'm not a coder by far :) So a lot of what you mentioned doesn't make too much sense to me. I have the code up and I see where you are talking about but I don't want to break the plugin :)
     

    patrick

    Portal Pro
    April 20, 2005
    608
    45
    Southeast
    Home Country
    United States of America United States of America
    I'm not a coder by far :) So a lot of what you mentioned doesn't make too much sense to me. I have the code up and I see where you are talking about but I don't want to break the plugin :)

    NP :)

    No promises this will work I compiled it against an old SVN copy I
    had from the last stable release since the zip was 09/08/2006.

    here is the code I changed:
    Code:
            int channelNumber = 0;
            try
            {
               channelNumber = Convert.ToInt32(message.Label);
            }
            catch
            {
               Log.Write("DirecTV tuner plugin error parsing channel: {0}", message.Label);
            }

    Post you log and maybe it will show what the problem is.

    HTH,
    patrick
     

    spachti

    Portal Pro
    July 27, 2005
    374
    100
    Bible Belt
    Home Country
    United States of America United States of America
    Hi Patrick,

    i still feel like a dummy, LOL.
    Here is the error.log in MP

    2007-01-24 19:00:06.468750 [ERROR][MPMain]: Exception: System.InvalidOperationException: Unable to send command to DirecTV box
    at DirecTV.SerialInterface.SendCommand(Command cmd, Byte[]& receivedData)
    at DirecTV.SerialInterface.SendCommand(Command cmd)
    at DirecTV.SerialInterface.TuneWithSetChannel(Int32 channel)
    at DirecTV.SerialInterface.TuneToChannel(Int32 channel)
    at DirecTV.TunerPlugin.TunerPlugin.OnThreadMessage(GUIMessage message)
    at MediaPortal.GUI.Library.SendMessageHandler.Invoke(GUIMessage message)
    at MediaPortal.GUI.Library.GUIWindowManager.SendMessage(GUIMessage message)
    2007-01-24 19:00:23.687500 [ERROR][MPMain]: Exception: System.InvalidOperationException: Unable to send command to DirecTV box
    at DirecTV.SerialInterface.SendCommand(Command cmd, Byte[]& receivedData)
    at DirecTV.SerialInterface.SendCommand(Command cmd)
    at DirecTV.SerialInterface.TuneWithSetChannel(Int32 channel)
    at DirecTV.SerialInterface.TuneToChannel(Int32 channel)
    at DirecTV.TunerPlugin.TunerPlugin.OnThreadMessage(GUIMessage message)
    at MediaPortal.GUI.Library.SendMessageHandler.Invoke(GUIMessage message)
    at MediaPortal.GUI.Library.GUIWindowManager.SendMessage(GUIMessage message)
    2007-01-24 19:00:25.906250 [ERROR][MPMain]: Exception: System.InvalidOperationException: Unable to send command to DirecTV box
    at DirecTV.SerialInterface.SendCommand(Command cmd, Byte[]& receivedData)
    at DirecTV.SerialInterface.SendCommand(Command cmd)
    at DirecTV.SerialInterface.TuneWithSetChannel(Int32 channel)
    at DirecTV.SerialInterface.TuneToChannel(Int32 channel)
    at DirecTV.TunerPlugin.TunerPlugin.OnThreadMessage(GUIMessage message)
    at MediaPortal.GUI.Library.SendMessageHandler.Invoke(GUIMessage message)
    at MediaPortal.GUI.Library.GUIWindowManager.SendMessage(GUIMessage message)



    Let me know, when you need anything else.
    THANKS


    Edit:
    I've tried to change channels.
     

    patrick

    Portal Pro
    April 20, 2005
    608
    45
    Southeast
    Home Country
    United States of America United States of America
    Here is the error.log in MP

    2007-01-24 19:00:06.468750 [ERROR][MPMain]: Exception: System.InvalidOperationException: Unable to send command to DirecTV box
    at DirecTV.SerialInterface.SendCommand(Command cmd, Byte[]& receivedData)
    at DirecTV.SerialInterface.SendCommand(Command cmd)
    at DirecTV.SerialInterface.TuneWithSetChannel(Int32 channel)
    at DirecTV.SerialInterface.TuneToChannel(Int32 channel)
    at DirecTV.TunerPlugin.TunerPlugin.OnThreadMessage(GUIMessage message)

    Is there anything above\below this in the log.
    looking for lines have "DirecTV tuner plugin error parsing channel:"

    P.S. you can paste entire logs here: http://pastebin.team-mediaportal.com/

    patrick
     

    patrick

    Portal Pro
    April 20, 2005
    608
    45
    Southeast
    Home Country
    United States of America United States of America
    i am the dummy here, ok?

    Once again, thanks for looking into that. I've posted the log here:
    http://pastebin.team-mediaportal.com/11868

    Don't worry, it just all gets confusing.
    I know how it goes when the WAF starts dropping ;)

    The problem is it looks like the external channel is attempting to tune odd data/numbers.
    Code:
    DirecTV tuner plugin error parsing channel: 3-2
    DirecTV tuner plugin error parsing channel: 9-1

    Are those channels 32 / 91 or a major 3 minor 2/ major 9 minor 1?

    The plugin is looking for a normal number like 32 or 91.

    Natrlhy is the expert on digital channels so he will be more help than me,
    but if major/minor but shouldn't it tune the real broadcast channel?
    (I do not have digital)

    patrick
     

    Users who are viewing this thread

    Top Bottom