Cannot force Kodi to open a stream file to view my front camera

I have the strm file here:
image
my Kodi IP is x.x.x.223 as you can see. If I manually open the file in Kodi as seen here, I can view the stream no problem.

the automation is simple, if doorbell rings, turn on the TV, open the strm file for 30seconds, stop, then turn off TV. i have gotten everything to work EXCEPT open stream part. what’s wrong with my yaml?

alias: turn on TV to see front door on LG machine
sequence:
  - data:
      entity_id: media_player.kodi_rpi4
      item:
        file: videos/videos/front_cam.strm
      method: Player.Open
    service: kodi.call_method
  - delay: '30'
  - service: media_player.media_stop
    data: {}
    entity_id: media_player.kodi_rpi4
mode: single

mine looks like this to open the stream directly:

data:
  media_content_id: 'rtsp://usr:[email protected]:554/'
  media_content_type: video
service: media_player.play_media
entity_id: media_player.kodi

And this one opens a stream file on a smb share:

data:
  media_content_id: 'smb://192.168.0.198/Video/Short Clips/Do_You_Love_Me-fn3KWM1kuAw.mkv'
  media_content_type: video
entity_id: media_player.kodi
service: media_player.play_media

As you can see, they are a little different than yours. There is no item/file, but a quoted media content id and type. Also the entity id is not in the data. I would think a local file would also need the file:// descriptor for source type

1 Like

thank you so much for sharing the code. i got it working perfectly with your first example.