View Full Version : serial / USB OTA rotor antenna controller ?
I was wondering if anyone has thought of or considered developing an interface to control a rotor antenna - to sync with any OTA channel that may be selected for viewing or recording. ??
The need must be from more than just me ...
I have an HDTIVO and can only get my locals in HD via OTA. Because of this I have my antenna adjusted in a mid or compoimised position which will get a signal from all of my local networks channels. However the signal strength is not high enough always to keep a non-pixeled image from time to time. It is VERY anoying to be watching a show and lose signal strength for a few seconds only to miss some important dialog during the outage.
I've search and seen a few roto antennas that have IR remotes, and I thought I saw a serial one as well, for control.
anyone?
jbebel
04-19-2005, 12:44 PM
I'm using an IR controlled antenna rotor from Channel Master. They sell it at Lowes last time I checked. I haven't figured out how to get the tivo to send the IR codes, so I'm currently polling tivoweb every 30 seconds for the current channel and if it has changed, I transmit the IR code for the new channel. It's a fairly complex system. I'd love to make it simpler, but it does work. I'd be happy to provide details if you're interested.
I'm using an IR controlled antenna rotor from Channel Master. They sell it at Lowes last time I checked. I haven't figured out how to get the tivo to send the IR codes, so I'm currently polling tivoweb every 30 seconds for the current channel and if it has changed, I transmit the IR code for the new channel. It's a fairly complex system. I'd love to make it simpler, but it does work. I'd be happy to provide details if you're interested.
Yes I would be interested; I was hoping to get something serial driven - maybe running on a pc that is - pulling data from the TiVo via the network -TiVoWEB works I guess.
How do you send the IR output to the rotor controller/box ?
Most of my expertise is in machine control; or PLCs. I have limited Programming experence - mostly perl, no C at all. I was thinking that an Allen Bradley MicroLogix controller could do the "real" task of operating the antenna controller via relay outputs.
I have a few PLCs around to play with perhaps I'll dig out my screw drivers and pwr-supply!
jbebel
04-19-2005, 05:44 PM
Cool. I've been meaning to improve this process for some time. Perhaps with our collective efforts we could make it better than how I'm doing it. For sending IR, I'm using the lirc project. http://www.lirc.org/ I'm using a serial IR transmitter, which is nothing more than a diode, a resistor and an IR led. http://www.lirc.org/transmitters.html I'm actually sending it through one of those remote extenders (http://www.radioshack.com/product.asp?catalog%5Fname=CTLG&product%5Fid=15-1950) since the range isn't too great on the serial transmitter, plus I can leave it by my computer rather than having to route a serial cable out in front of my tivo. Then I have this program running on my linux server:
#!/bin/bash
LASTCHANNEL=
LASTCHANNEL2=
while /bin/true ; do
CHANNEL=`/usr/bin/lynx -dump http://tivo.ebel.mybox.org/info/ | /bin/grep Channel | /bin/sed 's/^ *Channel: *\([0-9]\+\).*/\1/'`
if [ "$CHANNEL" != "$LASTCHANNEL" -o "$LASTCHANNEL" != "$LASTCHANNEL2" ] ; then
/usr/local/sbin/rotor -c $CHANNEL
fi
LASTCHANNEL2=$LASTCHANNEL
LASTCHANNEL=$CHANNEL
sleep 23
done
It checks the channel every 30 seconds or so and if it has changed, it sends that channel to the rotor. It sends it twice in a row just in case someone walked in front of the transmitter the first time. The rotor program is a program I wrote to manipulate the rotor controller using lirc. If you get lirc up and running I'll be happy to share my lirc config and that script. That's all it needs.
I'm ok with using the IR controller, but it might be possible to control it otherwise. It is just a PIC processor. It may be hackable, but I haven't done much on those lines.
There are two ways I'd like to see this improved. One is that I'd like for it to be done actively rather than using polling. I don't know any way to check the channel other than using tivoweb, or the methods it uses (which I haven't investigated). I know on the series 1 tivos you could catch signals being sent between components such as channel changes. To my knowledge, this doesn't work on the S2 tivos. If someone knows differently, I'd like to hear it. Some kind of active solution would be great, rather than having to poll, since there is already a lot of delay in antenna rotation. I may be able to still simplify the polling though, rather than loading the whole tivoweb info page just to get the channel. Or do the polling on the tivo, and send a signal to my server when it changes.
Secondly, I'd really love for this to be tivo-centric, not requiring another computer. The optimal method for this would be understanding the IR subsystem used by the tivo to control other devices, and integrating the rotor controller codes with that system. I know the IR codes are already present since it matches a cable box the tivo already supports (I think its a pioneer). But if you tell the tivo to use cable, then the guide data is on all the wrong channels. Maybe we can trick it somehow. If that system is too difficult to hack, then I wonder if lirc could be compiled to run directly on the tivo and use the IR port on the tivo to send the codes. I feel like the existing IR port would act the same as a serial port transmitter for lirc, but I'm not certain. Using the serial port might also be possible, but I don't know if it provides enough power/pins to handle the serial port IR controller lirc uses. Plus I like to keep my serial port open for debugging. I'll ask about the possibilities on the lirc list.
Joel
Cool. I've been meaning to improve this process for some time. Perhaps with our collective efforts we could make it better than how I'm doing it. For sending IR, I'm using the lirc project. http://www.lirc.org/ I'm using a serial IR transmitter, which is nothing more than a diode, a resistor and an IR led. http://www.lirc.org/transmitters.html I'm actually sending it through one of those remote extenders (http://www.radioshack.com/product.asp?catalog%5Fname=CTLG&product%5Fid=15-1950) since the range isn't too great on the serial transmitter, plus I can leave it by my computer rather than having to route a serial cable out in front of my tivo. Then I have this program running on my linux server:
#!/bin/bash
LASTCHANNEL=
LASTCHANNEL2=
while /bin/true ; do
CHANNEL=`/usr/bin/lynx -dump http://tivo.ebel.mybox.org/info/ | /bin/grep Channel | /bin/sed 's/^ *Channel: *\([0-9]\+\).*/\1/'`
if [ "$CHANNEL" != "$LASTCHANNEL" -o "$LASTCHANNEL" != "$LASTCHANNEL2" ] ; then
/usr/local/sbin/rotor -c $CHANNEL
fi
LASTCHANNEL2=$LASTCHANNEL
LASTCHANNEL=$CHANNEL
sleep 23
done
It checks the channel every 30 seconds or so and if it has changed, it sends that channel to the rotor. It sends it twice in a row just in case someone walked in front of the transmitter the first time. The rotor program is a program I wrote to manipulate the rotor controller using lirc. If you get lirc up and running I'll be happy to share my lirc config and that script. That's all it needs.
I'm ok with using the IR controller, but it might be possible to control it otherwise. It is just a PIC processor. It may be hackable, but I haven't done much on those lines.
There are two ways I'd like to see this improved. One is that I'd like for it to be done actively rather than using polling. I don't know any way to check the channel other than using tivoweb, or the methods it uses (which I haven't investigated). I know on the series 1 tivos you could catch signals being sent between components such as channel changes. To my knowledge, this doesn't work on the S2 tivos. If someone knows differently, I'd like to hear it. Some kind of active solution would be great, rather than having to poll, since there is already a lot of delay in antenna rotation. I may be able to still simplify the polling though, rather than loading the whole tivoweb info page just to get the channel. Or do the polling on the tivo, and send a signal to my server when it changes.
Secondly, I'd really love for this to be tivo-centric, not requiring another computer. The optimal method for this would be understanding the IR subsystem used by the tivo to control other devices, and integrating the rotor controller codes with that system. I know the IR codes are already present since it matches a cable box the tivo already supports (I think its a pioneer). But if you tell the tivo to use cable, then the guide data is on all the wrong channels. Maybe we can trick it somehow. If that system is too difficult to hack, then I wonder if lirc could be compiled to run directly on the tivo and use the IR port on the tivo to send the codes. I feel like the existing IR port would act the same as a serial port transmitter for lirc, but I'm not certain. Using the serial port might also be possible, but I don't know if it provides enough power/pins to handle the serial port IR controller lirc uses. Plus I like to keep my serial port open for debugging. I'll ask about the possibilities on the lirc list.
Joel
thanks.. I'm going to keep my eye open for a good rotor box... but If I were to attack this cold, assuming I could write a few lines of code..
I would write a smal .tcl script that would output to the serial port the channel info, when it changes on a tuner, or better yet if it's an OTA tuner.
Then on the PC side, I would have a perl script running that is monitoring the serial port on the TiVo throught a NULL modem cable, looking for any channels changes - that would have been specifically formatted with character strings unique for the script to find/parse like
##[61.1]##<CR>
the rest should be a simple process to map the channel# to a position or button seq. /Ir SIGNAL/ serial command / or what ever your rotor box needs to operate.
The PLC thing is WAY to expensive to consider a option for general use, I may play around with the idea, but it's like using a bazooka to shoot rats!
I like the "push" from the TiVo side better that a "pull" from the PC. This way there isn't any wasted polling every min or so just checking to see if the channel changed.
I suppose you could connect a photo-eye up to look for the record LED - and if it lites up you could start to poll...
allot of different ways to attack. I believe the best would just have the whole thing run from the TiVo and output what ever serial commands are needed ,when a channel is changed and have it talk directly to the rotor box thru it's serial port.
jbebel
04-20-2005, 12:19 AM
I have seen more capable rotor controllers, but most are for ham equipment. Which would work, but tend to be really expensive. I'd still like to keep the price down on this. I'm not dissatisfied with my channelmaster controller. It does seem roundabout to have to use IR, but it does work. If you do manage to find something for cheap I'm curious though.
I'm still really hesitant to use the serial port for anything other than the console. That's the most reliable way to get into my tivo when something goes screwy. I'd a whole lot rather use the IR port, which does show up as a serial port, so maybe it could be used for other serial sorts of thing, but I don't know which pins are present. The other option is to use netcat or something similar to get the signal over the network. If another computer has to be involved, that's really the method I'd prefer. No need to involve another wire when I don't have to. It could work just like a serial cable could. Just monitor the data coming over netcat for channel information.
The channel master controller stores several antenna directions into memories, so when I want to watch channel 5, I just send it 05. Actually, I just type rotor -c 5, since that's how my script works. Once the controller is programmed, which my script can also be used for, then you just read the channel from the tivo, and send it to the rotor. I'm not really familiar with digital, but I'm guessing you could just drop the .1 from 61.1 and use 61. All subchannels are going to be in the same direction right?
So who would know about signals in the series 2 tivos? Can we capture the channel change signal in any way? It looks like you've been around the forums a while longer than me. Who would be an expert at that sort of thing?
If we can't capture it, I agree that I'd rather run as much on the tivo as possible. I don't know tcl, but I imagine it would be pretty easy to check the channel without a lot of overhead directly on the tivo. I'd still, of course, love to understand the whole IR subsystem the tivo uses and take advantage of it rather than use a whole separate system.
classicsat
04-21-2005, 02:12 PM
Depending on how the tuner works, you could intercept the (usually I2C) command sent to the tuner module, which tunes it to a frequency, with a micro, and interpret that to a channel change, to send an IR command to the rotor controller.
jbebel
04-21-2005, 05:41 PM
I haven't tested it out yet. Perhaps tonight, but I just discovered ADH's routerplus (http://www.pvrhax0r.com/forum/showthread.php?s=&threadid=51). This looks really promising for starting an active antenna rotation rather than polling. I'll provide some more details once I can test it.
jbebel
04-25-2005, 02:43 PM
I've played around with routerplus a little bit, and I'm not convinced it will help. It certainly catches remote keypresses, but I don't see a simple channel number being passed when the channel changes. Maybe someone more familiar with it (like ADH) would know better if its possible.
I'm rather curious about capturing the i2c commands going to the tuner, but I'm not sure I know how how we would go about monitoring them.
I've also done some parsing of tivowebplus and how it determines the channel number. It is unfortunately complicated involving creating a table of channels, and then going through several layers of mfs find the id of the channel currently recording and looking it up in the previously created table. We could at least simplify the info page of tivowebplus so it didn't look up anything but the channel, but its still a lot of effort to go through just to know what channel is recording. Unfortunately, so far, that's the only way I know to tell.
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.