Stream Component: Confirmed Cameras and Configurations

Nevermind about the above post. I figured out I had IP conflicts on my network. I had assigned the same IP address to one of my TVs and to that particular camera.

EDIT: itā€™s working now! The change I made was to change the subtype from 0 to 1.

I am using a Dahua IP camera and I have tried many things to get it to work. I have confirmed with VLC that the camera is serving an RTSP stream. I have also confirmed with a web browser that the still image URL works.

- platform: generic
  name: test
  still_image_url: "http://192.168.1.X/cgi-bin/snapshot.cgi"
  stream_source: "rtsp://username:[email protected]:554/cam/realmonitor?channel=1&subtype=00"
  username: !secret camera_username
  password: !secret camera_password
  authentication: basic
  verify_ssl: false

I have tried all combinations of ā€œauthentication: basicā€, ā€œauthentication: digestā€, and ā€œverify_ssl: falseā€.

In home assistant, clicking into the camera.test entity just shows the spinning ā€œwaitingā€ icon with a gray background.

There are no error logs being printed in the home assistant logs. Any helpful suggestions would be appreciated.

I have spend hours today trying to work out why my stream werenā€™t workingā€¦ I wish I had read this comment earlier :smiley:

I switched to 265+ a few days agoā€¦ any idea if 265/265+ will be supported please?

No matter what I try I canā€™t get my rtsp feed to work. It works in any other app like vlc but in HA no go. Very frustrating.

My config is

camera 3:
  - platform: generic
    name: "Dog House"
    still_image_url: "https://www.pinclipart.com/picdir/big/4-49346_camera-png-clipart-photographic-film-clip-art-camera.png"
    stream_source: "rtsp://192.168.0.29:554/11"
    verify_ssl: False

May I ask why you are putting the /11 at the end of the url?

Thatā€™s what my IP camera gave. I removed it but still canā€™t get video. url works in vlc without the /11

Iā€™ve seen it asked a bunch of times above, but anyone know how to get audio out of the rtsp stream? Donā€™t need an elegant solution, just need something that works.

Hi greg, what is your foscam config for streaming? Mine doesnā€™t work, vlc is fine

Here is what I have. Its been a long time, but I think I changed the ports on all of them to 88 for consistency. I believe one of them used a different port by default for some reason so you may have to play around:

- platform: foscam
  ip: '<ip address>'
  port: 88
  username: !secret camera_username
  password: !secret camera_password
  name: "Upstairs Camera"

I have three cameras and set the user/pass the same.

  • FI9821P (x2)
  • C1

I can stream OK from the frontend (its very delayed), but I have never been able to get the streams to show on my Google display. It just says Smart Home Camera and doesnt do anything.

I may dump Foscams for Wyze soon.

Iā€™m having trouble getting my live camera stream to work with Blue Iris. I think there is some issue with HA logging into BI, although Iā€™m not sure if itā€™s my issue or something else. I currently have the mjpeg camera setup and working. That config looks like this and has no issues. I can see in blue iris that user has connected and successfully logged in and is viewing the camera:

- platform: mjpeg
  mjpeg_url: http://192.168.*.*/mjpg/GarageRight
  name: Garage Right
  username: user
  password: password
  authentication: basic

When I try creating a generic camera with stream_source config it looks like this:

- platform: generic
  still_image_url: 'http://192.168.*.*/image/FrontDoor'
  stream_source: 'http://192.168.*.*/h264/FrontDoor/temp.m3u8'
  name: Front Door Test
  username: user
  password: pass
  authentication: basic

But it will not work. When I look in BI connections, I see that it does try to connect but never gets past the ā€œloginā€ stage, shows no username, and the stream just spins:

BIFDT

If I configure BI to allow connections from HA with admin privileges, it will work (but I do not want to allow that):

Has anyone else run into this? Or do I just have my configuration incorrect? Thanks for any help.

For those struggling with RTSP on Dahua / VIP Vision try using ONVIF.

Background I have a Dahua (rebranded VIP Vision in Australia) 4MP mini-dome running on 192.168.0.200. Iā€™ve tried every recommendation and permutation listed here for the RTSP stream, none work. The stream function is very buggy and throwing up a heap of errors for me.

Solution. After lots of mucking about I switched to ONVIF. I can only assume that there is something in the stream module which is not working with the Dahua RTSP ffmpg but does work with ONVIF.

Do note that ONVIF seems to have a pretty hefty lag though - up to 30 seconds.


#ONVIF stream from 192.168.0.200

  - platform: onvif
    host: 192.168.0.200
    name: t_cam1
    username: !secret cam1_usr
    password: !secret cam1_pwd
    port: 80

on the Lovelace side.


      - type: picture-entity
        title: Test
        entity:  camera.t_cam2
        camera_view: live

Iā€™ve run into the same issue. Give this a shotā€¦ works fine for my Blue Iris cameras.

- platform: generic
  still_image_url: 'http://USERNAME:[email protected].*.*/image/FrontDoor'
  stream_source: 'http://USERNAME:[email protected].*.*/h264/FrontDoor/temp.m3u8'
  name: Front Door Test

Would love to understand why the documented method of authentication doesnā€™t work as intended though.

You can disable the need to embed username and password values by disabling authentication for this IP address in your Blue Iris webserver. The trick is to prefix the IP address of your Home Assistant server with a caret ā€˜^ā€™ in the list of IP addresses, i.e.: ^192.168.1.xxx

I have tried BlueIris stream_source and Dahua stream_source.
BlueIris stream_source is very laggy and crashes in 2 second.
Dahua Iris stream_source has better quality but crashes in around 10 seconds.
I have used BlueIris mjpeg before, It was very stable.
Is it possible to achieve reliable streaming using BlueIris or Dahua?
edit: disconnect mainly happens during streaming to tv

This works. Is there a way to use the !secrets file with this configuration?

Yes I was able to get it to work this way, but when I do that it connects via the Admin BI user, which I didnā€™t want.

Of course!

secrets.yaml

cam_front_door_still_image_url: 'http://USERNAME:[email protected].*.*/image/FrontDoor'
cam_front_door_stream_source: 'http://USERNAME:[email protected].*.*/h264/FrontDoor/temp.m3u8'

cameras.yaml

- platform: generic
  still_image_url: !secret cam_front_door_still_image_url
  stream_source: !secret cam_front_door_stream_source
  name: Front Door Test

Ahh that makes sense. I wasnā€™t sure how to integrate it into the config. Thanks for your help I will try it out.

Has anyone been able to get streaming working using NVR and a Flex camera?
I have tried using the RTSP url as suggested in post.

stream_source: "rtsp://10.0.10.6:7447/5c35744ae4b00e065c24865d_1"

I pulled the URL from the NVR listing for the RTSP setting.

I figured out the RTSP NVR issue. I had to use my local IP not the one provided by NVR outside app.

Has anyone figured out a solution for motion detection on Unifi cameras?