Power ON WebOS TV

Hello!

I’ve been wanting to enable home assistant to turn on my webos 2.0 tv (2014 model). At the moment, all I can do is pause/play, volume up/down/mute, skip previous/next, specify sources, and turn off. I can’t even change the channel (would that be possible?).

I’ve tried playing around with the wake on lan component, but I can’t get that to turn on my TV.

Any suggestions?

Thanks! :slight_smile:

1 Like

hey enricfp1,

That isn’t possible, the webos platform switches off the network/ip stack when in standby. :disappointed:

You can only boot the tv from ir of using hdmi (cec). If you have a raspberry pi or another hdmi device connected to your tv, you should be able to boot the tv using the hdmi device by making the device active. The TV should wake up and switch to the hdmi input you just made active.

Switching channels should also be possible. The underlying lib that home assistant uses for controlling the tv supports it, but I don’t know whether it is implemented in home assistant.

Thanks for the reply! :smiley:

What do you mean by making the device active? Can you give me a quick example?

By the way, I’m using a raspberry pi 3, so HDMI shouldn’t be an issue.

E.g. just pressing a button on the remote of the raspberry should do the job.

What software do you have running on the pi? Be sure to turn on SIMP-Link in the settings of your tv (LG’s version of cec)

I installed HA with the all-in-one installer. Not sure if CEC is already setup or if I should install LIBCEC?

I’m sorry, I’m a bit lost with this… I didn’t even know hdmi cec existed! Looks a bit complex to set it up, though. Don’t want to mess anything up by making a mistake.

ohw thats even easier: follow this guide

Don’t know if the raspberry does have libcec installed by default, but setting it up looks not that difficult :slight_smile:

Edit: it seems libcec is not installed by default; but you should be able to apt-get it:

sudo apt-get update
sudo apt-get install libcec3

Hmmm… I installed libcec3 with apt-get install. It installed well. I then did:

sudo ln -s /usr/local/lib/python3.4/dist-packages/cec /srv/hass/hass_venv/lib/python3.4/site-packages

I then added the following to my configuration.yaml file:

hdmi_cec: devices: 4: Pi3

Restarted Home Assistant and now I’m getting this in the log:

homeassistant.components.hdmi_cec: libcec must be installed

Edit: I just tried to reboot and when it started back up, my TV automatically switched to HDMI 4. So I’m assuming libcec is working on the pi3, but home assistant can’t see it?

EDIT: looks like it’s more work than I though, but you should be able to compile from source.

https://www.domoticz.com/forum/viewtopic.php?t=10938

Is the most recent I could find at google. This guide is for another home automation program; follow the link above when you reach step 4.

The paths are ok. I did notice that the directory cec is not in the first path, but it does exist as an alias in the hass environment. So, I’m now thinking that I need that cec file… Any idea why it’s not in the first path?

Wel the python bindings should be in the first path (the command created a symlink pointed to the first path in the second)

So my first guess is that the required python bindings for libcec were not installed

I would suggest that you start over by removing libcec ‘sudo apt-get remove libcec3’ and follow one of the many guides: Issue with HDMI_CEC component

It works now! :smiley:

I just did the following

sudo apt-get install cmake liblockdev1-dev libudev-dev libxrandr-dev python-dev swig cd git clone https://github.com/Pulse-Eight/platform.git mkdir platform/build cd platform/build cmake .. make sudo make install cd git clone https://github.com/Pulse-Eight/libcec.git mkdir libcec/build cd libcec/build cmake -DRPI_INCLUDE_DIR=/opt/vc/include -DRPI_LIB_DIR=/opt/vc/lib .. make -j4 sudo make install sudo ldconfig

Restarted HA and now it’s all working well. Now I just need to add a button to the front end? :stuck_out_tongue:

Thanks a million. You helped me quite a lot. I really appreciate it!

Just in case anyone who wants to duplicate this, this is exactly what I did in order (each line is a command):

sudo apt-get install libcec3 sudo ln -s /usr/local/lib/python3.4/dist-packages/cec /srv/hass/hass_venv/lib/python3.4/site-packages sudo apt-get install cmake liblockdev1-dev libudev-dev libxrandr-dev python-dev swig cd git clone https://github.com/Pulse-Eight/platform.git mkdir platform/build cd platform/build cmake .. make sudo make install cd git clone https://github.com/Pulse-Eight/libcec.git mkdir libcec/build cd libcec/build cmake -DRPI_INCLUDE_DIR=/opt/vc/include -DRPI_LIB_DIR=/opt/vc/lib .. make -j4 sudo make install sudo ldconfig

After all of that, I added the following to the configuration.yaml file (keep in mind that I added the number 4 because it’s my 4th HDMI input on the TV. If you’re connecting the hdmi cable into a different input port, specify that number):

hdmi_cec:
  devices:
    4: Pi3

Then restart home assistant.

1 Like

In my case i have the LG WebOS tv connected to a Yamaha rx-v675 receiver… how can i turn the Tv on using HDMI CEC ? Any Idea?

Any instructions if LG is connected to an RPi that is not running HA instance? In my case it’s connected to RPi3 with OSMC installed on it

I turn my LG WebOS TV on via Wake on LAN, tried that?

1 Like

Well… in my case it wont work as i use Wifi for the Tv…

As the TV is connected to KODI - solved the problem via the kodi CEC script.

Yes you can, I do it too :slight_smile: The Wifi is somewhat unreliable, but that is a problem just as often when it is already turned on.

Did any experience issue with WOL for webos?
I noticed after two hours on standby hass was no longer able to turn on my TV (is connected to WiFi).
Works fine once TV is on. Does ethernet connection make a diffrence ?

I have a LG LF590 and connected with an ethernet cable. It is working perfect in Hassio, but only power on will not work.

This is my config:

media_player:
  - platform: webostv
    host: 192.168.XX.XX 
    mac: XX:XX:XX:XX:XX:XX
    name: LG TV

This is on the components page:

Home Assistant is able to turn on a LG webOS Smart TV if you specify its MAC address with mac:. Some models require the Mobile TV On setting and/or a wired network connection to use Wake-on-LAN.

I don’t see the option Mobile TV in the settings. Also, the led on my switch is also off at the port where my tv is plugged in.

1 Like