Jump to content

How to control multiple RS232 devices (LG TVs)?


Recommended Posts

I'd like to add very basic control for a handful (six) of identical LG TVs. I'm certain the TVs are controllable through both IP and RS232 (LG publishes the communication protocol), and between the two I want to use RS232 for various reasons like the fact that it much more reliably controls on/off functionality.

 

I've got an ISY-994i Pro IR. What other hardware and/or software do I need to control the TVs? I'd prefer not to have to manually implement the RS232 commands, however, I can do that if absolutely necessary (I'd prefer to use an existing library, if it exists).

Link to comment

You'll need either an Ethernet-to-RS232 for each TV, a single device with multiple RS-232 connections and run serial cabling to each TV,

 

What's your budget for additional hardware?

Link to comment

Short answer: ~$500

 

Long answer: it's a value and per-device question. I want to control six units right now, but that could very well expand. Thus I want to understand the per unit cost individually (and as it scales). I wouldn't want, for example, to buy a bunch of http://www.smarthome.com/serialinc-insteon-2410s-insteon-to-2-way-rs232-serial-converter.html because those are slightly too expensive, I don't want PLM in between my nice robust RS232, and they are physically too large for my needs (those are gigantic for what they do). I'd say my per-TV pain threshold _goal_ is $50... but as you can see if I had to get to $100 I'm ok with it. Principles are far more important here than actual dollar amount.

Link to comment

I'm going to ask a really silly question but most of the LG Smart TV's have the ability to be controlled via IP. Why would you use RS-232 with all the wiring, costs, and mounting. When you could put up a RPi middleware to connect and control the very same? If this is about long term reliability all of the TV's have tethered Ethernet besides the WiFi connectivity.

Link to comment

I use Global Cache Flex units for number of years for RS232 control. Very solid. For Flex series you need to purchase additional RS232 harness.  With Ethernet option you will be around $100 total. Wifi version is about $20 more.

Yup, I've looked at the FLEX-IP-P (<- the last P means "Power Over Ethernet capable"), and those are currently $13 more than the unit you linked (which requires USB, or similar, as a power source). Notably powering from USB makes sense since most TVs have plenty of ports on the back, but I want to control the on/off functionality of the TVs themselves and thus I need to make sure the USB ports are not "switched" with the TV power.

 

I also just talked to Global Cache and asked if I could use the GC-100 series for my tasks. The underlying signals from IR are fairly similar to RS232 so it was possibly they developed the 6x IR outputs to actually be RS232 compatible... unfortunately that's not the case and only the DB9 outputs of the GC-100 series can be used.

Link to comment

I'm going to ask a really silly question but most of the LG Smart TV's have the ability to be controlled via IP. Why would you use RS-232 with all the wiring, costs, and mounting. When you could put up a RPi middleware to connect and control the very same? If this is about long term reliability all of the TV's have tethered Ethernet besides the WiFi connectivity.

Not a dumb question at all! While these TVs do speak IP as well, and I specifically bought models that have Ethernet (as opposed to WiFi), it is my understanding that the on/off functionality isn't very good (I can't find my sources or I'd quote them here). I only need to be able to do three things:

  1. Independently and deterministically power on/off the devices (meaning my control device can detect state to confirm the on/off worked). This is by far my most important requirement.
  2. Input control to select between various HDMI sources.
  3. Volume/mute control

I feel like this is a valuable conversation for the community in general, even if someone tells me "hey dummy the LG 65UH6030 can do everything you need over IP control!" ... sooooo ... if anyone feels like that's possible please let me know!

Link to comment

I'm using GC-100 as well. Works fine. However I would advise against using it today. It is old, pretty slow  and allows only single IP connection to the unit at a time. I use  USB powered flex with tiny USB power supply feeding it behind TV. 

Regarding IP vs RS232 -  I do use RS232 to control TV's that do not support IP. I also have  Panasonic IP controlled TV that I control via Simple Control iOS app with IP.  Power On is done via Wake on LAN call.  Since commands are discreet it works fine for my purposes. App tracks states pretty accurately and supports all discreet input, volume, mute commands

Link to comment

Not a dumb question at all! While these TVs do speak IP as well, and I specifically bought models that have Ethernet (as opposed to WiFi), it is my understanding that the on/off functionality isn't very good (I can't find my sources or I'd quote them here). I only need to be able to do three things:

  1. Independently and deterministically power on/off the devices (meaning my control device can detect state to confirm the on/off worked). This is by far my most important requirement.
  2. Input control to select between various HDMI sources.
  3. Volume/mute control

I feel like this is a valuable conversation for the community in general, even if someone tells me "hey dummy the LG 65UH6030 can do everything you need over IP control!" ... sooooo ... if anyone feels like that's possible please let me know!

 

Well you have my full attention and am looking forward to seeing if you identify something rocks solid that just works with the LG Smart TV's. As I have two right now and haven't dived into this too much due to other projects on the go. Also thanks for the clarification on the RS-232 Serial connection issue as I thought there was some primary reason going that route. 

Link to comment

Most hobbyists would just deploy a Raspberry Pi behind each TV set, and then plug in a USB-RS232 adapter to allow the Pi to send serial commands.
 
If you go this route, do not assume you can just plug in multiple similar USB-RS232 adapters and control several TVs from a single Pi.    While this may work temporarily, the numbering is not deterministic; when you have multiple USB-to-serial adapters connected and reboot the Pi, the sequential numbering of each device may change.    Aside from that, USB is usually good enough for 9600-57K serial, as long as you don't need hardware signal lines.
 
If you do want to go with USB serial on a Pi, I suspect you would get better results with a single 8-port USB serial adapter instead of multiple discrete adapters.   Or you can buy a "terminal server", an appliance that does nothing but connect multiple serial devices to Ethernet, see below.
 

Yup, I've looked at the FLEX-IP-P (<- the last P means "Power Over Ethernet capable"), and those are currently $13 more than the unit you linked (which requires USB, or similar, as a power source).

Do you have Ethernet cables to each TV?
 
You could deploy a single central Serial controller and run serial over RJ45 cabling to the TV, using a "serial terminal server".   These usually have a single Ethernet connection and multiple serial ports. Usually configurable to associate each serial port with a different listening TCP port, so when the ISY connections to 10.23.1.1 on port 3001 it controls the first TV, port 3002 the second, etc.     Often these devices can be locked down to only allow specific clients and specific static source IP addresses to use the TCP service, so you can have a little intranet security by only allowing the ISY to connect to the TCP service.

Brand new 8-port serial terminal servers are around $70/port, older models (Livingston Portmaster and very old Cisco gear) can sell for far less on eBay.


There's a fair chance that some of that gear up on eBay is hardware I used to manage.   These old retired "enterprise grade" terminal servers don't have the high-level security that is needed today, but are plenty good enough for home.

 

I used to do more Fortune-500s' data center build outs, mostly security-related gear.   One of the requirements was usually an out-of-band (OOB) management system attached to the serial "console" port that nearly all enterprise-grade hardware appliances shipped with (ISY994 has one too).    OOB management was usually through a "terminal server" on a separate IP network from user traffic.   We started out with Livingston Portmaster (until Lucent retired the product line) then we switched to Cisco, then as cost-cutting measures limited the available budget, customers tried out Digi, Perle, etc.

 

The really old gear still has some life left in it, but you might need to get used to replacing capacitors.

Link to comment

Not a dumb question at all! While these TVs do speak IP as well, and I specifically bought models that have Ethernet (as opposed to WiFi), it is my understanding that the on/off functionality isn't very good (I can't find my sources or I'd quote them here).

 

In other words, you are guessing.

 

Don't guess, know.

 

Have you tried it?

 

Many older TVs with IP connectivity had no means to power-on through the IP interface. Most/all newer devices have fixed this, so that the IP port is either "always on" or can be configured to be "always on".

 

My old Samsung has this issue. I turn it on using IR, and do everything else with IP. Newer Samsung models don't have the problem.

 

I think you may be chasing a non-problem, as - at least in the general case - it is not a matter of "unreliability", but either it works or it does not work. Try it.

Link to comment

Don't guess, know.

 

Have you tried it?

My plan is to test this week. I didn't physically have the TVs until today. I'm totally on board with "don't guess; know" however posting information in forums and getting specific confirmation ahead of time and/or in parallel is helpful to me (e.g. theoretically allows me to preorder hardware I might need so it could arrive all at the same time), and definitely helpful to people in the future or with similar issues. I've looked extensively for an official document with the IP commands and specs, and I have not been able to find it. I've done the same for RS232 and I found those buried inside another doc explaining how you can daiseychain certain TVs to control them from a single serial port!

 

In short: I'm looking for official IP API docs.

Most hobbyists would just deploy a Raspberry Pi behind each TV set, and then plug in a USB-RS232 adapter to allow the Pi to send serial commands.

 

If you go this route, do not assume you can just plug in multiple similar USB-RS232 adapters and control several TVs from a single Pi.    While this may work temporarily, the numbering is not deterministic; when you have multiple USB-to-serial adapters connected and reboot the Pi, the sequential numbering of each device may change.    

 

If you do want to go with this approach, you could get better results with a single 8-port USB serial adapter instead of multiple discrete adapters.   Or you can buy a "terminal service", an appliance that does nothing but connect multiple serial devices to Ethernet, see below.

 

Do you have Ethernet cables to each TV?

 

You could deploy a single central Serial controller and run serial over RJ45 cabling to the TV, using a "serial terminal server".   These usually have a single Ethernet connection and multiple serial ports. Usually configurable to associate each serial port with a different listening TCP port, so when the ISY connections to 10.23.1.1 on port 3001 it controls the first TV, port 3002 the second, etc.     Often these devices can be locked down to only allow specific clients and specific static source IP addresses to use the TCP service, so you can have a little intranet security by only allowing the ISY to connect to the TCP service.

 

Brand new 8-port serial terminal servers are around $70/port, older models (Livingston Portmaster and very old Cisco gear) can sell for far less on eBay.

So many good product references - I had no idea. Thanks!

Link to comment

 

 

My old Samsung has this issue. I turn it on using IR, and do everything else with IP. Newer Samsung models don't have the problem.

I have four new Samsung TVs and I can't find a way to turn them on via Ethernet. Will you teach me how?

 

I'm Gary Funk and I approved this message.

Link to comment

I have four new Samsung TVs and I can't find a way to turn them on via Ethernet. Will you teach me how?

 

 

Well, I could swear I read that they fixed this sooner, but better late than never!

 

According to SimpleControl's website, the 2016 Samsung models can be turned on from standby:

 

Samsung has now introduced full IP control models including Power On support as part of their 2016 models. Models prior to 2016 did not support Power On via network control.

 

 

    https://www.simplecontrol.com/knowledgebase/samsung-tv-power-on/

 

Their compatibility list, though, says that SOME 2016 models are so capable:

 

 

Some 2016 models for the first time now support Wake on LAN including at least KS9000 series.

 

I've also seen reference to a late-2015 firmware update that enabled WOL on some models. Presumably, these are 2016 models released late 2015.

 

I'd guess there may be some Setting to enable WOL.

 

----

An alternative is to wake the TV using CEC. Are any of these TVs  connected to a receiver that has IP control? If so, you can probably use the receiver's API to turn on the TV. If the receiver doesn't have an explicit command for that, you might try de-selecting the output to the TV and re-selecting it, which should send the command to turn it on.

Link to comment

I was about to suggest searching GitHub. (GitHub is a site that hosts source code, and MOST open-source projects distribute their source using GitHub.) Reverse-engineered protocols tend to live on GitHub.

 

----

BTW, getting back to the original question - SimpleControl's compatibility list states regarding LG SmartTV:

 

2016 E6/G6 models support Wake on LAN.

 

Link to comment
  • 2 weeks later...

I have  LG B6 and C6 Webos3 OLED and wake on lan works well from the ISY.  The  Github PHP solution does not work nor the Python3 scripts I have found as they are apparently pre-Webos.  I am trying to get the things to turn off with the network module but no luck so far.  If anyone comes up with a solution, please post.  

 

Traveler

Link to comment
  • 3 months later...

I have  LG B6 and C6 Webos3 OLED and wake on lan works well from the ISY.  The  Github PHP solution does not work nor the Python3 scripts I have found as they are apparently pre-Webos.  I am trying to get the things to turn off with the network module but no luck so far.  If anyone comes up with a solution, please post.  

 

Traveler

 

I have LG B6 as well and would like to find a way to control it over IP. I tried the lg.py script with no success. Have you made any progress?

Link to comment

I have LG B6 as well and would like to find a way to control it over IP. I tried the lg.py script with no success. Have you made any progress?

I have! I'm not 100% automated and tested yet, but I'm at like 80% and I'm not sure I'll ever bother to complete that last bit. The "answer" for my use case is unquestionably a Node package called lgtv2. You'll obviously need some networked device that can run a relatively standard install of Node, which for me is a Synology Diskstation that was able to install both Node and the lgtv2 package using zero-customization-required commands.

 

My Syno and all six TVs are connected via wired Ethernet, which is quite helpful to eliminate some of the bridging problems you might have with WOL packages via Wifi. Note that the LG TVs all have varying versions of "energy saver standby mode" and whatnot, which need to be entirely disabled for WOL to work (it is not obvious from the various materials that WOL functionality goes away with energy-saver modes). There also might be some sort of more hardcore sleep mode after a few continuous days of being off where the TVs stop listening to WOL... I've had varying degrees of success waking them up Tuesday mornings after a 3 day weekend... that could be other network shenanigans, though. As a backup plan I've considered GC Flex units... but I haven't executed on that I just use the handheld remote when necessary.

 

The lgtv2 package is a bit cryptic but I found my basic needs for launching the browser and navigating to a URL, then turning off the TV later. If you play around with the library it is quite complete in terms of functionality, but not very well documented in my opinion. One particularly nice benefit is that the library does a very good job of elegantly handling multiple paired devices, which was of particular concern to me (side note: I use Static DHCP so my devices always have the same IP, which is crucial as IP is part of the libraries cryptographic fingerprint storage process).

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...