geraldoramos / pigeon

Pigeon is a simple 3D printed cloud home surveillance camera project that uses the new Raspberry Pi Zero W
https://www.instructables.com/id/Pigeon-a-3D-Printed-Cloud-Home-Surveillance-Camera/
GNU General Public License v3.0
296 stars 22 forks source link

With Raspbian Jessie, video only captures after upgrading Motion to 4.0.1 #14

Closed erikszewczyk closed 7 years ago

erikszewczyk commented 7 years ago

With the version of Motion you have built in (3.x?) I kept getting the "Unable to open video device" grey screen on the live view (and nothing recorded to Dropbox). I ended up resolving this by upgrading Motion to 4.0.1 with the following:

wget https://github.com/Motion-Project/motion/releases/download/release-4.0.1/pi_jessie_motion_4.0.1-1_armhf.deb dpkg -i pi_jessie_motion_4.0.1-1_armhf.deb

I assume this is due to Jessie, I saw a few similar posts with others having Motion issues as I was searching around which led me to try upgrading. I was able to repro after reinstalling Jessie, but I didnt try and install other versions of Raspbian.

HTH, Erik http://freelearner.how

geraldoramos commented 7 years ago

Thanks Erik!

I will look into this asap and possibly update the project to use Motion 4. There are a lot of improvements I would like to make.

geraldoramos commented 7 years ago

Oh, wait a second, I've changed this recently, it was installing the version 3 straight from the repository but now the install script is using apt-get. The apt-get command is probably not installing the last version. Anyway, I will look into this and make sure I'm doing the best approach to install motion in the system.

erikszewczyk commented 7 years ago

Thanks for looking into it - I should have thought to manually update when troubleshooting anyway but forgot at the time.

erikszewczyk commented 7 years ago

Hey Geraldo-

I received a new Pi Zero W today, This Pi Zero I bought for the express purpose of building a security camera to cover my front door...As it's a new Pi I started with the latest version of Raspbian (Stretch) which comes with Motion 4.0-1. To my surprise I was also getting the same "Unable to open video device" screen as I had with the other Pi running Jessie.

At first I tried an apt-get update/upgrade however this did not upgrade Motion and left it on 4.0-1. Again I had to manually update from the Motion repository:

wget https://github.com/Motion-Project/motion/releases/download/release-4.0.1/pi_stretch_motion_4.0.1-1_armhf.deb
sudo dpkg -i pi_stretch_motion_4.0.1-1_armhf.deb

Once it was updated to Motion 4.0.1-1 from 4.0-1 everything started working.

HTH, Erik http://freelearner.how

geraldoramos commented 7 years ago

Thanks Erik.

I think the issue is not related to the version itself, check this out: https://raspberrypi.stackexchange.com/questions/27737/unable-to-open-video-device-and-grey-screen

Looks like running sudo modprobe bcm2835-v4l2 should fix the grey screen issue.

I will see if it makes sense to add this as part of the installation script. For now, I will include this tip in the readme file so people who are having this issue can try sudo modprobe bcm2835-v4l2. I will also mention installing from the repo as a second option.

Thanks for helping to troubleshoot this.

erikszewczyk commented 7 years ago

Thanks Geraldo,

I built another one today, same problem initially but then sudo modprobe bcm2835-v4l2 fixed it.

Thanks, Erik

geraldoramos commented 7 years ago

Thanks, I will add this to the install script. Looks like for some reason it's not doing it out of the box as it used to do before.

Ardehal commented 6 years ago

Can u give me the coding to detect the small thing using camera rpi zero w without using opencv ?