18

I have a TV as secondary PC monitor and console output, and I would like to build something to control it from the PC sources—turning on and off, volume and such. In short, a program to emulate my TV remote control.

I have no idea where to start, any suggestion?

Aurora0001
  • 18,520
  • 13
  • 55
  • 169
mejillonius
  • 191
  • 1
  • 1
  • 4

3 Answers3

12

You can do this a little easier (missing out the hardware building) by using something like a RedRat USB Ir blaster (http://www.redrat.co.uk/products/). They also do network attached versions that you can control via ethernet.

Another option is direct serial port control, LG TV's used to come with a RS232 port on the back that you could use to turn the TV on/off, change channel and input. Newer versions tend to have a USB socket on the back that you can plug a USB to serial adapter to do the same (though the last time I tried I could not turn the TV on from standby as the USB port got powered off). https://www.hardill.me.uk/wordpress/2010/02/26/a-different-kind-of-tv-remote-control/

Sony TV's that include Android TV have a Network API that you can use to control them. (nodejs library to control Sony Bravia with Android TV https://github.com/alanreid/bravia)

And finally there is HDMI CEC control, this is an extension to the HDMI spec that allows channel changes and other control over the HDMI cable. A raspberry pi can be set up to send these signals (https://www.raspberrypi.org/forums/viewtopic.php?t=15749). If you have the right HDMI CEC enabled graphics card you may be able to do this from a normal PC.

hardillb
  • 12,813
  • 1
  • 21
  • 34
10

It depends on you skills and what exactly do you want to achieve. First of all it's wondering if you want a UI or a terminal-like script.

If you want a UI, and know Python, I'd go with QT or TK to create the interface. Then, use Serial to send messages to any MCU (Arduino or similar) and read those messages in the MCU. Once you got the message you can send the proper signal with an IR emitter.

To get the proper codes to send, you can either look for the codes online (rather difficult to find) or get a IR receiver and read the codes.

If you want a solution that uses your smartphone, you can use Blynk to control the monitor from whenever in the world. The process will be similar to the computer part, but, create the UI will be as simple as drag and drop.

Aurora0001
  • 18,520
  • 13
  • 55
  • 169
Luis Diaz
  • 814
  • 7
  • 10
6

There are generally 2 ways to control TVs:

  1. IR
  2. RS-232

Newer TVs might have Ethernet or Wi-Fi connections available, and also some level of support for CEC. You might be able to control them over the network with a manufacturer-specific app, but probably not via a documented protocol. CEC control was very spotty when it came out. I'm not sure if it's gotten more robust in the past couple of years.

There are DIY and commercial options for IR and RS-232. The internet has no shortage of DIY guides for Arduinos and Raspberry PIs over IR.

In the Professional AV field, RS-232 control is what's most often used. Basically, you open a telnet session on a com port, spew some commands, and the TV does stuff. The protocol documents for the 232 ports are usually available on the manufacturers website, or as part of a users manual, and there's usually a section for the command protocol. You may need a physical adapter for the RS-232 port. For example, 3.5mm to DB9, or RS-232c to DB9. Keep in mind that RS-232 and network based control gives your program feedback, while IR does not.

The OP settled on CEC, but anyone else will need to start with the specific make/model of the TV before you can attempt to figure out what its control options are (IR, 232, network, etc). Commercial TVs always have 232 ports, while residential TVs might or might not.

If you want to futz with ProAV stuff, you can usually get it online for pretty cheap. However, the software is harder to come by. Most often, the manufacturer won't give you their free software unless you're in a business relationship with them. Brands to look for: Savant, Crestron, Extron, Control4, or a company that has a booth at Infocomm (AV tradeshow).

I don't feel like I need a disclaimer, but I do work in Professional AV. Not at any of the companies listed.