@bruxy70@JesseWebDotCom I use synology for my cameras (which are hikvision) and ran this on my test system (same setup as yours directly from the hikvision camera).
Picture entity shows live view and clicking on it zooms the live stream.
Thanks but I think what we can’t figure out is how to have a live camera stream as the full sized background of a picture elements (so you can then overlay things on top like sensors and messages). I don’t think it’s possible.
Ok, you are right, picture-entity works. I did not try that before. Interesting.
The documentation states that
As of Homeassistant version 0.92 you can now live-stream a camera feed directly in lovelace. To do this add either picture-entity, picture-glance or picture-elements, set camera_image to a stream-ready camera entity and set camera_view to live in one of your lovelace views.
So either I got the picture-elements configuration wrong, or there is a bug, or the documentation is wrong? Anyone have streaming working with picture-elements? Can you please share config! Thanks.
Is there anything in your config file or set up anywhere else that may be the difference? Also, for me I couldn’t get it to show up without style parameters. Unsure if this is because it is displaying the card off screen or it doesn’t show it at all
The configuration looks OK (I did not have to use styling).
As a check, when you go to Developer Tools->State and click on camera.cnc_10 “more info” i.e. the (i); a popup window occurs, but does it show anything?
We thought about that, but we have picture-glance cards streaming just fine. We’re using ubiquiti cameras and they’re using rtsp. How would I check what format the stream is in?
I’ve been struggling with this for a while too and I’m pretty convinced it’s a bug in the picture-elements card. I’ve considered submitting a bug report (which I’ve never done before) but wanted more verification first. I configured this Lovelace View for testing and to submit as an easy way to reproduce the issue. Here it is If anyone else wants to test with their camera…
views:
###################################################################################################
#### Camera Test View #############################################################################
###################################################################################################
- title: Camera Testing
path: camera_test
icon: mdi:test-tube
cards:
- type: picture-entity
entity: camera.courtyard
camera_image: camera.CAMERA_NAME
camera_view: live
- type: picture-glance
entities: []
camera_image: camera.CAMERA_NAME
camera_view: live
- type: picture-elements
image: https://i.imgur.com/FHZLxXp.png
elements:
- type: image
camera_image: camera.CAMERA_NAME
camera_view: live
style:
left: 50%
top: 50%
width: 100%
height: 100%
(Paste at the end of ui-lovelace.yaml and replace camera.CAMERA_NAME with the entity id of a working camera component)
Same problem.
Stream works fine using picture-entity or picture-glance.
But I want to use picture-elements to have PTZ control inside the card.
Any updates?
That’s clever, @Nimpom!
I just tested and this works beautifully.
Do you think the reason this works may be because the .css for <div id="root"> is overwritten – supporting my initial suspicion (under " Additional information")?
@bruxy70, I do not know if this helps, but in version 0.108.0, picture-elements can stream.
I learnt that it depends on how you set up your camera: tried ffmpeg, onvif and generic platforms. Generic platform gave the best streaming result (depends on the HW you are running HASS).
Thanks for sharing this, is there a way to make it so you click on the streaming image and get the full screen stream rather than having to click on an icon?