Play a video on kodi

Hello, I have went through the search results, but nothing worked…
I have made a fake fireplace using an old screen and kodi. Now I want to integrate it into a scene or something like that, but I can not, for the life of me, figure out how to run it.

This is what I got so far:

alias: Fireplace
sequence:  
   - service: media_player.play_media
     data:
       entity_id: media_player.fireplace
       media_content_type: video
       media_content_id: "/home/osmc/Movies/Fireplace 4k.mp4"

I get no errors, but no results either… The file seems to be in the right place, unless it is actually in some other folder…
Any ideas?

Thanks.

Well apparently I didn’t need the quotes. The correct code was:

lias: Fireplace
sequence:
  - service: media_player.play_media
    data:
      media_content_type: video
      media_content_id: /home/osmc/Movies/Fireplace 4K.mp4
    target:
      entity_id:
        - media_player.fireplace
        - media_player.fireplace
mode: single

I put it here in case someone else wants to play a file from internal memory on Kodi.

1 Like

Resurrecting this old thread since it is very similar to what I’m trying to do.

My goal is to have HA trigger different large files from the local Kodi storage and avoid streaming large files over the network.

I’ve got Kodi setup on a Raspberry Pi and fully integrated in HA. I’m able to play the files from the Kodi UI and I’m even able to play media from my home assistant media library on the Kodi Pi.

Here’s my service call:

service: media_player.play_media
data:
  media_content_id: /home/osmc/Videos/mermaid-clip.mp4
  media_content_type: video
target:
  entity_id: media_player.tinytest

When I call this, the Kodi UI blinks for a split second but never plays the file.

Is this possible? Does anyone know what the path is? I’m on Kodi 18.9 Leia (because I’m using a Pi Zero W)