supervisor: rpi_camera 'Image not available'

I’m seeing ‘Image not available’ under 0.53 on Pi-zero-W and pi-3 with platform: rpi_camera

image

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 50 (6 by maintainers)

Most upvoted comments

Any resolution? Have RPi3B+ and running latest everything (as of 22.07.2020) and added an RPi cam for surveillance, but cannot get it enabled

I was having this same issue and I debugged and seemingly fixed it through noticing that the rpi_camera.py component was essentially running the raspistill command. I tried to emulate the command it was running using

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

Which gave me an error:

* failed to open vchiq instance

And through some googlefu it seems like the homeassistant profile I was running as needed to be added to the raspberry pi video group.

sudo adduser homeassistant video

Then I restarted the home assistant service

sudo systemctl restart home-assistant

And it started working just fine. Hopefully this is enough info for others to figure out what might be wrong with their camera too.

On Hassio there is a workaround that you can do in order to use the Raspberry camera until this issue is fixed:

As @Mryck pointed out in order to use the camera, 2 additional steps need to be done:

  1. In the resin-boot partition of your SD card, modify the file config.txt with the following value:
start_x=1
gpu_mem=128
  1. Enable the bcm2835-v4l2 kernel module:

For that, you need a shell access to the resin-os system (not a shell inside a container): You can use the debug SSH access described here. Then, once logged, type the following commands:

$> mount -o remount,rw  /dev/mmcblk0p2 /
$> echo -e "# Load the bcm2835-v4l2 module \nbcm2835-v4l2" > /etc/modules-load.d/bcm2835-v4l2.conf

The first command will remount the main file system with write permission and the second one create a configuration file that will load the kernel module bcm2835-v4l2 at startup.

$> reboot

Reboot in order to apply changes.

Now the camera should be exposed in /dev/. If you want to check, log in again and type ls /dev/video*. For me, as I have just the Raspberry camera, I only see one line:/dev/video0

Finally to use the camera in Home Assistant you can use the ffmpeg component. Put something like this inside your configuration.yaml:

ffmpeg:

camera:
  - platform: ffmpeg
    input: /dev/video0

Note: For me, even after this modification the Raspberry camera component doesn’t work. When I try using the raspistill command inside the Home Assistant container, it always give me the same error:

mmal: mmal_component_create_core: could not find component 'vc.camera_info'
mmal: Failed to create camera_info component
...

Done on a Raspberry 2 with a fresh install of Hassio (build 1.3). Hassio 0.98, Home assistant 0.65.6.

Did we get this problem fixed yet ?

I will leave a comment here, as i got a workaround working for me. Hopefully it helps someone 😉

camera:
  - platform: generic
    name: remoteRPiCam
    still_image_url: http://IP.of.Ra.Pi:8080/images/live.jpg

@gollo I would like to take the approach of trying to make it work inside any Docker container on the Hass.io/ResinOS Docker host.

I agree with @gdampf . However here you can find a workaround: https://gist.github.com/enegaard/a57af286205914bd912270c89650fb1b

https://raspberrypi.stackexchange.com/questions/46851/raspberry-pi-2-camera-and-alpinelinux/51440#51440 Apparently this is the only solution, but I don’t know how to do it on a RPI running HassOS.

sudo adduser homeassistant video

Solved it…

Hi gollo, It’s nice to know the cause - but still, most of the users of hass.io have choosen it, because, they don’t want to start development themselves - they just want to use the system. And that’s why it does not help just to know why it is actually not working. This bug will force them to switch to hassbian or similar. Is anyone still working on that issue or is hass.io not supporting rpi cameras anymore? Or did I miss a sufficient workaround? Don’t missunderstand my impatience, I really appreciate the work the comunity has done so far. BR Guido

I’m looking into it when I have the time…

On Mon, 11 Sep 2017 at 22:44 Pascal Vizeli notifications@github.com wrote:

Yeah you need do that on SD card. But @gollo https://github.com/gollo have try it and mean that will not work

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/home-assistant/hassio/issues/184#issuecomment-328667719, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJ2FErm1kGQo5dq4tiHz4JTxrR0S0rJks5shanEgaJpZM4PSuRo .

Please can you resolve this issue? Regards,

same issue 😦 a little bit disapointed… I switch to hass.io to escape this kind of troubles and keep concentrate on designing a cool gui

I will leave a comment here, as i got a workaround working for me. Hopefully it helps someone 😉

camera:
  - platform: generic
    name: remoteRPiCam
    still_image_url: http://IP.of.Ra.Pi:8080/images/live.jpg

This may work on Homeassistant but not on HASSOS as trying to run “raspi-config” doesn’t work.

editing config.txt makes the rpi3 not boot

is there really no solution for this?? I’m getting “idle” status and can’t see an image using raspberry pi camera

Package has arrived 🎉