Stream Component: Confirmed Cameras and Configurations

i don’t know why can not watch stream on hass. I test pi2 install hassbian and pi3 install hassio, both can not watch stream camera.

here log in hassio

image

VIVOTEK
My first foray into streaming of any kind for HA, so still a bit of a learning process.

Vivotek makes a large variety of video cameras and have been doing so for a number of years so it is likely that my set up may or may not work for a given Vivotek model.

Configuration.yaml

stream: #required

camera:
  - platform: generic
    name: Test Camera Generic
   #stream_source: rtsp://<local LAN IP>:554/live2.sdp #if rtsp Authentication = disable
    stream_source: rtsp://<username>:<passwd>@<local LAN IP>:554/live2.sdp #if rtsp Authentication=basic
    still_image_url: https://<camera snapshot URL>.jpg
   #username: <username>   #Could not get to work 
   #password: <passwd> #Could not get to work

For this Camera, Vivotek settings for:

  • Media->Video->video settings for stream 2 (live2.sdp) is set to H.264
  • Network->Streaming Protocols->RTSP Streaming:
    Authentication is either disable (no username/passwd) or basic (requires username/passwd). The default port settings were left as is.

Lovelace:

cards:
  - type: picture-entity
    entity: camera.test_camera_generic
    camera_view: live
    name: Test Generic Camera Stream
    show_state: false

Still images:
In my setup, still images are captured and sent to a file system accessible by HA front end. The motion video was always displayed via the front end, however the still images were never displayed on HA. So I was not able to figure out what the still image configuration was used for. When I commented out the stream: component then the still image was displayed (instead of the motion video) so I know the URL was configured properly.

Misc:

  • Setting the camera’s encoder to use mpeg4 over rtsp didn’t work (as expected)
  • I also tested my cameras using platform: ffmpeg and even platform: mjpeg (for an old camera that doesn’t support H.264) and used the picture-element with camera_view: live and lovelace displayed them. Lovelace sized the width according to the front end’s column width, and varied the height to maintain the aspect ratio sent by the camera (as different cameras can have differing image sizes).
  • Environment: Hass, Ubuntu 16.0.4 python venv.
  • sudo apt get for ffmpeg and its libraries on my system wanted to install version 2.8.15 (too old). Instead pulled down ffmpeg version 4.1.3 from ffmpeg.org and built manually for dynamic shared libraries as HA’s pyav needs the libraries setup this way (othewise pyav build process will fail).

I’m trying to change my working ffmpeg to generic settings but couldn’t get generic platform working at all.

  • platform: ffmpeg
    name: “Backyard”
    input: -rtsp_transport tcp -i rtsp://username:[email protected]:554/cam/realmonitor?channel=4&subtype=0

I need help to get the following generic settings to work.

Thanks,

very crazy about stream camera :disappointed: . Can not get it work

Maybe try:

- platform: generic
  name: Backyard
  still_image_url: http://192.168.1.59/cgi-bin/snapshot.cgi?channel=4
  stream_source: rtsp://username:[email protected]:554/cam/realmonitor?channel=4&subtype=0

Thanks, I did try that and many other possibilities were posted in this discussion. I can only get the still image, but not live stream.

camera 4:

Update:
I got live stream properly on the VLC player with stream_source above but couldn’t get it live stream on HA.

1 Like

I have Q-See NVR, I’m trying to set the similar to your configuration but I only get still image. when I change camera_view: live, it just show white box. The still image screens update every 20 seconds.

If you’re using lovelace, that’s how it works unless you expand the window by clicking on the control. There is a card that displays the camera live, not sure if it’s a custom card or not.

It just regular lovelace card. I thought adding the camera_view: live in the lovelace should show the live view camera.

  • title: Camera
    icon: mdi:webcam
    cards:
    • type: picture-entity
      entity: camera.front_door
      camera_view: auto
      aspect_ratio: 16x9
      show_state: false
      show_name: false
    • type: picture-entity
      entity: camera.backyard
      camera_view: auto
      aspect_ratio: 16x9
      show_state: false
      show_name: false
    • type: picture-entity
      entity: camera.garage
      camera_view: auto
      aspect_ratio: 16x9
      show_state: false
      show_name: false
    • type: picture-entity
      entity: camera.driveway
      camera_view: live
      aspect_ratio: 16x9
      show_state: false
      show_name: false

