[WiP] MediaPortal DiseqC Motor Code Patch (1 Viewer)


MP Donator
  • Premium Supporter
  • March 19, 2009
    Greece Greece

    This patch is meant only for users that are having a motorized setup and are having issues with it. If your tuner cannot move the motor this patch will not fix this issue, if your card is incompatible with Media Portal then this patch is also not for you. Use at your own risk!

    Patch is based on 1.15 master with the HEVC changes included. Should also work under 1.15 Final.

    Hi everyone,

    We have modified the DiseqC Motor Code to add dynamic delays during channel switching that are located on different satellites.

    • The issue with current code is that it will always add a static delay of 200ms per motor movement before sending out a "Tune" command. As a result many tuner cards will either time out while trying to "LockOn" a signal or will "LockOn" a similar frequency on a wrong satellite while the dish is still not done with reaching the proper position.

    • Ideally we would want to delay the "Tune" command based on the difference between the two satellites and this way solve the issue that some tuner cards are having.

    • This patch will:

    1.Calculate the delay needed based on "Current" satellite position and "Next" satellite position and will apply it. This will delay the "Tune" command and hopefully solve the "No Signal", "No PMT Found" errors that we are getting with a motorized setup.

    2. It will also add a static delay during 1st tune ONLY, the reason for that is to avoid issues during our 1st tune since MP is unaware of our current position after a TV Service Restart/ PC Restart.

    • The patch consists of 3 files: dish.xml, TVLibrary.dll and TVLibrary.pdb. These are the steps you have to follow in order to install the patch.

    1. Prior to installing the patch u have to find out which satellite corresponds to which position.

    (A)If this is your initial setup, Media Portal will report the position a satellite is stored to each time u press the "Store Position" button in the DiseqC Motor Tab, take note of these positions.

    (B) If you already have all your positions setup and you don’t know which position corresponds to which satellite then you will have to manually move the dish to this satellite by selecting the satellite from the satellite drop down list and then instruct Media Portal to move the dish to this satellite by using the "Goto" button, when the movement is initiated Media Portal will report which position the current satellite corresponds to. You will have to repeat this for every satellite you have stored in your current MP setup.

    It is very important that you take notes of these positions as you will need to use them later in order to fill in values in the dish.xml file. If your positions are wrong then the delays will be off and the patch won’t apply proper delays.

    2. Next you will have to fill in dish.xml with corresponding satellites and their positions. In order to properly fill in all the data that the patch requires you will also need to know how fast can your dish move, this information generally comes available with the motor manual, in my case the motor specifications report that the dish can move 1.9 degrees / second @ 12 volts and 2.5 degrees / second @ 18 volts, we only need the data for motor speed @ 12 volts. Knowing the motor speed @ 12 volts and the satellite positions will allow us to fill in dish.xml

    Taking a look at dish.xml you will see an entry for "SatCount", here you will have to specify how many satellites in total you have stored in Media Portal, in my case i got 2 so the final result will look like this:

    <section name="SatCount">

    <entry name="Count">2</entry>

    Next you will see an entry for "CurrentMovingDish", here you will have to specify how much time (in milliseconds) your motor needs to move 1 degree (you will have to calculate this based on the motor speed reported by your motor manufacturer). In my case it is 526ms and it will look like this:

    <entry name="CurrentMovingDish">526</entry>

    Next you will have to set a default delay (which is static and should be in milliseconds) for your 1st tune after a TV Sever/ PC restart, generally i suggest using a value of around 10 seconds, but you can experiment with this one, keep in mind that this delay will be always present ONLY during your 1st tune, so if all your satellites are close to each other and you know that moving from one end of the ark to the other will never take more than 10 seconds then you can lower this value to get a faster 1st tune. In my case i use 10000ms

    <entry name="FirstTuneWait">10000</entry>

    And finally you will have to input which position corresponds to which satellite, you also have to specify if the satellite is located West or East. Again an example of my own setup:

    <section name="1">

    <entry name="PositionDiSEqC">1</entry>

    <entry name="PositionSat">19.2</entry>

    <entry name="PositionDirection">E</entry>


    <section name="2">

    <entry name="PositionDiSEqC">2</entry>

    <entry name="PositionSat">8</entry>

    <entry name="PositionDirection">W</entry>


    3. When you are done with dish.xml and prior to installing the files have to stop TV Service and close Media Portal, and as !!always!! take back up of your current TVLibrary.dll, when this is done you can proceed:

    (A) Copy dish.xml to C:\ProgramData\Team MediaPortal\MediaPortal TV Server

    (B) Copy TVLibrary.dll and TVLibrary.pdb to C:\Program Files (x86)\Team MediaPortal\MediaPortal TV Server (overwrite existing).

    4. Startup TV Service and proceed with testing :)

    If something is not working for you, double check your dish.xml configuration and make sure to post logs.

    A BIG thanx goes to @Sebastiii for his coding work and time and to @mm1352000 for his valuable information and insights.


    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    G Update von MediaPortal Installationsprobleme? 0
    ajs [News] MediaPortal 1 - 1.25 Released! News and Announcements 1
    horned_reaper Standby is prevented by MediaPortal client General Support 0
    U [solved] MediaPortal crashing on startup General Support 10
    g0rsq Info box randomly popping up when watching TV or other video MediaPortal 2 Newcomers Forum 1
    high [unanswered] Hallo möchte gerne Mediaportal. nutzen kann mich jemand anrufen? contactform feedback and requests 2
    ajs [News] MediaPortal 1.25 Pre-Release ready for testing! News and Announcements 0
    ajs [Rejected] Mediaportal Codename MediaPortal 1 41
    M 2nd (Touch-)Display Support on MediaPortal 2 such MPDisplay++? General 2
    N Steam release of MediaPortal MediaPortal 1 Talk 0
    torone Dritter versuch mit Mediaportal 2 Allgemeines Support- und Diskussionsforum 1
    M Fehlerhafter Link auf der aktuellen MediaPortal Seite Page- und Forumsfeedback 0
    H 1.24.0 MP 1.24 high CPU utilization when 'Keep MediaPortal always on top' option enabled Bugreports 4
    mickb [solved] Mediaportal Stops working General Support 5
    J [solved] Newbie to MediaPortal 2 - Cannot open/run TV programs Newcomers Forum 4
    atlantic How to use Spotify inside Mediaportal? Listen Music 18
    horned_reaper MediaPortal configuration error log message General Support 1
    Rob Hexenmeister Mediaportal Properties #plot etc... General Support 3
    ajs [News] MediaPortal 1 - 1.24 Released! News and Announcements 3
    S [solved] access the desktop without leaving mediaportal General Support 5
    J New computer with win10 and how will i set Mediaportal up ? Newcomers Forum 55
    T MediaPortal Extensions Manager Fehlermeldung bei Installation einer Erweiterung Installationsprobleme? 1
    geotwticher TV Guide EPG Grabber for Australia 2020 RIP freepg.tv General 4
    azzuro [News] MediaPortal 1.24 Pre-Release ready for testing! News and Announcements 0
    M.Hulot Warum Blu-ray-Menü nicht anwendbar bei MediaPortal? Allgemeines Supportforum 5
    Similar threads

    Top Bottom