Rotor(Motor) Support Latest Information.
Added by Gary Brown over 10 years ago
PLEASE READ ALL OF THIS POST AND THEN BEFORE POSTING HERE AND DON'T EMAIL ME
CURRENT STATUS OF ROTOR SUPPORT: Working since commit from 4th August 2014 version 3.9.1139 and later but stopped for me after an update from git (not sure which update as was doing it remotely for parents)
OPENELEC's version of tvheadend is behind this commit. please let them know you want it updating before attempting this on that OS.
MY SETUP:
OS:Ubuntu Server 14.04.1 LTS (GNU/Linux 3.13.0-32-generic x86_64)
Tvheadend: v3.9.1499
dvb-s card: Mystique SaTiX-S2 Sky PCI (http://www.amazon.co.uk/Mystique-SaTiX-S2-Sky-PCI-DiseqC/dp/B005IFWDIY)
rotor: Alsat Superior Dark Motor
dish: Alsat 1m mesh dish
GUIDE (needs an update for recent master:
1.first set some networks and give them names ( I use individual satellites but you could add more and do it by providers if you wanted to)
2.in tv adaptors, in your card select advanced for satconf
3.in advanced enter your amount of satellites you want to receive in orbital positions.
4.for each orbital position you enable usals by selecting it in the rotor drop down box.
5.fill in the data in that new page.
0.8w
18w
13e Hotbird
POINTERS:
positive numbers for east and negative for west.
Don't Rely on GPS or Google for your site latitude or longitude use the values from your receiver or older program. (compare mine to to Sunderland, England SR4 and see the difference in mine.)
Rate:
in the Rate Column it needs a value of ms per each .1 of a degree. the text needs fixing to say that. I have the following rotor http://www.amazon.co.uk/SUPREME-MOTOR-METAL-DiSEqC-USALS/dp/B005THZL30/ref=pd_sxp_grid_i_0_1
it runs at Max. Speed: 1.9 / sec (at 13V) ; 2.5 / sec (at 18V) by the specs and manual.
tvheadend sets to 18v so 2.5 degrees each second.
1 / 25 = 0.4 seconds per degree multiplied by 1000 to change to miliseconds giving me a value of 400 to use in rate and it's perfect. when I wrote the code I made sure it always rounds up the result to seconds to allow extra time for the rotor to settle.
If you leave Rate empty or 0 it will wait 120 seconds between each move.
ANY QUESTIONS PLEASE ASK IN THIS THREAD AND PLEASE ANSWER THESE QUESTIONS TO SPEED UP HELP.
what version/build of tvheadend are you using? (look in the about section and paste the bold top line ie. "HTS Tvheadend 3.9.1499~g97999e4")
on what system is tvheadend running? linux pc 32bit or 64bit or other (nas/openelec etc)
what is your tuner card?
what is the rotor your using?
what is the rate set at?
PEOPLES QUESTIONS
if I use the latest stable Openelec version and tvheadend from it will I have the proper versions?
I've just asked in there IRC chat room and was told they are running version 3.9.1083 you need at least version 3.9.1139 have a look at the following link if your brave enough to update it yourself.
http://openelec.tv/forum/79-tvheadend/67708-update-to-newest-tvheadend
I also have a cline I use from a friend. Can you please help me how to configure tvh and oscam to use the cline I have?
Please ask questions about OSCAM in Descrambling section as This thread is for the rotor only.
I'm also not sure how to scan for all the channels on a sat by following your guide.
once you have configured the information above you do it the same way as normal (Pre-defined Muxes in Networks or by adding the muxes individually making sure to choose the correct network when it asks for it)
What OSCam am I Using
it's irrelavent but OSCam r9792 but please note If people are trying to use an encrypted channel then the problem may not be with the rotor but your oscam setup. please check with unencrypted channels to see if the rotor is the problem.
Replies (140)
RE: Rotor(Motor) Support Latest Information. - Added by Amine Bizid over 10 years ago
Hello,
Yesterday i tried the second Gary's work around and you can find hereafter steps and conclusions:
My Config:
- Laptop Sony Vaio VGN-Z51WG Intel Core 2 Duo 6 GB RAM NVIDIA 9800M GS (256MB)
- Sat reciever TT 4600 S2 USB
- Ubuntu 14.04 TLS x86_64 with kernel 3.13.0-24-generic
- Tvheadend 3.9.700-gecdda48-trusty
- XBMC 13
- OSCAM 1.20
- Dish with 2 Lnb bloc (A:13.0 B:19.2)
- Rotor Sat Horizon Diseqc 1.2
- Settop box: Samsat STI 7111 (dreambox clone) running PKTeam sh4 enigma 2.
Before starting the test, my Tvheadend was configured to use 2 LNB Switch where LNB0 set for 19.2E and LNB1 set for 13.0E. All worked fine but some transponders (muxes) on Hotbird (13.0E) had poor SNR. This is why i need to configure my tvheadend to use my Rotor and only LNB0 (B).
Test1:
I Stopped tvheadend, unplugged the coaxial cable and plug it in my Samsat. configured my samsat in usals mode with two satellites (Astra 19.2 and Hotbird 13.0), tuned manually my dish to get the best signal for both satellites Then I replugged the coaxial on my TT 4600 and restart Tvheadend.
I left all configured muxes and services in my config and set SatConfig in advanced mode. I typed 2 in Orbital Poistions text box then save.
In both new nodes appeared in the left tree under advanced node, I called the first Astra and the second HotBird.
Astra:
Enabled: Checked
NetWork: CanalSat
LNB Type: Universal
Switch Type: None
Rotor Type: USALS
UniCable Type: NoneRotor: USALS:
Site Latitude: 49.03 (Google Maps)
Site Longitude: 2.13 (Google Maps)
Satellite Longitude: 19.2
Rate: 0
HotBird:
Enabled: Checked
NetWork: Sky Italia
LNB Type: Universal
Switch Type: None
Rotor Type: USALS
UniCable Type: NoneRotor: USALS:
Site Latitude: 49.03
Site Longitude: 2.13
Satellite Longitude: 13.0
Rate: 0
I selected a channel in XBMC and I saw my rotor rotating to good position but I can’t get video. I tried another channel on another sat and get the same problem.
I switchad back to my Samsat -> All is Ok on both satellites.
Test2:
I deleted all .hts directory, dpkg-reconfigure tvheadend, configured both sats as USALS and as saied Gary, no muxes are found and init scan fails 2 or 3 minutes after it start.
So it does not work.
I wonder if enigma2 is able to tune the rotor (1° or 2°) after moving it and this is why it works on enigma and not on tvheadend.
Tonight, I’ll try to use szap and w_scan to see if using detected usals position by tvheadend are correct or not.
PS:
A trick I found to force the scan: In Network tab, edit the network to scan, reselect the mux (Astra 19.2 for example) the save.
RE: Rotor(Motor) Support Latest Information. - Added by Liam H over 10 years ago
Similar problems here too.
Used various builds including 3.9.721, 3.9.743 and currently 3.9.748 with a TBS 6922 and a TBS 6981 dual tuner.
When set up to use USALS on the 6922 the motor will happily turn the dish to the desired position but its behaviour when scanning is bizarre. I've found that if I turn the motor to 19.2°E and ask it to scan the tps that are expected at that location it will simply fail citing 'initial scan no data, failed'.
When I edit the network and tell it to look for the tps from 28.2°E (whilst still pointed at 19 - some of the transponders have similar params) however, it goes crazy. The scan takes ages and many of the tps give the same failed message.
But a considerable number of services are logged but they are mostly duplicates and list service names of services from other transponders on 19.2°E. As an example several of the services listed were names 'RTL Television' despite non of them being at the correct frequency. A scan of the correct frequency yielded no results.
A straight scan of the same sat with the transponders of 19.2°E (and 28.2°E for that matter) but with Single LNB (no rotor) in play scans the satellite perfectly.
Had similar bizarre duplication and failed scans from 13.0°E and 0.8°W
Unfortunately my TBS 6981 attached to outputs from a standard Sky dish also seems unusable at the moment. Not sure whether the problem is related or an entirely different issue right now however.
Liam
RE: Rotor(Motor) Support Latest Information. - Added by Gary Brown over 10 years ago
Liam Your describing the problem as i see it. it falls down to the initial scan code not waiting for the rotor to move and because of how its written never returns back to finish off the tuning for each mux meaning it will say it's tuned into one but it's still tuned into the last mux you used before setting the usals settings.
Amine are the latitude and longitude positions in your other satbox the same as the ones in tvheadend. I wouldn't go off google for the positions. I'm not sure what's the best site is to get correct details as I had someone install my rotor and dish and give me the right settings for me. Google and a few site seem to be off by 2 degrees on longitude which makes a big difference.
you also didn't follow my steps one by one make sure you do! you need to force your dish to each position one at a time and scan that one under a new position in tvheadend. this means for each position you point to you must unplug from pc, plug into box, move dish, plug back into pc, scan muxes as if it is not a rotor setup, REMOVE NETWORK option and repeat for all your positions. once you have finished with this you can then add your networks and the rotor positions in for each one one at a time.
once you have scanned all your positions one by one then you add in your USALS information then you can look at starting to map channels.
If you cannot get workaround 2 to work then I can only recommend using the older version I have a link to above until this is fixed.
RE: Rotor(Motor) Support Latest Information. - Added by Daniele Rogora over 10 years ago
Hi!
I've been a tvheadend user for some time now, and I think it's a great project.
In these days, though, I've been experiencing with the rotor support in tvheadend and I found some troubles; I'd like to share my 2 cents on this.
I've been able to complete an initial scan of the satellites playing with the configuration without using the Advanced satconf (so moving the dish with a dreambox and then with a standard setup in tvheadend).
Once I had my services, I enabled the advanced configuration, using the rotor with USALS, but I couldn't tune in any of the services.
Digging into the code I found that there is a 120 sec hardcoded grace time after the diseqc commands have been sent; after this time a callback function should be called to proceed with the tuning, but this never happens. Indeed the problem is that there is some kind of timeout that blocks the tuning (because no lock is acquired while waiting for the diseqc operations) and tries again, thus triggering again the 120s period and so on, so that the tune is never completed successfully.
So I've modified my code for the rotor so that it computes the angle that the rotor is supposed to cover and I've been able to reduce the 120s period to something more meaningful, so now I'm able to use the rotor and tune correctly services from different satellites.
But I still have problems when I try to tune on after another services from distant satellites; as example if my dish is on Turksat 42E and I try to tune a service on Hotbird 13E, the time needed by the rotor for the movement is too long, and the same timeout that i spoke of before blocks the tuning operation, so that my dish returns to 42E and the channel change doesn't succeed.
I hope these considerations will be helpful for anyone and that we can fix the rotor support in tvheadend.
RE: Rotor(Motor) Support Latest Information. - Added by Amine Bizid over 10 years ago
I just changed grace period to 10 sec and it works almost fine btw Astra 19.2 and HotBird 13.0.
Sometimes I need to restart manually my Oscam if I zap sats.
RE: Rotor(Motor) Support Latest Information. - Added by Gurabli Gurabli about 10 years ago
Hi!
I wonder if there is any update regarding the proper USALS rotor function? Is it working fine in the latest build (if yes, which one is it?) or there are still bugs?
At the moment, I'm on Win7+MediaPortal and basically everything works perfectly, but I would like to try out Openelec, but I need rotor support since I'm using DVB-S2 card for TV.
I do not mind if I have to setup the system by moving the dish with a box or other app, this is only done once, but I need a stable system after the satellites are scanned, and that when I select a channel on a different sat, it should move the dish and lock the channel without any problem. Is it possible now?
Basically the only downside of my current HTPC is Win7, I think it would be more stable with OE, but of course it needs to be checked.
RE: Rotor(Motor) Support Latest Information. - Added by Gurabli Gurabli about 10 years ago
Amine Mabrouk wrote:
I just changed grace period to 10 sec and it works almost fine btw Astra 19.2 and HotBird 13.0.
Sometimes I need to restart manually my Oscam if I zap sats.
Hi Amine,
can you please tell me if this has been fixed and working now? Where can I adjust the grace period?
Do you know what is causing the OScam crash, and is it fixed already?
RE: Rotor(Motor) Support Latest Information. - Added by Amine Bizid about 10 years ago
Hi Gurabli,
The problem is not fixed. I'm using 0 as a grace periode and it works almost fine.
All you have to do is to update the file /src/input/mpegts/linuxdvb/linuxdvb_rotor.c as follow:
static int linuxdvb_rotor_grace
( linuxdvb_diseqc_t *ld, dvb_mux_t *lm )
{
return 0;
linuxdvb_rotor_t lr = (linuxdvb_rotor_t)ld;
if (!ld->ld_satconf->lse_parent->ls_orbital_dir || lr->lr_rate == 0)
return 120;
int curpos = ld->ld_satconf->lse_parent->ls_orbital_pos;
if (ld->ld_satconf->lse_parent->ls_orbital_dir == 'W')
curpos = -(curpos);
return (lr->lr_rate*(deltaU32(curpos, lr->lr_position))+999)/1000;
}
RE: Rotor(Motor) Support Latest Information. - Added by Gurabli Gurabli about 10 years ago
Hi Amine,
thanks for your help! I'm a Linux n00b, but I will try to update the file like you said. Open with text editor and replace the original content with the content you wrote in your post?
You say it works almost fine. Can you tell me what kind of a problems you encounter?
BTW, if I have set the grace period to 0, then I can use GUI to setup all the satellites with USALS, the scan and everything will work fine? Or how should I start, using which option?
RE: Rotor(Motor) Support Latest Information. - Added by Amine Bizid about 10 years ago
Gurabli,
Be carefull editing the code, just add "return 0;"
It depends on the satellites you are going to scan.
To rotate between astra(19.2°) and Hotbird(13°), there will be no problem. But to rotate btw Astra(19.2°) and NileSat (5°), you will need to scan twice becuse the first scan will fail since it starts before the rotor has not finished turning.
RE: Rotor(Motor) Support Latest Information. - Added by Gary Brown about 10 years ago
I've been using USALs since me and perexg went and fixed the code back around 4th August and have had no bother I go from 50w to 57e (live in North East England)and can scan any position I want and get what I'm able to receive first scan. I do get the odd mux that doesn't scan but they are not a problem with the code. I cannot see what is different from master and the code above apart from the forum using the * to bold text instead of showing it. on the 18th August UllrichKossow changed the ABS function for DeltaU32 (not sure why though).
Edit:
Just noticed what you added Don't add this as it will not calculate the wait time at all and you need that to make the system wait for the motor to move. just stick to master.
RE: Rotor(Motor) Support Latest Information. - Added by Amine Bizid about 10 years ago
Hi Gary,
the 4th August code never worked for me. I had to restart oscam after each sat change. This is why i use 0 as grace periode.
Another issue i found is when i restart tvheadend and choose a channel on a sat different from the pointing sat -> Nothing happens.
For me, your code is Ok but i think that TVH must wait for a grace periode then checks the SNR before tuning (like Enigma2 do).
RE: Rotor(Motor) Support Latest Information. - Added by Gary Brown about 10 years ago
that is odd as I also use OSCAM and it never has any problems. trust me when I say that the rotor code is fine in master and the bug must be either in your setup or elsewhere in the code my system has been up since 14th August running master code (or just behind).
what version/build of tvheadend are you using?
on what system?
how does it connect with OSCAM?
how do you have OSCAM configured?
what version do you have?
is it on the same computer?
RE: Rotor(Motor) Support Latest Information. - Added by o o about 10 years ago
Amine Mabrouk wrote:
Hi Gary,
the 4th August code never worked for me. I had to restart oscam after each sat change. This is why i use 0 as grace periode.
Another issue i found is when i restart tvheadend and choose a channel on a sat different from the pointing sat -> Nothing happens.
For me, your code is Ok but i think that TVH must wait for a grace periode then checks the SNR before tuning (like Enigma2 do).
I experience that same problems as you. The grace timeout does not work and the function to check if the dish shall be moved or not is not working well either.
It does not matter which tvheadend or oscam version I use as log as they are reasonably new
I think that the usals tune function could be made a bit simpler and robust.
pseudo code:
float old_pos = 255.0; // have a global variable that is set to 255.0 (no sat at this position) at start of tvheadend usals_tune() { float timeout = 0.0; // Timeout in seconds if(new_pos != old_pos) { old_pos = new_pos; timeout = ceil((abs(new_pos - old_pos)*millis_per_degree)/1000); dieseq_command_to_move_dish(new_pos); } if(timeout > 0.0) wait((int)timeout); tune_to_service(); }
It does not matter if you send a dieseq command to move the rotor to its current position after tvheadend is started. The rotor would not move anyway. I used a similar patch on top of JSMs patch to speed up the "rotor" tuning on the "old" tvheadend.
Working rotor functionality would make the already awesome tvheadend the best TV streaming server ever
RE: Rotor(Motor) Support Latest Information. - Added by Gary Brown about 10 years ago
o o your pseudo code is irrelevant. the code is correct you'll not have set it up correctly or you'll not be on the right version of tvheadend.
can you ask the questions i've asked you for
what version/build of tvheadend are you using? (look in the about section and paste the bold top line ie. HTS Tvheadend 3.9.1499~g97999e4)
on what system is tvheadend running? linux pc 32bit or 64bit or other (nas/openelec etc)
what is your tuner card?
what is the rotor your using?
what is the rate set at?
RE: Rotor(Motor) Support Latest Information. - Added by Gurabli Gurabli about 10 years ago
I'll try out everything at weekend when ill have time with openelec and post all the info here. Which version and build of tvheadend should I use that works for sure?
Edit: Sorry, I see now the version. Will check if oe has this version already.
RE: Rotor(Motor) Support Latest Information. - Added by Gary Brown about 10 years ago
Gurabli:
I've also add your questions in my FAQs above.
if I use the latest stable Openelec version and tvheadend from it will I have the proper versions?
I've just asked in there IRC chat room and was told they are running version 3.9.1083 you need at least version 3.9.1139
I also have a cline I use from a friend. Can you please help me how to configure tvh and oscam to use the cline I have?
Please ask questions about OSCAM in Descrambling section as This thread is for the rotor only.
I'm also not sure how to scan for all the channels on a sat by following your guide.
once you have configured the information above you do it the same way as normal (Pre-defined Muxes in Networks or by adding the muxes individually making sure to choose the correct network when it asks for it)
RE: Rotor(Motor) Support Latest Information. - Added by o o about 10 years ago
I did not mean to criticize your code, I'm sure it is correct.
It must be something fishy in my setup.
Tvheadend 3.9.1498~g89ee111
ubuntu trusty 3.13.0-35-generic 64 bit
latest XBMX helix (from ferenmenta ppa)
Rotor: STABHH90
Tuner: STV0900 (ansyee usb2)
rate: 1000 (have tried 420, 500,1000,2000,10000) same result
Two positions configured, -0.8 and 4.8 according to your guide above.
Scanning for services works, but when I try to tune the stream hangs in the "test" state. It is not possible to move the dish by selecting a channel on another satellite and the debug log says that the dish is already at the correct position.
My setup works perfectly with https://github.com/jsm174/tvheadend/tree/rotor-support-2
Any help is appreciated.
RE: Rotor(Motor) Support Latest Information. - Added by Gary Brown about 10 years ago
the rotor specs shows Rotation Speed is 2.4°/s (18 V); 1.5°/s (13 V)
1/2.4*1000 = 417ms for the rate would be the best setting.
when you put in your site latitude and longditude are they the right way around?
are the channels mapped before you try to stream them?
can you take screenshots of the parts I did above and post them for me to see your settings?
RE: Rotor(Motor) Support Latest Information. - Added by o o about 10 years ago
Longitude and latitude are correct. The dish move correctly during the scan. All services are found on 0.8W and 4.8E. All the channels are mapped before I try to stream them. I'll post some screenshots later.
Rotor: USALS:
Site Latitude: 59.xx (Stockholm south, can't remember the exact decimals)
Site Longitude: 18.xx (Stockholm south, can't remember the exact decimals)
Satellite Longitude: -0.8
Rate: 420
Rotor: USALS:
Site Latitude: 59.xx (Stockholm south, can't remember the exact decimals)
Site Longitude: 18.xx (Stockholm south, can't remember the exact decimals)
Satellite Longitude: 4.8
Rate: 420
The network names are called Thor_1W and Sirius_5E (same name for the positions).
I will add some debug printouts in the code to try and figure out what is going on.
Thanks.
RE: Rotor(Motor) Support Latest Information. - Added by Philip Reynolds about 10 years ago
Hello Gary,
thanks once again for your instructions.
Ok, here we go-
tvheadend Build: 3.9.1500~gf35f4ce~trusty
Linux Mint 17 64, kernel 3.14
TBS6922SE dvb-s/s2 card with latest TBS drivers
TBS6281 dvb-c card with latest TBS drivers
Golden Media -50-120 motor (rotor), same speed spec as your motor (so rate set to 400)
All other setup input followed as you described.
A few things to note-
1. in the log I constantly see-
comet failure [e=Cannot read property 'getById' of null]
comet failure [e=Cannot read property 'getById' of null]
comet failure [e=Cannot read property 'getById' of null]
comet failure [e=Cannot read property 'getById' of null]
comet failure [e=Cannot read property 'getById' of null]
comet failure [e=Cannot read property 'getById' of null]
2. tvheadend will not save the 'pre-defined muxes', I have to enter the transponders for each satellite manually and network discovery will do the rest. The normal trick of trying to enter 'pre-defined muxes' after making the network doesn't work.
3. When entering the USALS positions for each position in the advanced tab and then pressing save, the web page doesn't update. You have to reload the page to make sure the settings were saved.
Right. So, after everything is set up, dish will turn to correct position, and everything tunes in. Sometimes scanning is someteimes painfully slow, ie- 28.2 East took 1 hour. Signal strength is good, as is SNR. Finally after 3 hours, have 4 positions scanned. I map two channels, one from 0.8W and one from 4.8E. Reset XBMC PVR database, try to watch. Instantly XBMC reports 'lost connection to tvheadend'. Ok, so I restart tvheadend, and reset XBMC PVR database. Now when I try XBMC reports 'no free card available' or similar. All mapped DVB-C channels work correctly, only tuning to a DVB-S channel will trigger the 'lost connection to tvheadend'.
Tvheadend shows the DVB-S stream status as 'testing' when XBMC connects.
I'm at a dead end, hopefully there's light at the end of the tunnel.
Best regards,
Phil.
P.S- forgot to add that everything works fine when tvheadend is setup for universal lnb after the dish has moved to the correct position (no rotor).
RE: Rotor(Motor) Support Latest Information. - Added by Gary Brown about 10 years ago
o o
try enabling trace with +all and upload a log for me to see.
Philip
point 1 is something to do with the webui. post an issue on this one as not rotor related
point 2 try editing the network and selecting the pre-defined muxes again this is a bug that has been brought up in the chat room.
point 3 is a webui bug again so post it in another issue.
'lost connection to tvheadend': this happens a lot with my setup but is down to the client(xbmc/kodi) and maybe the plugin. if you just wait it should sort itself out start up. can you test it in vlc by getting the http address from the channel page and opening it as a network stream, or if you can use the htsp plugin.
RE: Rotor(Motor) Support Latest Information. - Added by Gurabli Gurabli about 10 years ago
I still need some time to do the testing, but it looks to me that there are still many bugs inside of TVH and XBMC. I need a stable and reliable TV with PVR for DVB-S, otherwise my wife will be mad
What do you suggest, should I try to switch to Openelec or stick to MediaPortal?
RE: Rotor(Motor) Support Latest Information. - Added by Philip Reynolds about 10 years ago
Hi Gary,
thanks for your response.
I'm kind of new to linux, so how should I enable trace (I can search google tonight)?
I'll try with VLC this evening to play a stream when tvheadend is set up for rotor.
Loosing connection to XBMC has only started when using rotor control. Previously when I used just the DVB-C card and the DVB-S card setup as universal, a disconnect would happen once in blue moon.
Also, any idea why the stream status is 'testing' when XBMC tries to connect?
Thanks once again,
Phil.
P.S- Gurabli, my wife is a little bit annoyed with my 'hobby'
RE: Rotor(Motor) Support Latest Information. - Added by Jaroslav Kysela about 10 years ago
Note that I tried to fix another positioning issue affecting mainly USALS rotors:
https://github.com/tvheadend/tvheadend/commit/03af723216afffaf57d9bb78d71a80a32adb7d9a
So, get the latest and greatest v3.9-1526-g4bce3dc now...
The issues with the predefined muxes should be also resolved.