Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tivo control question
#1
My skills at CQC programming are pretty basic, and for the most part I can hack my existing CQC configuration, but would be helpless at creating a brand new one. That said, my hacking skills are pretty good. My programming skills date back to what Dean calls the Dark Ages, where we did ugly things like using direct branches, self modifying code, and using instructions as constants for masking and stuff. Back when memory was sparse and programming was done in machine language, Fortran, and maybe something edgy like Pascal....

What I am trying to do is swap the channels between two Tivo's (a Tivo Premier and a Tivo Mini). I am using the Tivo Telnet driver created by Kirk Kanak, and it is working fine for all my other buttons. I can read the current channel of the Tivo's using the Channel command (returns a Card4 result) or the ChannelStatus command (returns a string result where the first four characters are the channel). Unfortunately, I can't simply use the SetChannel command to send the channels back to the opposite Tivo's since Tivo, for some reason, didn't implement this command in the Tivo Mini. The Tivo Mini does, however, accept the IRCODE commands, and the Channel and ChannelStatus commands.

So, what I need to do is somehow parse the result from the Channel or ChannelStatus commands into the individual digits of the channels and then send them back to the opposite Tivo using the IRCODE command.

Something like this, where I am trying to extract the 2nd, 3rd, and 4th characters from the string returned by ChannelStatus, and then send them to the opposite Tivo's:

LocalVars::CreateVariable(LVar:Tivo_Premier_Channel, String, , )
LocalVars::CreateVariable(LVar:Tivo_Mini_Channel, String, , )
Devices::FieldRead(Tivo_Premier.ChannelStatus, LVar:Tivo_Premier_Channel, True)
Devices::FieldRead(Tivo_Mini.ChannelStatus, LVar:Tivo_Mini_Channel, True)
Devices::FieldWrite(Tivo_Premier.IRCode, GetAt (1) LVar:Tivo_Mini_Channel, True)
Devices::FieldWrite(Tivo_Premier.IRCode, GetAt (2) LVar:Tivo_Mini_Channel, True)
Devices::FieldWrite(Tivo_Premier.IRCode, GetAt (3) LVar:Tivo_Mini_Channel, True)
Devices::FieldWrite(Tivo_Premier.IRCode, Enter, True)
Devices::FieldWrite(Tivo_Mini.IRCode, GetAt (1) LVar:Tivo_Premier_Channel, True)
Devices::FieldWrite(Tivo_Mini.IRCode, GetAt (2) LVar:Tivo_Premier_Channel, True)
Devices::FieldWrite(Tivo_Mini.IRCode, GetAt (3) LVar:Tivo_Premier_Channel, True)
Devices::FieldWrite(Tivo_Mini.IRCode, Enter, True)

I am sure that I am making more than one mistake here. Certainly some syntax problems, and also maybe some LVar declaration setup commands. Hopefully I am somewhat close to the proper approach.

Any help in what to try to fix my pathetic attempt would be appreciated.
Thanks
Mike
Reply
#2
Import the attached macro pack. It will create a macro named:

\User\SwapTIVOChannels

You can invoke it from an action like this:

MacroEng::RunMacro(\\User\\SwapTIVOChannels, mon1 mon2 waitmillis);

So the parameter to pass is a space separated set of values, which are the first and second TIVO monikers, and just for safety a millisecond value to wait between each command. Try 100 to start and if it seems like it's not setting all the digits, crank it up a bit to give it time to contemplate things between commands. It also sends an Enter at the end, just in case, which may or may not be correct. If not, it can be removed.

Of course I had to do this by eye, so I could have gotten something wrong. Let me know what happens.


Attached Files
.cqcmacropack   SwapTIVOChannels.CQCMacroPack (Size: 1.06 KB / Downloads: 2)
Dean Roddey
Software Geek Extraordinaire
Reply
#3
Dean
Thanks so much for taking the time to do the macro. It works great.
If one of the Tivo's is displaying something other than live tv, there can be a bit of weird behavior. Not sure there is a need to work around this though. For example, it would be REALLY complicated, and probably not even possible, to switch a recording being played on one Tivo with live TV on another Tivo.

