I solved basically the same problem by programming a PIC mcu to control my VCR/DVD recorder.
My older HD/DVD recorder was not able to receive DTV signals, only analog channels, but I didn't want to throw it away and pay big $$$ for a new recorder(the fact is, the digital TV coding standards themselves have changed three times in 5-yrs) that would only have to be replaced in less than two years again by yet a newer model that could handle the changing DTV video standards for TV channels.
I use the original DTV receiver remote control to program the digital TV receiver to turn on at the desired time and correct channel and then it will also turn off after the program is complete. The digital TV box connects by SCART cable to my old HD/DVD recorder. My PIC chip detects when the receiver box is on by sensing if the DTV Power LED is on and then sends simulated remote commands by wire cable to the HD/DVD recorder's infrared remote receiver's output pin to tell it to turn on, select external input going to the receiver box and start to record. When the receiver box turns off automatically, the PIC chip detects the Power LED going off and then sends the hardwired simulated remote signal to the HD/DVD recorder to turn it off as well.
It was a little bit of work, but it works well. The entire breadboarded PIC circuit fits easily into the DTV receiver's box and gets its power from the DTV power supply. It sends the simulated remote signals to a wired connector outside the DTV box that mates with the connector hack wiring into the HD/DVD recorder.
It was all made easy with a digital storage scope that could clearly display the remote control signals picked up by the HD/DVD recorder, so I could program the PIC chip to synthesize them.
Newer DTV boxes support USB PVR recording that can eliminate the need for a HD/DVD recorder, but I find the software and remote controls provided for PVR playback no fun to use compared to the smooth operation and feel-nice to-use-to-the-fingers original remote control (conveniently placed large soft buttons and good pause effects etc.) that came with my older HD/DVD recorder..