programatic way to change channels on MP 1.15 client? (1 Viewer)

gpnash

Portal Pro
March 2, 2015
70
16
65
Linden, Michigan
Home Country
United States of America United States of America
Is there an API available or a program I can invoke that will cause the MP1.15 client to change channels? I don't mind writing a vb.net form or command line application if I need to, I'm a little leary of trying to write a plugin. I'm not trying for anything fancy just a better way than forcing keystrokes across processes. If I'm implementing this it will end up being a asp.net web page for windows 10 IIS running on the media portal client machine that would allow whomever connected to it to change the channel. My MP15 client/server machine has my 60" Samsung as it's console so this would allow me to easily change channels using my windows tablet. Throw me a bone and give me a month I'll post the results.
 

gpnash

Portal Pro
March 2, 2015
70
16
65
Linden, Michigan
Home Country
United States of America United States of America
I looked at that once and that's what started me down my own path. the Mpextended/ and wifiplugin were way heavier than I wanted to be on the server side.
Will a windows 7 phone app run on windows 10? my client will is a windows surface 3 4g lte running windows 10. again all I need to do is change the channel.
My hope for something simple that will allow me to incorporate it into an app that will switch channels to a programmed guide. for instance turn on channel 7 at 8pm, change to channel 159 at 9pm and after 10 pm tune in SYFY HD, but it all starts with being able to change the clients MP channel programmatically.
 

gpnash

Portal Pro
March 2, 2015
70
16
65
Linden, Michigan
Home Country
United States of America United States of America
ok... So I found out that using the TvControl.dll I can change the channel that's showing on my media portal client attached to the tv.
Doesn't look like it's consistent however. it appears that using TvControl.Tune changes the channel but the mp1.15 client's stream is interrupted in a way that the client doesn't like or handle. The client video ends up frozen on the last frame before the channel change.
 

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    but the mp1.15 client's stream is interrupted
    This shouldn't happen unless:
    1. ...you don't have enough tuners to serve all users/clients, OR...
    2. ...the parameters you're passing to tune() (in particular: the user name) are wrong and that's causing the other client's stream to be hijacked, OR...
    3. ...there's some kind of tuner/setup-specific issue going on.
    Re. #1: even if that is happening, the client which is interrupted should receive a notification.

    Log files and a step-by-step listing of your test scenario will be required if you'd like us to try to provide further insight.
     

    gpnash

    Portal Pro
    March 2, 2015
    70
    16
    65
    Linden, Michigan
    Home Country
    United States of America United States of America
    I'm using a ceton eth6 so I have 6 available tuners.
    Double checked to make sure I had the correct user structure at the time of the tune call.
    Wouldn't surprise me if I'm not setting something up correctly.

    Started up the mediaportal client and tuned to 746 TNT HD, left the client screen on the titan tv screen (buttons on left livetv on right)

    on my tablet ran my program and selected 741 FX HD saw the mpclient change guide information and video
    selected 734 fox news saw the mpclient change guide information but video from fx hd was still playing
    selected 744 tvland saw the mpclient change guide information but the video locked

    used my remote to exit the mediaportal client and collected the log information
    waited about two minutes before making any channel changes... (right with time dilation I hoped I waited long enough; didn't really time it)

    I did see an error noting a possible race condition in the mediaportal server error log.

    OMG... they were there before I did my first edit.... The id10T error will be fixed in a minute. :)
    There's an issue with the forum upload file procedure and windows 10 edge.... switched back to IE and it worked they way it should.

    Code:
                       Dim MyChannels = AllChannels.Where(Function(ach) ach.GroupNames.Contains("GuysChannels"))
                        For Each channel In MyChannels
                            Dim programInfo As String = String.Empty
                            Dim it As ListViewItem = New ListViewItem("")
                            it.Tag = channel

    Code:
                        Dim selectChannel As TvDatabase.Channel = myitem.Tag
                        Dim tuningDetail As TvDatabase.TuningDetail = selectChannel.ReferringTuningDetail(0)
                        Dim myChannel As TvLibrary.Channels.ATSCChannel = New TvLibrary.Channels.ATSCChannel()
                        myChannel.FreeToAir = tuningDetail.FreeToAir
                        myChannel.Frequency = tuningDetail.Frequency
                        myChannel.IsRadio = tuningDetail.IsRadio
                        myChannel.IsTv = tuningDetail.IsTv
                        myChannel.MajorChannel = tuningDetail.MajorChannel
                        myChannel.MinorChannel = tuningDetail.MinorChannel
                        myChannel.Name = tuningDetail.Name
                        myChannel.NetworkId = tuningDetail.NetworkId
                        myChannel.PmtPid = tuningDetail.PmtPid
                        myChannel.Provider = tuningDetail.Provider
                        myChannel.ServiceId = tuningDetail.ServiceId
                        myChannel.TransportId = tuningDetail.TransportId
                        Dim TuneUser As IUser = myTvUser
                        Dim myResult As TvResult = _TvControl.Tune(TuneUser, myChannel, selectChannel.IdChannel)
     
    Last edited:

    gpnash

    Portal Pro
    March 2, 2015
    70
    16
    65
    Linden, Michigan
    Home Country
    United States of America United States of America
    you wouldn't happen to know the name of the code file for the mytvguide (window 600)? I want to localize the spin date.

    I finally figured out Microsoft edge doesn't get along with the forum update a file control. uploaded my logs using Ie attached to the code post.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand

    Users who are viewing this thread

    Top Bottom