BTW, the reason I am doing this is that I expanded my home entertainment room to have two 50" tv's mounted above and to either side of my big screen, sports bar style. Needed to have the ability to switch control between the Tivo's driving those three screens, as well as having the ability to swap what is playing from one of the smaller screens to the big screen. It is working better than I could have expected.

See ya, and thanks again.
Mike

Dean Roddey Wrote:Import the attached macro pack. It will create a macro named:

\User\SwapTIVOChannels

You can invoke it from an action like this:

MacroEng::RunMacro(\\User\\SwapTIVOChannels, mon1 mon2 waitmillis);

So the parameter to pass is a space separated set of values, which are the first and second TIVO monikers, and just for safety a millisecond value to wait between each command. Try 100 to start and if it seems like it's not setting all the digits, crank it up a bit to give it time to contemplate things between commands. It also sends an Enter at the end, just in case, which may or may not be correct. If not, it can be removed.

Of course I had to do this by eye, so I could have gotten something wrong. Let me know what happens.
Reply
#4
Is there not a full IP driver for the Tivo's yet? I've searched and can't find anything.

Every modern Tivo device has the ability to do full, two-way communication, including channel/art/show/info/etc/just-about-everything.

I'm talking specifically about the Tivo Roamio and Tivo Mini.
Reply
#5
AFAIK, the shipped TIVO driver is such a thing. Mike mentioned that he's using a Mini and apparently they didn't implement the direct channel selection command I guess.
Dean Roddey
Software Geek Extraordinaire
Reply
#6
both the roamio and mini are $149, and have netflix/amazon/spotify/PLEX apps to go with live and recorded TV. so 1 roamio + a mini at each TV might actually accomplish having a single interface at all TVs.

the shipped Tivo driver has this for a description:

"Supports the TiVo Series3 and TiVoHD PVR through TelNet."

and the docs seem to imply that the driver is one way, with very limited information. the roamio IP can provide pretty much everything from program information to scrubbing info. could be a good one to put on your list to get updated.

edit: here is the ethernet protocol overview -- http://developer.tivo.com/files/TiVoCont...-06-18.pdf
Reply
#7
The only feedback you get from the existing driver is the currently tuned channel. From my brief scan I can't tell if it allows you to pull guide data over? If so a driver would be incredible.
Reply
#8
It looks like that is something more recent than was available when the original driver was written.
Dean Roddey
Software Geek Extraordinaire
Reply
#9
i think it definitely is. i picked up the tivo roamio today, so if you ever want to take a pass at the new API ... Smile
Reply
#10
Maybe once we are into the 4.7 pre-release cooldown period. Remind me again then.
Dean Roddey
Software Geek Extraordinaire
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Jandy Pool Control avtexan 20 714 06-07-2018, 01:09 PM
Last Post: Dean Roddey
  event and subsequent countdown timer question dogman 9 546 05-03-2018, 06:36 PM
Last Post: dogman
  webriva template question lleo 21 2,325 01-08-2018, 08:53 AM
Last Post: Dean Roddey
  Use single On/Off/Slider to control group jkmonroe 3 961 08-06-2016, 09:28 AM
Last Post: pinballmark
  Help figuring out projector serial control! Deane Johnson 19 2,458 07-30-2016, 11:08 AM
Last Post: Deane Johnson
  Harmony Hub Device Control jkmonroe 6 1,656 07-03-2016, 02:36 PM
Last Post: potts.mike
  how deep is your (echo voice control) love? IVB 197 13,916 05-23-2016, 08:47 AM
Last Post: Dean Roddey
  Problems with App Control in 4.8.3 update MikeA 2 997 04-07-2016, 07:29 AM
Last Post: MikeA
  Control surface - am I heading down a rat hole? kjaerligkatt 3 1,267 02-06-2016, 10:52 AM
Last Post: Dean Roddey
  Volume Control greyjeep 3 1,114 11-21-2015, 10:56 AM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)