Media player - play plex playlist repeat

Hi All,

I’ve pulling my hair on this and realised that seems like this feature is either not working or not available as yet. I hope I’ve put this within the right category.

I’m just trying to play some sleeping lulaby for my kids on repeat.
I found the easiest way to play the whole album is to use plex playlist as the default media player playing from folder/DLNA doesn’t seems to be playing all the songs within the folder.

Anyway, here where I’m up to now. Apologise if this doesn’t seems to be much of a progress as I’m quite new with HA and yaml in general.

‘’’’’’’’’’’’’’’’’’’’’’’’’’’’’’
alias: Play Sleeping Song
description: ‘’
trigger: []
condition: []
action:

  • service: media_player.play_media
    target:
    entity_id: media_player.sunny
    data:
    media_content_id: plex://71978
    media_content_type: playlist
    metadata:
    title: 'test ’
    thumbnail: /api/plex_image_proxy/39d9b5a614ae8d5fd29fe2e448bc7dcb0ef464cf/71978
    media_class: playlist
    children_media_class: track
    navigateIds:
    - {}
    - media_content_type: plex
    media_content_id: ‘’
    - media_content_type: playlists
    media_content_id: plex://all
    - media_content_type: playlist
    media_content_id: plex://71978
  • repeat:
    count: 2
    sequence: []
    mode: restart
    ‘’’’’’’’’’’’’’

This repeat at the end, doesn’t seems to be doing the job.
If anyone can advise on another way e.g. using script or template, please advise and be gentle with me :sweat_smile: :laughing:

I’ve messed with this for a few minutes.

The transport functions that iv’e tested to work:
Start, Stop, Pause and Volume

The transport functions that iv’e tested NOT to work:
Repeat, Restart, Shuffle, and Skip.

Thanks @ServiceXp - so i guess it’s broken? I’m wondering if there’s a python script that I can use for this?

Not sure I would call it broken, probably just not completely built out yet. At least that’s what I’m hoping :wink:

Can’t answer your question, hopefully a programmer will chime in.

Volume up and Volume down also works.

I’ve managed to get it working using node-red. Got rather tired waiting for this :slight_smile:
let me know if you’ve got node-red, if not, install it and I’ll let you know what I’ve done.
Node-red is a best thing after a slice of bread in my opinion.
I came from hubitat and was using node-red for most of my automation…never failed me…
the only thing that ever failed me was my own brain not being able to work the logic out… :rofl:

Could you please share how you managed to set repeat with node red please? I do agree it’s the best thing. thanks

@obaldius here how I did it.

  1. first I created a playlist in plex
  2. in HA - I created a normal playmedia script where I selected which player that will play and select the playlist that I just created
  3. then in node red, I use poll state and put the entity ID of the media player in question with update interval 60 secs
  4. if state is idle then I link it with calling service (calling the script)
  5. I then added time range of when I want to play this, so when it’s outside of that window, I link it to stop media player via the built in HA.
    so it looks something like this. Hope that helps

1 Like

Hello everyone, I’m trying to figure out a way to loop a single video, that is locally stored on a PC and played through Plex in order to have it displayed on a tv constantly, lets say as an ad for something. I’ve been looking for a solution to this all over the web with no success. A repeat option is nowhere to be found. Also I have near to zero coding knowledge but if someone confirms there is a way to achieve this with a node red function, then I’m open to your opinions and suggestions!