Rpi_camera:

Hi,

I’m creating a new topic for this and would recommend that many of the old posts be deprecated as they are no longer relevant.

But hey, it still doesn’t work.

I’m using the flashed version for raspberry pi 4b - Version 4.8 (32bit recommended)

If I specify file_path I get this error:

Invalid config for [rpi_camera]: not a file for dictionary value @ data['rpi_camera']['file_path']. Got '/tmp/image.jpg'. (See /config/configuration.yaml, line 45).

These are the relevant lines from the configuration.yaml

45 rpi_camera:
46     name: Office Camera
47     timelapse: 1000
48     file_path: /tmp/image.jpg

If I don’t specify a file_path it does not error, and I get a UI camera, but no content:

I’ve tried every bloody combination, not geting frustrated, only been at it for, 4 hours, so you know.

Any assistance would be greatful!

The docs say:

The given file_path must be an existing file because the camera platform setup performs a writeable check on it. Also, keep in mind that the path should be whitelisted.

Have you done both of these things?

Yes, and I’ve tried (although it doesn’t seem relevant anymore) adding users to the video group for permissions.

The file is “touched” and chmod 777 just in case.

It is also white listed, although has I say, irrelevant of the file_path, if this isn’t specified it should create a temporary file which can be seen, and it doesn’t.

Here is my whole configuration.yaml

Sorry it is an image, I can’t copy from the terminal.

(Thanks for responding btw)

Ok, so it is getting weirder now.

I’ve managed to do something, lol, no picture still, but no errors now.

So great, I now get the widget on the screen, but no image, I check the directory, still no image, however when reviewing the Developer Tools I see this:

camera.office_camera

access_token: 57174caab9522858cf67c6e90820dae3a40bc54402d7c6b275ad2795cc4f2361
friendly_name: Office Camera
entity_picture: >-
  /api/camera_proxy/camera.office_camera?token=57174caab9522858cf67c6e90820dae3a40bc54402d7c6b275ad2795cc4f2361
supported_features: 0

Well, not sure what it is doing now, can’t even find an api directory so I’m assuming it is something to do with docker, or something.

So sad now…will to go on…diminishing…

Ok, so I decided enough was enough and I created a stand alone RaspberryPi installation on another SD, then did a manual install.

Copied the config, and exactly the same!

Ha Ha! I say!

So remember to enable the camera using sudo raspi-config and rebooted.

Worked first time. So I’m thinking, has this been forgot out of the OS build version?

I tried mucking around with the original SD and start_x=1 which activates the camera and bust my boot, and since I’ve now got a working version that means I can also add in python and other wonderfully helpful stuff I’m just going to let this one go.