aradell
(Anders Rådell)
February 23, 2017, 2:31pm
1
Hi,
I am trying to use the rasperry camera in my Homeassistant configuration, i use the installation with an virtual environment. My yaml looks like:
- platform: rpi_camera
name: RaspberryPiCamera
image_width: 640
image_height: 480
image_quality: 7
image_rotation: 0
timelapse: 1000
horizontal_flip: 0
vertical_flip: 0
file_path: /home/homeassistant/picamera/image.jpg
And if I try raspistill -o image.jpg i get a picture both logged in as pi and in the virtual environment.
But Home Assistant says in the log :
homeassistant.components.camera.rpi_camera: ‘raspistill’ was not found
Any ideas where i gone wrong?
Best regards
Anders
Tinkerer
(aka DubhAd on GitHub)
February 23, 2017, 2:34pm
2
raspstill isn’t in your default path. How did you install it and what does which raspstill
show?
aradell
(Anders Rådell)
February 23, 2017, 2:41pm
3
Tinkerer:
which raspstill
I installed as pi user i think. Which doesnt return anything:
pi@raspberrypi:~ $ which raspstill
pi@raspberrypi:~ $
/Anders
aradell
(Anders Rådell)
February 23, 2017, 7:46pm
4
Fixed the path, i think :
pi@raspberrypi:~ $ whereis raspistill
raspistill: /usr/bin/raspistill /opt/vc/bin/raspistill
But the log still says
20:42:51 homeassistant.components.camera.rpi_camera: ‘raspistill’ was not found
Do I need to set path from the virtual environment?
Tinkerer
(aka DubhAd on GitHub)
February 23, 2017, 8:20pm
5
How did you install it? Did you use the All In One installer, Python Virtual Environment, Hassbian…?
That should narrow down which user is running HA, and what changes are appropriate.
aradell
(Anders Rådell)
February 24, 2017, 12:28pm
6
Installed with Python Virtual Environment
A ps gives :
/srv/homeassistant/homeassistant_venv/bin/python3 /srv/homeassistant/homeassistant_venv/bin/hass -c /home/homeassistant/.homeassistant
And user Homeass+, guess its Homeassistan truncated
/Anders
kukachik
(Eugene)
April 11, 2017, 8:07pm
7
Got the same error.
Apr 12 02:53:36 ha hass[741]: 17-04-12 02:53:36 ERROR (Thread-5) [homeassistant.components.camera.rpi_camera] ‘raspistill’ was not found
HA 0.42.3
My cam -
camera:
platform: rpi_camera
image_rotation: 0
image_width: 640
image_height: 480
image_quality: 7
horizontal_flip: 0
vertical_flip: 0
timelapse: 5000
file_path: /tmp/image.jpg
My HA in venv.
pi@ha:~ $ sudo su -s /bin/bash homeassistant
homeassistant@ha:/home/pi$ raspistill -o /tmp/cam.jpg
homeassistant@ha:/home/pi$ ls -l /tmp/cam.jpg
-rw-r–r-- 1 homeassistant nogroup 2158820 Apr 12 03:05 /tmp/cam.jpg
homeassistant@ha:/home/pi$
Test passed.
aradell
(Anders Rådell)
April 19, 2017, 5:42pm
8
My solution was to make a new installation using Hassbian instead of the virtual environment installataion
/Anders
fr3nch13
(Brian French)
December 2, 2018, 8:50pm
9
For Hassio 0.83.2, I’m still getting the same error.
I also tried to setup the debug login to install it myself with eh authorized_keys, but that doesn’t seem to work either.