Using the new "camera_view: live" in my current configuration

Home Assistant v0.92.0 adds support to Lovelace to show camera streams as part of cards. It only supports the following card types though.

  • picture glance
  • picture entity
  • picture element

My Home Assistant camera.yaml configuration is this:

- platform: generic
  name: Camera1
  stream_source: !secret camera_camera1_stream_source
  still_image_url: !secret camera_camera1_still_image_url

- platform: generic
  name: Camera2
  stream_source: !secret camera_camera2_stream_source
  still_image_url: !secret camera_camera2_still_image_url

- platform: generic
  name: Camera3
  stream_source: !secret camera_camera3_stream_source
  still_image_url: !secret camera_camera3_still_image_url

- platform: generic
  name: Camera4
  stream_source: !secret camera_camera4_stream_source
  still_image_url: !secret camera_camera4_still_image_url

When configuring camera.yaml this way, the cameras simply appear in Home Assistant, which is perfect. I tried adding camera_view: live to camera.yaml, but it doesnā€™t work.

Does this mean that I have to create a picture entity (or glance or element) for each camera, in order to enable the camera_view: live option?

Iā€™ve read this, but how do I configure this card using the information in camera.yaml?

Just add your camera as the entity.

          - type: picture-entity
            entity: camera.ip_outdoor
            camera_view: live
4 Likes

Excuse my ignorance, as Iā€™m still learning. I tried it like this in camera.yaml:

- platform: generic
  type: picture-entity
  entity: camera.camera1
  camera_view: live
  name: Camera1
  stream_source: !secret camera_camera1_stream_source
  still_image_url: !secret camera_camera1_still_image_url

It passes yaml check, but after restarting Home Assistant I get this error in the notification area.

1

1 Like

The camera_view: live is for the lovelace card, not for the camera config.
Are you using Lovelace?

Yes, but Iā€™ve never touched the UI. All my configuration is in the yaml files.

Hmm, not sure, but there should be a menu where you can ā€˜Take controlā€™ over Lovelace.
But then new devices will not automaticaly appear in the UI.

working code for picture-entity card looks like this:

- type: picture-entity
  entity: camera.office_cam
  camera_view: live
1 Like

PLease clarify, in which yaml file do I add this? Thanks

Does this product the live stream for this cam? I get a snapshot view.

If you are using Lovelace then it goes in your ui-lovelace.yaml. The same way you would add any other card.

Not sure about Blink. I am using WZYE cam via RTSP. If stream: is enabled and you set the generic component up per the docs, then I would dig deeper into the Blink supported types.

Aha!
Iā€™ll try the Wyze RTSP firmware.
ā€œstream:ā€ would that be added in the configuration.yaml Blink sensor?

What i did was just created a new card for my camera.
Card type is picture-entity

ā€œtype: picture-entity
entity: camera.camera_name
camera_view: liveā€

the config of the card

If you are using blue iris you will need the below in your configuation.yaml

camera:
  - platform: generic
    name: camera_name
    still_image_url: http://192.168.1.x:81/image/camera_name?q=100&s=25
    stream_source: http://192.168.1.x:81/h264/camera_name/temp.m3u8

Also, first check to make sure the stream is working, here: image
and you should have a more_info box pop out with live stream playing

1 Like

I am using lovelace, but I donā€™t have a ui-lovelace.yaml in my config folder.

then you are using the built-in editor, which I use the old method and write /edit my own code. You are going to have to dig in a bit on that method and I am not much help there, but plenty others can. https://www.home-assistant.io/lovelace/

You donā€™t need it if you go to the top right where the 3 dots are. Click configure UI and do the steps above i mentioned then restart to apply settings

when you say Iā€™m using the build in editor, do you mean the UI? Because I never touched that. Whatever I do, I always edit yaml files. This is why I am looking for a way to do this without touching the UI.

another way as a picture-glance:

            - type: picture-glance
              entities: []
              camera_image: camera.front_door
              camera_view: live

1 Like

Fairly simply, you canā€™t. If you want this feature you have to edit your lovelace cards either in the GUI or in yaml, so you either need to ā€œtake control of lovelace UIā€ or Switch it to yaml mode. There is no magic button for this yet and itā€™s not automatically added for you.

2 Likes