Dear all,
I am running up to date OSMC release on RPi2. It works just great and stable.
OSMC over HDMI CEC control from my TV (Panasonic TH-37PX80E) remote control works also OK.
I tried the opposite direction and control also my TV using CECclient from RPi side: echo ‘standby 0‘ | cec-client –s RPI & echo ‘on 0‘ | cec-client –s RPI also works just OK and I am able to turn on and standby my TV (however this kind of control disconnects xbmc CEClib so I try to use xbmc buit-in fuctions to control TV over CEC (http://kodi.wiki/view/List_of_built-in_functions)).
I have created some scripts scenarios using xbmc python scripts to control TV on/off depending of the file type (scenarios when xbmc.Player().isPlayingVideo() shall turn on my TV, when xbmc.Player().isPlayingAudio() I want push my TV into standby mode).
I can successfully turn on my TV sending xbmc.executebuiltin(‘CECActivateSource’) from my xbmc script.
However xbmc.executebuiltin(‘CECStandby’) and xbmc.executebuiltin(‘CECToggleState’) does not work at all.
Does anybody have an experience with those built-in functions whether working properly please? (I have of course enabled on my Panasonic TV Viera link remote on and standby features).
I am not sure if this is a problem of my TV support or some problem with CECStandby and CECToggleState xbmc built-in functions in OSMC (again, from CEC client I can control TV on and standby).
I have a Samsung TV and I’m experiencing a similar issue.
I’ve attempted to create a main menu shortcut called “TV off” which issues the command CECStandby(), but nothing seems to happen when this main menu item is selected.
The TV does correctly power up when a button is pressed on my keyboard, and Kodi responds to the TV’s remote, so the CEC connection seems fine.
I’m sorry I don’t have an answer, but I join you in looking for one.
I’m having the same issue. CEC standby and toggle used to work on Raspbmc but a few months ago my previously functioning scripts stopped working. I was hoping the switch form Raspbmc to OSMC would fix the issue but no luck.
Edit: I tried running echo "standby 0" | cec-client -s
from the command line and the tv turns off so it appears to be an issue within osmc/kodi.
The log file shows it executing but the command seems to go to a black hole because the TV is still on after.
‘DEBUG: ToggleDeviceState - putting CEC device on standby…’
I have the same problem. After using custom cec-client command the TV remote stop operate the OSMC. Can somebody help to re enable it please? …Sometimes it reenable after a long period but it is not sufficient for my intends:)
If anybody with the same issue… web search showed me two or three similar topics.
I checked KODI 14 and libcec2 and there is not a nice solution for this in the present. Kodi auto reconnects cec on wake without custom possibilities.
I disabled the native kodi cec input and I am using my own solution. On the end of this week I can provide the solution for Panasonic Viera… if there is an interest
More possibilities will come with libcec3, which comes with KODI 15. I think its waste of time to prepare a native solution for libcec2, KODI 14.
If KODI 15 will miss wider cec possibilities I can prepare a proper patch for KODI… if there is an interest
Hello, I’m having the same problem with Panasonic. When i try to use my remote control it gives ‘’ Feature is not available’’ message. Could you tell me about your solution?
Hello, my issue was that cec works great with OSMC but after using cec-client from command the remote control stopped working with OSMC.
Does following command show you the CEC devices?
echo "scan" | cec-client -s -d 1
If not, you have different issue.
After previous post I slightly change my mind because I found this , which is great for my intention.
A few important features not implemented yet so I added methods like “cec.set_active_source()” and a few more…
I also inspired in this simple daemon. …I thought that different tv brands have different key codes… apparently not:) Using uinput, remote control works well.
Finaly, I am writing python script (called from autoexec.py), using class xbmc.Monitor(), Player(), … described here. The script also turn on and off different hdmi devices and many others.
Is there already a solution.
I’d like to turn off the TV without losing control over CEC afterwards.
“kodi-send --action=“CECStandby”” doesn’t work at all.
There is a new Yatse feature to turn off and on the TV. Activating the TV via CEC and Yatse works, standby doesn’t.
Above works with the April OSMC release. I remember cec-client was broken some time Q3 2015 (if you refer to cec-client not working as the python import issue). I’ve solved this by explicitely calling cec-client from /usr/osmc/bin/cec-client. See also Cec-client - November update - #8 by amos
Just stumbled upon the same problem even though years later. I got it to work by altering the XML file stored in home/osmc/.kodi/userdata/peripheral_data/.
Change <setting id="standby_devices" value="231" /> to <setting id="standby_devices" value="36037" /> and then reboot. 36037 seems to be the ID of the TV. After this change i can call the built in function ‘CECStandby’ and the TV turns off.