Override/Proxy TiVo RF Remote?

Discussion in 'Developers Corner' started by davidblackledge, Nov 10, 2019.

Tags:
  1. davidblackledge

    davidblackledge Registered lÜser

    563
    36
    Sep 9, 2008
    NM
    Just thinking again about the HTML 5 Opera features available and an abandoned HME UI-replacement project I was thinking about long ago (abandoned because it couldn't include closed captioning). It seems like it might be possible to do it with Opera (I believe that has all the CC support built-in), but the TiVo remote's teleport keys (TiVo, LiveTV, Guide) would also break the "immersion."

    So I was thinking how the RF remotes could maybe be paired with an Arduino or Raspberry Pi instead of a TiVo, then that device could use the TiVo's network remote interface to forward all the commands except the teleport keys (maybe sending different commands that could be intercepted to do an immersive equivalent). More generally it could be useful to convert a TiVo Remote to do whatever.

    I've never built any of these things, but if there is a kit that has the required RF features it might be an interesting project to get into. I'm guessing nobody has done this before so there isn't an existing TiVo-pairing/interpreting library for one of those devices, but if one exists that sure would be nice.

    Anybody have any useful thoughts on this?
     
  2. jmbach

    jmbach der Neuerer

    2,958
    406
    Jan 1, 2009
    That would be interesting. You could use the A,B,C,D keys for custom macros.

    The slide remote was a Bluetooth device if memory serves. I have not looked into the latest remotes.

    Raspberry Pi does have a Bluetooth interface.


    Sent from my iPad using Tapatalk
     
  3. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    50,597
    5,884
    Apr 17, 2000
    Nevada
    Is there a way to pair a TiVo remote to another device? Is their RF interface public?

    One thing I'd like to see is a way to map the keys on the remote better when using the apps. All the apps seem to handle the keys different, it would be nice if you could detect which app was being used via RPC and then create a custom map. Like one where pressing "clear" actually removes the playbar in Netflix instead of exiting the app.
     
    davidblackledge likes this.
  4. Allanon

    Allanon Active Member

    904
    144
    Nov 2, 2005
    I did a project for my home theater that allowed a single Tivo remote to control all the devices in my theater and the lights. Here is a list of the hardware and software used:
    • Tivo HD remote which has the switch for using 2 different Tivos
    • PC mini running linux with LIRC and HEYU software installed
    • RF Remote Converter
    • Some X10 light socket controllers
    • X10 transmitter
    • IR transceiver
    • Tivo, Projector, A/V Receiver, and Bluray player
    I also made a switch that when no voltage is applied it connects the IR LED coming from the RF Remote Converter to the Tivo's IR LED. If 5V is applied to the switch then no connection is made. I was able to program my A/V receiver to send the 5V signal when on any input except the Tivo's input. This made it so when the A/V receiver is on the Tivo input remote codes go directly from the RF Remote Converter to the Tivo but if the A/V receiver is on any other input then no remote codes go to the Tivo.

    I had IR LED leads going from the IR transceiver to every other device and I had the RF Remote Converter and IR transceiver pointed at each other so IR codes could be passed. This allowed codes from the remote to get to the IR transceiver which was in a cabinet next to the RF Remote Converter.

    I wrote a program that polled the A/V receiver for which input it was on and using the LIRC API software the program converted codes received by the IR transceiver in to codes for the devices. Then transmitted those new codes to the devices using the IR transceiver.

    To take it a step farther I wanted to control the lights in the theater so this is where the switch on the Tivo remote came in handy. When the switch is in position 1 it would control the Tivo but when in position 2 it sent different Tivo codes that the Tivo didn't respond to but the IR transceiver was able to receive. I interpreted the codes using the LIRC API software and sent X10 commands to the X10 light sockets using the X10 transmitter and HEYU API Software.

    This setup allowed me to control all my devices with one Tivo remote just by turning to the device on the A/V receiver using the input button on the remote. And to control the light by flipping the switch on the remote and pressing buttons on the remote.

    Also note that I tried sending Tivo commands through the IR transceiver but it was too slow and the lag made it hard to navigate the menus. This is why I created the pass-through switch.

    For your project you could have the Tivo paired to different codes than the Tivo remote and use an IR transceiver and LIRC API software to interpret the codes from the remote and send whatever Tivo code your want in it's place.
     
    Last edited: Nov 21, 2019
    davidblackledge likes this.
  5. davidblackledge

    davidblackledge Registered lÜser

    563
    36
    Sep 9, 2008
    NM
    I like your approach a lot, but it sounds like the lag issue would make it not as useful when I mainly want direct hijacking of only certain codes.
    If an RF equivalent of what you did is possible, I would hope it would largely remove the lag problem.
    If anybody has any information I'd love to hear it, too.
    But the little info I've researched so far makes it sound like RF remotes are not an encrypted transmission, you just have to experiment until you've "tuned in" to the transmission correctly, then identify each button sent in the transmission. It would require some effort with the right equipment, but shouldn't be difficult.

    What I don't know is what some options are for the equipment.
     
  6. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    50,597
    5,884
    Apr 17, 2000
    Nevada
    Yeah that's way out of my wheelhouse
     
  7. Allanon

    Allanon Active Member

    904
    144
    Nov 2, 2005
    I only have Tivo Premier and Bolt cable boxes from my cable company and they don't have RF remotes so I don't know if they pair with other devices. But they do sell RF dongles for older Tivos maybe it's possible that the dongle will also work on a computer and would be faster than the IR Transceiver.

    Using this scenario I would envision using a Raspberry Pi to translate RF codes from the RF dongle and output IR to the Tivo or maybe plug the RPi in to the Tivo using USB and send keyboard commands.
     
  8. davidblackledge

    davidblackledge Registered lÜser

    563
    36
    Sep 9, 2008
    NM
    Ok, did a little more searching and our forums helped me to know that the "kodi" computer-based DVR stuff is possible to be controlled with TiVo RF remotes:
    TiVo Slide - Official Kodi Wiki
    So hopefully it wouldn't be necessary to reinvent the wheel for this.
    I know nothing about Kodi...yet.
    ... however the windows install just says TBD and talks about EventGhost.

    EventGhost might be the easiest solution - something designed to just take remote input and "do stuff." (Looks like EventGhost's website is dealing with a major crash right now which may complicate things.)

    I'm going to start looking into that as soon as I get some time, but this looks like an exciting solution because it's possible the EG enthusiasts may even just throw together a plugin for exactly what I'm talking about if I ask for it nicely.
     
  9. Dec 3, 2019 #9 of 17
    davidblackledge

    davidblackledge Registered lÜser

    563
    36
    Sep 9, 2008
    NM
    FYI, I ordered a "TiVo USB-RF Dongle Slide Pro" on Amazon for about $25, paired it with my Roamio RF remote, and installed EventGhost.

    I also installed a TiVo Network plugin for EG that sends network remote events and can be mapped to any event to fire them.

    The Dongle shows up as 11 Human Interface Devices (HID) for some reason, and at that point I have access to almost every key via 2 of them (and an odd "value 60" gets reported via the 4th device the first time I hit the TiVo button). 2nd device is thumbs, TiVo, and LiveTV; Everything else is on the first device, but "Clear" doesn't ever seem to show up for any device. And finally the numbers are forcibly passed through as HID keys, so EventGhost can't tell the difference from my keyboard for those. Also Volume/Mute get interpreted and change the volume on the computer and EventGhost can't prevent that, too. 2 of the 11 devices don't work with EG, so maybe Clear is in those?

    Anyhow, there is an EG plugin that is supposed to be a low-level access to this device instead of going through the HID, but it doesn't install correctly. I'm asking EG forums about this, but have gotten no response (no posts on this plugin in the last 3 years). If I can get it to work, maybe I can have the remote just be 100% overridden, then could activate TiVo Network remote events as I desire.

    That said, now that I have the dongle, it might be easier for me to learn enough about Raspberry Pi to write my own equivalent of EG for its USB port just for my purposes and I can just use the HID device directly (since that will be the only "keyboard" plugged into the Pi). Still doesn't solve the "clear" button problem, but it's "close enough."

    For now, I've got it set up where EG is making my remote act like it's paired with a mini on my network, it just doesn't send Clear or numbers. No lag at all.
     
  10. ntlord

    ntlord Member

    184
    1
    Nov 30, 2013
    davidblackledge likes this.
  11. davidblackledge

    davidblackledge Registered lÜser

    563
    36
    Sep 9, 2008
    NM
    Nice, thanks! Looks like the hid-tivo.c linked from your posts is a 404 now, but the first google result looks promising:
    torvalds/linux

    My skills are super rusty in this area, but I can't help but wonder if that means it's an existing or easy-add linux component, and I haven't experimented with the Raspberry Pi, but if it can just run linux then this may be an easy project in the end.
     
  12. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    50,597
    5,884
    Apr 17, 2000
    Nevada
    That was the original slide. It used BlueTooth. The newer remotes use some proprietary TiVo RF standard. IIRC they even have a patent on it.

    Although they did have a dongle that allowed these newer remotes to work with older Premiere and Mini units, so maybe someone could reverse engineer a driver from that. If it used HID and just acted like a keyboard it may not be that hard.
     
  13. davidblackledge

    davidblackledge Registered lÜser

    563
    36
    Sep 9, 2008
    NM
    Ah, good catch, see what you mean about that bluetooth driver.

    What I do have is the dongle that works with RF remotes that works as HID and it likely does work as HID even on Linux, but the challenge continues to be dealing with all the atypical buttons. In windows everything is available (when you combine results of several device presences) from some raw code values except the Clear button, and the number buttons are handled like they are a directly connected keyboard. Some keys work as media virtual keys as well.

    I fear that the dongle itself could be the roadblock to getting the Clear button to work, but I'll try to be optimistic it's just a driver issue.

    However, I should just try it sometime... run a Raspberry pi with my dongle plugged in and I bet I'd be able to see every key (except Clear, I guess) via HID then just make it run network requests with each button press (after they're mapped a desired way). I just have to take the time to order one and get started working with it. I'm not really motivated to do programming outside of work lately, so who knows when that will be.
     
  14. davidblackledge

    davidblackledge Registered lÜser

    563
    36
    Sep 9, 2008
    NM
    Ok, just to close the loop on this... My son helped me today with some ideas around running a Virtual Machine with a version of linux I might run on a raspberry pi, and this answered the last of my questions about feasibility.
    • We installed VirtualBox.org (with the extension pack for more USB support) on my PC (with secure VM features enabled in my bios).
    • I ran it with a Debian Raspberry Pi Desktop iso file as its OS.
    • I plugged the Dongle in to my PC, then enabled VirtualBox's Devices > USB > TiVo Inc S5 Remote Control.
    • That causes the new appearance of 3 /dev/hidraw# and 2 /dev/usb/hiddev# entries.
    • When I run "sudo usbhid-dump -e stream" it reports independent values for every single button press/release on the TiVo remote control, including the elusive "clear" button.
    Note, the basic Debian setup maps a lot of tivo buttons to real keys because the previously-mentioned hid_tivo.c and/or rc_tivo.c is part of the basic OS distribution setup, and this includes mapping the TV Power button to a media key that actually shuts down the VirtualBox, but usbhid-dump overrides all functions including that, allowing me to test it and to know that it's possible to override that mapping.

    Interestingly, the "clear" button reports values more similar to the number keys than any other results. Also interestingly, some HTML5 experimenting the other day had reported a CLEAR button when I used my numpad with numlock OFF and I pressed the unlabeled "5" key. I don't know if these two facts are related or coincidental, but both are interesting results.

    That's enough for me to know this is possible. So if I ever get a decent HTML5 app running, I can make it a "replacement UI" for the TiVo by also creating a TiVo Remote proxy app using this technique to send "safe" translations to the target TiVo's Network Remote interface.

    My son optimistically suggested a Docker solution might be possible so we don't need the full VM, but I suspect that's not low level enough to override the USB driver like the VM does, and neither of us has any experience with Dockers.
     
  15. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    50,597
    5,884
    Apr 17, 2000
    Nevada
    So your goal here is to actually replace the TiVo UI with one you write yourself in HTML5 running on the TiVo as an app?

    My biggest concern with that would be the mind/RPC certificate. There was a guy a few years back who wrote an app for Windows Phone using the same hacked certificate that kmttg uses and published it to the Windows store. TiVo came down on him and had the app removed from the store. He ultimately got them to issue him an official developer certificate and was able to republish the app, but I have personally talked to 3-4 people at TiVo about getting an official certificate and no one that still works there knows how to do that.

    So be warned that if you ever do get this working there is a chance TiVo could shut it down and all your effort will be for naught.
     
  16. davidblackledge

    davidblackledge Registered lÜser

    563
    36
    Sep 9, 2008
    NM
    Yeah, I saw kmttg just got mothballed for certificate reasons, too. I had also done some work on an HME in-tivo interface for KMTTG jobs... I stalled on it, so I didn't release, but that is possibly for naught now, too. Certainly easy access to it was dependent on my added channel-change-launch feature in kmttg and that depends on the certificate.

    My hope for the "HTML5 UI" was that running directly on the TiVo, which gives javascript access to window.tivo and oipf objects, would just work without any additional registration or certificates.
    So far my simplistic experiments with using oipf to display TiVo's content (actually to do almost anything at all) have not been successful much beyond what I've previously posted, but I'm having to guess at so much stuff that I might be using it wrong. Also I'm not spending much time on it.
    I guess I was depending on kmttg to launch the URL, too, so it becomes a much bigger pain to start it up, now.

    What I had in mind was a pseudo-guide of recordings as fake stations mixed with the live tv guide info (kind of like what TiVo Stream 4K appears to do with Internet content). Getting this remote portion to work was just a necessary piece for it to even be worth pursuing at all.

    It'll probably never happen (especially since I keep losing hardware. I have a dead mini, now, and am missing a couple of peanuts, so I have to scavenge from the primary TVs when they're not in use) but it's a fun coding distraction to occasionally get into.
     
  17. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    50,597
    5,884
    Apr 17, 2000
    Nevada
    Yeah I had more plans for pyTivo Desktop but gave up on them once Hydra was released and didn't have PC to TiVo at all. It wasn’t that the plans depended on that functionality just that it showed a lack of commitment to the feature in general and made me feel like future work could possibly be rendered useless by an update. That came to fruition when the Edge was released and didn't support even TiVo to PC transfers. (took some pushing on my part, with the help of Ted on TiVos side, to get them to fix that)

    I hadn’t heard about the kmttg certificate issue, but if that's the case then I fear community development of TiVo software is coming to an end. I think that once Rovi took over all their plans for 3rd party development just got dropped and whatever we have access to now is just legacy code that's one update from being disabled or broken.
     

Share This Page