How to add raspberry pi camera in HA

i tried couple of ways but i cant get camera in dashboard

1, i make cameras.yaml file with

  camera:
    platform: rpi_camera
    name: Raspberry Pi Camera
    image_width: 640
    image_height: 480
    image_quality: 7
    image_rotation: 0
    timelapse: 1000
    horizontal_flip: 0
    vertical_flip: 0
    file_path: /tmp/image.jpg

and put camera: include devices/cameras.yaml

but nothing happens after that i put this code in configuration.yaml same prob please help me

Are you using the camera port on the HA raspberry or an additional raspberry?

im using camera port in same raspberry pi 3

Does the camera work with raspistill outside of HA?

Yes its work out of HA

Just reread your first post.

Your include should be similar to this.
camera: !include devices/cameras.yaml
And your cameras file devices/cameras.yaml

- platform: rpi_camera
  name: Raspberry Pi Camera
  image_width: 640
  image_height: 480
  image_quality: 7
  image_rotation: 0
  timelapse: 1000
  horizontal_flip: 0
  vertical_flip: 0
  file_path: /tmp/image.jpg

As is now you got the camera: part twice.

Thaks sir to help but i tried that way im not get any error when restart but i cant get anything in dashboard.

I have the same situation here, any other trick to make it works ?

thx

I fount it , i need to add the user hass to the video group :

usermod -a -G video hass

3 Likes

I’m thinking about doing this. You mentioned having the camera hooked up via an additional raspberry. Could you go over that setup?

Can someone go over the configuration steps to add a camera that is installed on a different RPI to HA. I want to setup several of these for monitoring the doors around the house and in my shop.

2 Likes

I have HA running on a Pi with a cam. This is not my main instance however.

I just copied the image address and added it to a generic cam on my main instance.

3 Likes

Are you just getting a still image, or video?

What software are you using on your HA with the PI

It is a still image but updates every second.

I am not using anything special on the pi. It is a pi cam using the picam component.

Would you be kind enough to post an example of your solution?

This could help - posts still images from a seperate pi.

Not been able to get a live stream on the HA UI, but there are packages if you are happy with a stream to a seperate page, see https://picamera.readthedocs.io/en/release-1.13/recipes2.html#web-streaming

@jwilker2

Once again I have 2 instances of HA…

The garage instance has the pi cam.

camera:
  - platform: rpi_camera
    image_quality: 7
    image_rotation: 180

My main instance has a generic camera with the image url.

  - platform: generic
    still_image_url: http://192.168.200.115:8903/api/camera_proxy/camera.raspberry_pi_camera?token=123wergjb0uwhr0beofwlseii56e2b74eb3oidfhgusdbw5&time=1434667678004
    name: Garage Cam

I got the url by clicking on the cam in my garage instance of HA to view it and then right clicking on the cam and selecting the COPY IMAGE ADDRESS option.

I simply pasted it into the generic cam in my main instance.

1 Like

Thank you!

1 Like

How did you get the camera working in HA. I have the same config for rpi_camera, but mine refuses to show up.

If you are using the latest version of ha it gets tricky because the token changes. What flavor of ha are you using and what version?