Stream video to media player

Hi everyone, I have several IPcam d-links that are regularly viewed by HA under the MJPEG platform with which I can view the video live both with a card and with the excellent motionEYE. Now I wanted to create an automation that, detected a movement by a camera, sent a video stream to a TV or to an ECHO Show.
I made an RTSP stream as follows:

  • platform: generic
    still_image_url: http: //192.168.X.XX/jpg/image.jpg
    stream_source: rtsp: 192.168.X.XX: 554 / live1.sdp
    username: *******
    password: *************
    I can play it on a card, but when I try to send it to a media_player with this script (created through the UI):
    ā€˜1584959344743ā€™:
    alias: Stream
    sequence:
    • data:
      media_player: media_player.studio
      entity_id: camera.generic_camera
      service: camera.play_stream
      where media_player.studio is an echo show 5
      nothing is happening.
      I state that, after launching the script, no errors appear in the log and that the echo show works regularly if a message is sent to be reproduced via notify.
      I also tried to send the stream to an LG TV that I can control via HA, but also in this case no results.
      Any help very appreciated.

Greetings from Italy :it:

1 Like

I really want to be able to do something similar and having trouble figuring it out.
I have HIKVision cameras that stream perfect to a card using a manual config

# HIK Cameras
camera:
  - platform: generic
    still_image_url: http://192.168.X.X/ISAPI/Streaming/channels/101/picture
    stream_source: rtsp://notmyusername:[email protected]:10554/Streaming/Channels/101/
    username: notmyusername
    password: notmypassword
    authentication: digest
    name: Cam: 1

I also tried ffmpg platform but that also only worked on card, would not stream to media_player.lg_oled

# HIK Cameras
camera:
  - platform: ffmpeg 
    input: rtsp://notmyusername:[email protected]:10554/Streaming/Channels/101/
    name: testffmpgcam

Iā€™m trying to find out what other options there are for streaming to media player, and ability to change the format, or make home assistant look more like DLNA or mirracast or something that I KNOW works with my Rokus, TVs, etc.

2 Likes