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.
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:
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:
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
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:
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.