Standby.py not sending cec standby command

I have been busy tweaking my Vero 4k+ box and a have come so far until I got stuck on this issue.

Before I explain, I did read the 2 topics that contain this problem:

I have made an standby.py scripts that contains the following:
import xbmc xbmc.executebuiltin('XBMC.CECStandby')

But the tv does not turn off. Why not?

I know cec is working, if I wake vero/kodi then the tv turns on and if i run this command echo "standby 0" | cec-client -s the tv turns off. So I think kodi does not execute the command?

Kodi does execute the standby.py, I can see that in de kodi log.

The wake.py works fine.

Can you guys help me?

It’s hard to tell without seeing the Kodi log.

In settings>system>input>peripherals>CEC adapter> is “devices to power off during shutdown” set correctly?

Continuing the discussion from Standby.py not sending cec standby command:

Here is the log:

2020-04-01 18:24:36.054 T:4069347328   DEBUG: HandleKey: long-escape (0x100f01b) pressed, action is suspend
2020-04-01 18:24:36.068 T:4069347328  NOTICE: Activating standby mode
2020-04-01 18:24:36.068 T:4069347328    INFO: Activating Vero standby mode
2020-04-01 18:24:36.068 T:4069347328    INFO: Toggle standby state is sleeping
2020-04-01 18:24:36.068 T:4069347328    INFO: CApplication::ToggleStandby -- Toggle TMDS clock to 0
2020-04-01 18:24:36.069 T:4069347328    INFO: CApplication::ToggleStandby -- Toggle LED brightness to 0
2020-04-01 18:24:36.069 T:4069347328    INFO: CApplication::ToggleStandby -- governor will now be powersave
2020-04-01 18:24:36.075 T:4069347328    INFO: CApplication::ToggleStandby -- HPD locking will now be hpd_lock1
2020-04-01 18:24:36.077 T:4069347328  NOTICE: CApplication::ToggleStandby -- checking for existence of /home/osmc/.kodi/userdata/standby.py
2020-04-01 18:24:36.078 T:4069347328  NOTICE: CApplication::ToggleStandby -- script /home/osmc/.kodi/userdata/standby.py found
2020-04-01 18:24:36.080 T:3599758048   DEBUG: Thread LanguageInvoker start, auto delete: false
2020-04-01 18:24:36.082 T:4069347328   DEBUG: ------ Window Deinit () ------
2020-04-01 18:24:36.085 T:3599758048    INFO: initializing python engine.
2020-04-01 18:24:36.085 T:3599758048   DEBUG: CPythonInvoker(4, /home/osmc/.kodi/userdata/standby.py): start processing
2020-04-01 18:24:36.113 T:4069347328   DEBUG: ------ Window Init () ------
2020-04-01 18:24:36.125 T:4069347328   DEBUG: CAddonSettings[screensaver.xbmc.builtin.dim]: loading setting definitions
2020-04-01 18:24:36.126 T:4069347328   DEBUG: CAddonSettings[screensaver.xbmc.builtin.dim]: trying to load setting definitions from old format...
2020-04-01 18:24:36.129 T:4069347328   DEBUG: ------ Window Init () ------
2020-04-01 18:24:36.162 T:4069347328   DEBUG: Keyboard: scancode: 0x01, sym: 0x001b, unicode: 0x001b, modifier: 0x0
2020-04-01 18:24:36.443 T:3610243808   DEBUG: Previous line repeats 5 times.
2020-04-01 18:24:36.443 T:3610243808   DEBUG: Thread Timer 3610243808 terminating
2020-04-01 18:24:36.459 T:4069347328   DEBUG: Keyboard: scancode: 0x01, sym: 0x001b, unicode: 0x001b, modifier: 0x0
2020-04-01 18:24:38.697 T:3599758048   DEBUG: Previous line repeats 1 times.
2020-04-01 18:24:38.697 T:3599758048   DEBUG: -->Python Interpreter Initialized<--
2020-04-01 18:24:38.698 T:3599758048   DEBUG: CPythonInvoker(4, /home/osmc/.kodi/userdata/standby.py): the source file to load is "/home/osmc/.kodi/userdata/standby.py"
2020-04-01 18:24:38.699 T:3599758048 WARNING: CPythonInvoker(4): Script invoked without an addon. Adding all addon modules installed to python path as fallback. This behaviour will be removed in future version.
2020-04-01 18:24:38.796 T:3599758048   DEBUG: CPythonInvoker(4, /home/osmc/.kodi/userdata/standby.py): setting the Python path to /home/osmc/.kodi/userdata:/usr/lib/kodi/addons/script.module.elementtree/lib:/usr/lib/kodi/addons/script.module.osmccommon/lib:/usr/lib/kodi/addons/script.module.osmcsetting.apfstore/lib:/usr/lib/kodi/addons/script.module.osmcsetting.logging/lib:/usr/lib/kodi/addons/script.module.osmcsetting.networking/lib:/usr/lib/kodi/addons/script.module.osmcsetting.remotes/lib:/usr/lib/kodi/addons/script.module.osmcsetting.services/lib:/usr/lib/kodi/addons/script.module.pil/lib:/usr/lib/kodi/addons/script.module.pycryptodome/lib:/home/osmc/.kodi/addons/script.module.xmltodict/lib:/usr/lib/python2.7:/usr/lib/python2.7/plat-arm-linux-gnueabihf:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload:/usr/local/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages/PILcompat:/usr/lib/python2.7/dist-packages/gtk-2.0
2020-04-01 18:24:38.797 T:3599758048   DEBUG: CPythonInvoker(4, /home/osmc/.kodi/userdata/standby.py): entering source directory /home/osmc/.kodi/userdata
2020-04-01 18:24:38.800 T:3599758048    INFO: CPythonInvoker(4, /home/osmc/.kodi/userdata/standby.py): script successfully run
2020-04-01 18:24:38.801 T:3599758048   DEBUG: onExecutionDone(4, /home/osmc/.kodi/userdata/standby.py)
2020-04-01 18:24:38.824 T:4069347328   DEBUG: ToggleDeviceState - putting CEC device on standby...
2020-04-01 18:24:38.827 T:3599758048    INFO: Python interpreter stopped
2020-04-01 18:24:38.828 T:3599758048   DEBUG: Thread LanguageInvoker 3599758048 terminating

And I will double check de cec settings. But I don’t do a shutdown, I’m using suspend…

EDIT: OK,

Was the solution! Thanks you! Never thought off it because it said shutdown and not suspend…

Topic can be closed :smiley:

Glad you that worked for you. We prefer to keep topics open and just mark them as solved.