Power ON WebOS TV

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

Same thing for me, not sure how to fix this. Might try ethernet later this week and let you know how that works. Very disappointing that the nic doesn’t keep power for this reason especially since WOL works, defeats the purpose if you ask me…

I’ve tried using Ethernet and found no difference. For now I have enabled CEC so turn on TV via hdmi as rarely just power on TV on its own. I agree it’s a poor workaround but I think fault is in TV side.

Yeah seems like I’m going to have to do the same thing, normally I use my TV with either my xbox or freeview box so I guess using HDMI CEC to turn it on will work for now. A software update would be nice to keep power to the NIC… Cough LG cough.

Edit: NVM I’m an idiot didnt have Mobile TV turned on

I’m trying to troubleshoot something on my WebOS and just curious, are you unable to get the TV to turn on/off at all or just within a script?

i can turn my tv on/off within the front end’s component:
webos

it works great. however when trying to run a script to turn the tv on (media_player.turn_on) it is unresponsive.
anyone have any ideas? am i writing the script incorrectly??

  sequence:
    - service: media_player.turn_on
      data:
        entity_id: media_player.bedroom_tv

I can turn it in and off, however after a 30 min in standby I’m unable to turn it on again. Guessing the network card is not being powered or something.

Is this on ethernet or wireless?