There was discussion about that somewhere around the 200th post.

Try adding this to configuration.yaml

frontend:
  javascript_version: latest

So, just tried the yi-hackv4 https://github.com/TheCrypt0/yi-hack-v4/ and can view the rtsp stream in vlc. Whats the config for getting stream component working for this? Ffmpeg, it should work?

Hi. This thread has nicely swallen so if it was mention forgive me pls. Does anyone experience massive lag in streaming rtsp cameras? I have 6 cameras setup as ffmpeg and some of them show when I access them trough lovelace 1h delay . Does any one experienced some thing like this?

Thank You

Hi @ManuelAbril did you manage to stream to your chromecast? It is absolutely the same here and i can not make it working…
I can see my still images and videos at my HA frontend but never steaming to my chromecast devices

Has anyone managed to get this working for SriCam cameras? Specifically SP012?

I’ve tried every possible configuration I can think of, but all I’m getting is a still image on Lovelace (with camera_view: live in my lovelace config) and when I click on the still a media player pops up, but just “loads” infinitely.

Ever since 0.91 I haven’t been able to watch a live stream from this camera; I was using ffmpeg and rtsp before 0.91 without issues (albeit just a single frame every 10 seconds on my Lovelace card).

Help me, please.
Capturar

Stream don’t work in frontend.
I have XiaoFang and Dafang hackeds and both perfectly worked with CAMERA.PLAY_STREAM to Chromecast, however don’t work in frontend.

My config (i included stream in configuration.yaml:

camera:
  - platform: generic
    name: Externa
    username: root
    password: !secret dafang_user
    authentication: basic
    still_image_url: https://192.168.0.152/cgi-bin/currentpic.cgi
    stream_source: rtsp://192.168.0.152:8554/unicast
    verify_ssl: false
1 Like

Have anyone experienced similar problem: I have successfully set up my video live stream in Lovelace, using the zoneminder component. It works very good in the web browser and on my Ipad mini, however I can`t get this to work on my Iphone 8, as well on my wifes Iphone X. The screen is just black. Any ideas?

1 Like

I resolved.
After to call camera.snapshot, the stream starts work.

Hi All,

I’m trying to use this IP camera with HA (Hass.io 0.93.1) to see its stream in Lovelace card.
Here’s the code in camera.yaml;

- platform: generic
  name: Dericam_generic
  still_image_url: http://192.168.0.58/tmpfs/auto.jpg
  password: !secret passwd

It worked for a while and then stopped, now it looks like this:
18%20(2)

and there is no errors in the log (but it generates errors “[homeassistant.components.generic.camera] Error getting new camera image: Cannot connect to host 192.168.0.58:80 ssl:None [Connection refused]” every second if I power off the camera).

The funny thing is I can see the camera’s feed if I paste the URL in my browser and enter password, so it’s not the camera issue.
Tried to clear cache, enable/dasable the component, updated to 0.93.1 to no avail…

How can I get it back even in generic mode?
UPDATE: after adding stream: to configuration.yaml and changing my card from this

entity: camera.dericam_generic
type: picture-entity

to this

camera: live
camera_image: camera.dericam_generic
entity: camera.dericam_generic
type: picture-entity

and adding stream_source to my camera component config:

stream_source: rtsp://admin:[email protected]/11

I’m able to see live stream if I click on the broken page icon:

but the “preload stream” checkbox (what’s that for?) covers part of the timestamp, very annoying… :
and there is about 5 seconds lag.

Also, the camera support ONVIF, but the following give me the similar visual outcome:

- platform: onvif
  name: Dericam
  host: 192.168.0.58
  password: !secret passwd

and in the HA log:

WARNING (MainThread) [homeassistant.components.onvif.camera] Couldn’t connect to camera ‘Dericam’, but will retry later. Error: Cannot connect to host 192.168.0.58:5000 ssl:None [Connection refused]

UPDATE: ONVIF component is working now, the issue was port (8080 instead of default 5000)

After 0.93 all my live streaming cameras (from BI) stopped working. I managed to have maybe 1 showing the video out of 7, and only after 10-15 seconds from opening the web page, and not always.

If i comment out “camera_view: live”, all still images appears quckly, but when clicking on one, no streaming comes.

Does anyone have the same problem?