Plex "stop playback" and provide message

When I am stopping playback on Plex using mobile app (Plex Dash or Tautulli Remote), it provides ability to send message, which will be visible by user in Plex itself simultaneously with termination of the stream. It is really useful feature to provide context to user, why he was stopped.

I am currently configuring automatic Plex stream termination, using Home Assistant schedule helper. How can I add this message from Home Assistant?

Thank you in advance.

You are going to have to provide code in order to get help with it. I don’t know anything about what you are doing, but no one will be able to help if all you have is ‘I want to do this thing with a schedule helper’.

How to help us help you - or How to ask a good question.

You have amazing answer “I don’t know what you are talking about, so no one can help you.”

Here is a code, which does not do what I want:

alias: Stop playback at 23
trigger:
  - entity_id: media_player.plex_player
    platform: state
    to: 'playing'
action:
  - data: {}
    entity_id: media_player.plex_player
    service: media_player.media_stop
initial_state: true
mode: single

If I had code which is doing what I want, I would not ask here for help.

The question is: Is there ability to stop Plex playback with message, same as done in other Plex server management applications…

1 Like

Found workaround using Tautulli and its API:

  1. Find session_key using get_activity API
    https://github.com/Tautulli/Tautulli/wiki/Tautulli-API-Reference#get_activity

  2. Terminate session using this session_key using terminate_session API
    https://github.com/Tautulli/Tautulli/wiki/Tautulli-API-Reference#terminate_session
    “message” can be provided here as argument.

But I feel that it is a hack — I am using separate server (Tautulli), REST commands and loops to make functionality which should be accessible directly from Home Assistant.

1 Like