Stop playback on TV switch-off

Hi,
I want to make the following work:
when I play channel from PVR or simply watch movie and I turn off the TV then playback stops. I’ve mapped some buttons with keymap (red, green etc.) successfully, but I can’t map the poweroff button.

For example when my TV is power off:

DEBUG: CecLogMessage - >> 0f:36
DEBUG: CecLogMessage - >> TV (0) -> Broadcast (F): standby (36)

For example when I press yellow button the log is following (and i can map it successfully):

DEBUG: CecLogMessage - >> 01:44:74
DEBUG: CecLogMessage - SetCurrentButton F4 (yellow) (74) D:0ms cur:74
DEBUG: CecLogMessage - key pressed: F4 (yellow) (74) current(ff) duration(0)
DEBUG: CecLogMessage - Changed key F4 (yellow) (74) D:0ms cur:ff
DEBUG: CecLogMessage - key pressed: F4 (yellow) (74, 0)
DEBUG: PushCecKeypress - received key fd duration 0 (rep:0 size:0)
DEBUG: PushCecKeypress - added key fd
DEBUG: CecLogMessage - CheckKeypressTimeout T:2251.418
DEBUG: CecLogMessage - Key F4 (yellow): idle (duration:0) (74) timeout:500ms (rel:500,rep:0,prs:1,rel:0)
DEBUG: CecLogMessage - >> TV (0) -> Recorder 1 (1): user control pressed (44)
DEBUG: OnKey: 253 (0xfd) pressed, action is ActivateWindow(10610)
DEBUG: Activating window ID: 10610

I’ve tried with the following but with no success:

  <standby>Stop</standby>

or

 <key id="36">Stop</key>

Thanks for help!

that’s an interesting idea!

subscribed to the thread :slight_smile:

If you have debug on, and you don’t see an OnKey message as in your first post, then you probably won’t have mapped it.
Some of those TV remote keys just don’t get passed through - it depends on the whims of the TV maker
Derek

Yes, I know i didn’t map this, beacuse I even don’t know how to do this properly. When I press some buttons there is nothing on CEC log, but afert switching off TV it gives me 2 lines info so powering-off is noticeable by software. I just don’t know how to use it for mapping.

Does this not accomplish what you seek?

I tried this option with no success :disappointed:

Not currently supported. There was a pull request but it is not complete.