Hello. I’ve successfully set up a Yi Camera using the generic platform with a rtsp stream. However, the camera doesn’t provide a still image so I’m thinking about just using a fixed jpg located in my local computer (e.g. /home/hass/img/cam.jpg). Is that possible? If so, how can I set a local file as the still_image_url?
I’ve tried with /home/hass/img/cam.jpg and file:///home/hass/img/cam.jpg with no success
My camera config is just:
camera:
- platform: generic
name: yicamera
still_image_url: [HERE I WANT TO SET A LOCAL FILE]
stream_source: rtsp://192.168.1.101:554/ch0_0.h264
in your files in the config folder create a folder called “www” if you havent already. now for still image url just put /local/image.jpg
“local” is the www folder.
Sorry, I forgot to mention that I’m running Home Assistant on a raspberry pi with a virtual environment. I can’t find that “config” folder you mention. Where I should look for it? Thanks again.
Thanks, it works! Just to wrap everything up for the future if anyone else has the same problem:
Create a folder named www within your config directory, i.e. the directory where your configuration.yaml file is. If you’re running HA on a virtual environment that folder is ~/.homeassistant
Put your image (e.g. camera.jpg) in that www folder
In your configuration.yaml, the still_image_url field should look like this: