2018-01-14, 02:33
Hi folks,
before I go deep trying to troubleshoot this I figured i'd post.
Setup is OSMC on an rPi2 with a Vizio D series (super cheap)
I am working on a python script which (at the end) turns off my TV via CEC. Unfortunately, the command to turn it off (cecstandby) doesn't seem to work. Of course, there are millions of reason that cec might not work, BUT...
I have a script that just hits each command in order:
And, here is the log: (timestamps help sync it up w/ my script)
When the first part of the script runs, I see the TV's OSD pop up (showing that it has been activated), or if the TV is off it will actually turn it on again. But, the toggle state and standby command do nothing.
I suspect that everything in the CEC configuration is fine, but the TV just doesn't support being put into standby from CEC. Will someone else agree with me so I dont go down a huge rabbit hole? : )
before I go deep trying to troubleshoot this I figured i'd post.
Setup is OSMC on an rPi2 with a Vizio D series (super cheap)
I am working on a python script which (at the end) turns off my TV via CEC. Unfortunately, the command to turn it off (cecstandby) doesn't seem to work. Of course, there are millions of reason that cec might not work, BUT...
- CEC from the TV->Kodi works great (remote can move around in menus, etc)
- the command to the the tv ON (cecactivatesource) does work!
I have a script that just hits each command in order:
python:time.sleep(10)
xbmc.executebuiltin('XBMC.CECActivateSource')
time.sleep(10)
xbmc.executebuiltin('XBMC.CECToggleState')
time.sleep(10)
xbmc.executebuiltin('XBMC.CECStandby')
time.sleep(10)
quit()
And, here is the log: (timestamps help sync it up w/ my script)
Code:
16:28:10.212 T:1925683712 DEBUG: ToggleDeviceState - waking up CEC device...
16:28:10.213 T:1765798656 DEBUG: CecLogMessage - Recorder 1 (1) was already marked as active source
16:28:10.213 T:1765798656 DEBUG: CecLogMessage - >> source activated: Recorder 1 (1)
16:28:10.214 T:1765798656 DEBUG: CecLogMessage - sending active source message for 'Recorder 1'
16:28:10.214 T:1765798656 DEBUG: CecLogMessage - << powering on 'TV' (0)
16:28:10.214 T:1765798656 DEBUG: CecLogMessage - << 10:04
16:28:10.274 T:1765798656 DEBUG: CecLogMessage - << Recorder 1 (1) -> broadcast (F): active source (1000)
16:28:10.274 T:1765798656 DEBUG: CecLogMessage - << 1f:82:10:00
16:28:10.394 T:1765798656 DEBUG: CecLogMessage - << Recorder 1 (1) -> TV (0): menu state 'activated'
16:28:10.395 T:1765798656 DEBUG: CecLogMessage - << 10:8e:00
16:28:10.641 T:1765798656 DEBUG: CecLogMessage - >> 01:46
16:28:10.641 T:1765798656 DEBUG: CecLogMessage - << Recorder 1 (1) -> TV (0): OSD name 'Kodi'
16:28:10.641 T:1765798656 DEBUG: CecLogMessage - << 10:47:4b:6f:64:69
16:28:10.641 T:1765798656 DEBUG: CecLogMessage - >> TV (0) -> Recorder 1 (1): give osd name (46)
16:28:20.167 T:1925683712 DEBUG: ToggleDeviceState - putting CEC device on standby...
16:28:20.171 T:1765798656 DEBUG: CecLogMessage - << putting 'TV' (0) in standby mode
16:28:20.172 T:1765798656 DEBUG: CecLogMessage - << 10:36
16:28:28.355 T:1521738496 DEBUG: Thread JobWorker 1521738496 terminating (autodelete)
16:28:28.355 T:1695544064 DEBUG: Thread JobWorker 1695544064 terminating (autodelete)
16:28:29.599 T:1712321280 DEBUG: script.module.osmcsetting.updates : - blurp 370 - DialogBusy.xml
16:28:30.231 T:1925683712 DEBUG: ToggleDeviceState - putting CEC device on standby...
16:28:30.234 T:1765798656 DEBUG: CecLogMessage - << putting 'TV' (0) in standby mode
16:28:30.234 T:1765798656 DEBUG: CecLogMessage - << 10:36
16:28:40.193 T:1530913536 INFO: CPythonInvoker(11, /home/osmc/.kodi/addons/plugin.program.cectester/addon.py): script aborted
16:28:40.222 T:1530913536 INFO: Python script stopped
When the first part of the script runs, I see the TV's OSD pop up (showing that it has been activated), or if the TV is off it will actually turn it on again. But, the toggle state and standby command do nothing.
I suspect that everything in the CEC configuration is fine, but the TV just doesn't support being put into standby from CEC. Will someone else agree with me so I dont go down a huge rabbit hole? : )