Rpi Camera stopped working

I am having problems with the Rpi camera component.

I have an Rpi camera attached to the same Pi on which HA is installed.
It worked perfectly up until a week or so ago, and then just seemed to stop working.
The component is ‘frozen’ on one image, and the ‘stream’ doesn’t update.

HA is installed via Hassbian, running latest version having updated the OS and HA to v0.90.2 last night and the problem is still there

camera:
  - platform: rpi_camera
    name: Lounge Camera
    image_quality: 70

No changes to any hardware in my setup.
Only thing I see in the log relating to camera is

2019-03-31 21:02:08 INFO (MainThread) [homeassistant.components.camera] Setting up camera.rpi_camera

Any tips on diagnosing?
Restarts of HA don’t seem to fix the issue, nor do a full Pi reboot?

I have the same issue, I’ve had it for the last few releases. Although restarting HA in my case seems to fix it temporarily.

does raspistill work correctly?

sudo -u homeassistant raspistill --nopreview -o /tmp/raspistill.jpg -t 0 -w 640 -h 480 -tl 1000 -q 7 -rot 0

If I run raspistill from CL I get an error…

pi@hassbian:~ $ sudo -u homeassistant raspistill --nopreview -o /tmp/raspistill.jpg -t 0 -w 640 -h 480 -tl 1000 -q 7 -rot 0
mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
mmal: camera component couldn't be enabled
mmal: main: Failed to create camera component
mmal: Failed to run camera app. Please check for firmware updates

anybody else got any experience with this, or any ideas on how to debug / fix the above error?

That error sounds like raspistill is still running. This is what happens to me. It stops updating the picture but raspistill is stil there in the background. Killing raspistill doesn’t seem to spawn a new one either

So is killing raspistill the solution?
It’s strange as it worked absolutely fine, and the just stopped one day.
With no changes to hardware or software side.
Just kinda died.

No, sorry what I meant was that killing it doesn’t do anything. It was working fine for me to up to a point, then it just stopped aroun 0.86 I think. Can’t remember exactly

ah ok, sounds like you have a similar problem to me

Same problem is here

Any solution so far

Switch to motion:

So far no
I’m currently in the process of optimising my network so HA is actually down right now. I’ll revisit once I have it back online.

Interesting, but not a solution, the Rpi camera module used to work, and now doesn’t :man_shrugging:

I’m having the same problem with my pi cam not working on hassbian. Any updates on this?

Edit, I’ve fixed this, feel a bit stupid as this was post reinstall. I had to add the homeassistant user to the video group:

sudo usermod -a -G video homeassistant

@Valiceemo Any luck with the rpi_camera? I’ve just updated to current version of HA and it’s stopped on me.

My config:

  whitelist_external_dirs:
    - /home/homeassistant/pics

camera:
  - platform: rpi_camera
    name: Lounge Camera
    image_quality: 75
    timelapse: 1000
    file_path: /home/homeassistant/pics/cam.jpg

I’ve got no errors in the log and the camera isn’t doing anything. The cam.jpg exists in the correct folder and everything has correct permissions. The camera light use to be on all the time, and now it’s not on at all.

Running raspistill -o image.jpg will take a picture and place it in the dir I execute the command so I’m assuming it’s not even trying to run.

I’m stumped.

I support, I ran into the same problem after upgrading HASSIO from core-2021.6.6 to core-2021.9.6 rpi_camera integration: stopped working with an error

Copy to clipboard

"Logger: homeassistant.components.camera
Source: helpers / entity_platform.py: 297
Integration: Camera (documentation, issues)
First occurred: September 17, 2021 11:44:52 PM (1 occurrences)
Last logged: September 17, 2021 11:44:52 PM

Setup of platform rpi_camera is taking longer than 60 seconds. Startup will proceed without waiting any longer. "

at the same time rpi camera also does not work under debian (in the main OS) reporting an error that the rpi camera is already in use. As soon as I remove rpi_camera from configuration.yaml the camera starts working under debian (on main OS).