Loading
geraldoramos

Pigeon: An Open source Raspberry PI Zero W Cloud Camera

by geraldoramos Apr 6, 2017
Download All Files

Thing Apps Enabled

Please Login to Comment

Comments deleted.

Has there been any work or consideration making a similar case for the B+? I'd like to use this for a baby monitor that I'd like to hand some other more intensive operations along with streaming. I'm also concerned about the wifi strength and speed. My closest access point is in the room below.

Thanks for this, trying it out now!
I tried upping the resolution to 1280x720 but motion cpu usage went to 96% so I backed it down.
Are you keeping it at 640x480 or have you been able to tweak it higher? framerate is not so important but higher resolution would be nice.

Thank you for a great design and your effort making it opensource! I'd like to make some adjustments to the camera design, adding 18650 battery support. Would you be able to share the design source files as the link below is view only - I think Onshape changed their functionality that now prevents download in this mode.
Thank you in advance again!

Thank you, but that's the same link as below. I'm not able to download the files as it says "view only". Could you fix that, please?

I also updated the unlogged link to be able to export, it should work now!

I think you need to create an account for free with Onshape and then you will be able to copy/export, etc.

Oh, I see... That's a pity, but I think the reward is great. Well done with the project - kudos!

Thank you for this thing! Thumbs up to you!

  • Posted with 3D Geeks Thingiverse Browser App

This is a nice one! I am using a different camera, and when I read open-source I went like - just what I need, since I would like to just slightly modify it to fit my camera. But I then realized, you only refer to the software. Would you mind publishing your CAD files as well to make it truly open source? Thank you!

Comments deleted.

CAn this upload elsewhere besides dropbox?

This almost wants to work. I get everything working, including the grey screen on the HTTP preview. Manually launching the camera driver
bcm2835-v4l2 works for a few minutes, it attempts to make a few recordings, then hangs and dies. Doesn't respond to pings, and kills the putty session. Any clues? I just put a brand new 32GB Sandisk (Red/Silver) SD Card in with Raspbian lite.

If i add the camera driver to /etc/modules, the pi becomes unresponsive in about 30 seconds after booting. The camera light stays on at this stage.

Edit: Bought a new Pi Camera, works for a minute then crashes. Bought another SD card, works for a minute than crashes. I do notice the PI ZeroW chip is very hot. Guessing this might be to blame. Don't have access to another Pi Zero without removing the one from my 3D printer :(

Edit: Found my Pi was running with very little GPU memory (16M), so increased it to the 256M max. Still crashes, although this time i at least got a message to the SSH window before it croaked.

22:34:55 up 3 min, 1 user, load average: 0.49, 0.41, 0.19
kernel:[ 187.494816] Internal error: Oops: 817 [#1] ARM

Message from syslogd@raspberrypi at Feb 24 22:34:54 ...
kernel:[ 187.545711] Process bash (pid: 588, stack limit = 0xc84a0188)

Message from syslogd@raspberrypi at Feb 24 22:34:54 ...
kernel:[ 187.548578] Stack: (0xc84a1fa8 to 0xc84a2000)

Message from syslogd@raspberrypi at Feb 24 22:34:54 ...
kernel:[ 187.551494] 1fa0: 00010000 bec1e86c 00000000 bec1e7ec bec1e86c 00000008

Message from syslogd@raspberrypi at Feb 24 22:34:54 ...
kernel:[ 187.556660] 1fc0: 00010000 bec1e86c 00000000 000000af 000ffb78 000fa734 000fa78c 006afcc8

Message from syslogd@raspberrypi at Feb 24 22:34:54 ...
kernel:[ 187.561784] 1fe0: 000fa080 bec1e740 00056cd0 b6d83660 60000010 00000000 00000000 00000000

Message from syslogd@raspberrypi at Feb 24 22:34:54 ...
kernel:[ 187.566937] Code: d3a00001 e89da800 00000000 00000000 (e5ad0008)

I know little of this project, but I know in something I was playing with, I needed to in addition to the normal sudo apt update and sudo apt upgrade -y I also needed to run sudo rpi-update to update the firmware. Might help?

I have this running on 2 pis. Everything was running great but recently everything stopped uploading to dropbox. I tried deleting the .conf file and then running the .sh file to create a new .conf file with a new token but it does not appear to work. Any ideas?

Do I have the ability to access the camera via rtsp:// stream?

You can access via HTTP stream (mjpg-stream). After installation: http://[PI-ADDRESS]:[port]

It seems the 6/32 screw is the wrong thread size. I purchased the one linked below and printed 3 different cases but the screw is just too small of a thread. I ended up using the supplied nut that came with the set.

sorry about that. It's probably a mistake. I will review and make sure to provide the right size in the instructions.

Does anyone know how to change the quality of the stream and what the best settings are?

I have a extremely fast wifi, so I know that isn't the issue. The picture is delayed and any significant movement blurs the picture. I have seen some screenshots of others and they great.

Are you using the official raspberry Pi camera? The quality will not be that great because the motion detection process takes too much processing resources but it's supposed to be decent. Here is how mine looks:
https://www.dropbox.com/s/cspbhmpjwkh9xhm/2490-20170816182116.mp4?dl=0

This is using the default configuration, no changes. I'm also not having a 5s delay, the delay is a lot lower than that.

Or can I turn off motion detection and just run it 24/7 and get a better quality picture? Seems like motion detection takes up a lot of resources. I can just delete the dropbox videos myself.

Yup sure am. The 8MP camera v 2.1.

The FPS seem very choppy on mine. Is there a way to change the FPS? I'd be fine if it was just the viewing quality on streaming. But the file videos uploaded to Dropbox are pretty useless as well.

You can edit the file pigeon.conf (section Live Stream Server). There are video quality configurations you can play around.

The Pigeon project uses the Motion project behind the scenes, there is no way to remove the motion detection mechanism. For that, I would recommend another solution, maybe UV4L: https://www.linux-projects.org/uv4l/

The motion project has just changed the development team, hopefully, there will be improvements to come. More info:
https://github.com/Motion-Project/motion

Regards,

Geraldo

Comments deleted.

i cannot for the life of me get this connected. Someone should really make a video.

I type the git clone... and it comes back and says -bash: git command not found

How do you install this??

I have followed the readme exactly. Am I just supposed to copy and paste?

I am connected through SSH, the Pi is on my wifi. I log into if from the IP address and my password. I copy this -

cd /home/pi
git clone https://github.com/geraldoramos/pigeon.git
cd pigeon

and nothing happens. So I paste this,

 chmod +x pigeon_install.sh
 ./pigeon_install.sh

Again, nothing happens. No loading or file retrieving like seen in the update functions.

Hi, try install git first:

sudo apt-get install git

Haha, that did it! Must have spent 3 hours trying to figure out why it wasn't working.. Thanks Sir!

The image quality on the stream is pretty poor though. There is about a 5 sec delay and then it get's really fuzzy. Any advice?

I think I mistyped my Dropbox token. Where do I edit that? I didn't see it in the Pigeon.conf

Just login to your raspberry pi and run:

sudo rm -rf /home/pi/pigeon/modules/dropbox/binaries/dropbox.conf
sudo ./home/pigeon/modules/dropbox/binaries/dropbox_uploader.sh -f /home/pi/pigeon/modules/dropbox/binaries/dropbox.conf

Let me know if it works!

This did work, thank you

In the process of printing. I see the code allows for uploading to drop box, does it still have the function to upload a network share?

It currently does not have the function to do any other upload except Dropbox... :(

Hi, here is the right place talk about the case ;)
I need to use a wide angle camera. The lens is 14mm diameter. Could you share the source file of your 3D design?
Cheers,
Antony

Hey there, sorry for the delay! This was done using Onshape, do you have an account there? If so, let me know the user name and I can share!

How do i remove the authentication if i set it up by mistake on install? I tried commenting it out in pigeon.conf but that did not work

NVM i found it. Had to change the setting to authentication disabled.

ok! Glad you found out! Let me know if you have any other question.

I'm planning to use it outdoor but looks like the USB is too exposed. Anyone tried this outside already?

I was thinking maybe sealing it good with hot glue or maybe silicon. maybe even epoxy...

I don't use it outdoors but looks like this user does: https://www.thingiverse.com/make:326384

Maybe you can comment on the page above to see if you can get any feedback from him?

I might play with the model and try to make the usb compartment tighter, but the tighter I make, more inconsistent it will be with all types of printers we have out there, all with different tolerances. If I make it perfect tweaked for mine, it might not work on many other printer types. The current model has the advantage of working for everyone (regardless the USB cord type and 3d printer).

Any suggestions there?

Pigeon: An Open source Raspberry PI Zero W Cloud Camera

It worked outdoors OK, however over time this design seemed to stress the camera ribbon cable and I had two failures. Have since swapped to a case design where there was more support for the board and a less aggressive bend on the ribbon.

Thanks for the great work. I am going to assemble this but now I realized that I don't know the sizes of screw and bolt. Could you please write it somewhere? There are four different screw sizes, aren't they? Thanks

Quite handy model, thank you. After 3D printing it's quite hit and miss situation without BOM (for all different types of screws). Can't find those extra small for cover (would prefer 2mm etc.).

Thanks for the feedback. I need to improve the BOM and may change the screw sizes as well.

I will be working on a few improvements, including the above, soon!

Sorry about that and thanks for giving it a try!

Would be great if you could provide screw and bolt sizes for assembly.

I've also been looking through the github code and have beeñ writing an SCP upload module, bit noted that there are some issues with the module loader, in that if I don't setup Dropbox, because I don't use it. It just goes through the setup routine again and again, so additional modules won't get loaded.

I've tweaked that, basically to look for the appropriate .conf file in each module directory and if it's not there and you're not in setup, then it skips that module.

Really like the project and have got a few instances of the code working flawlessly. Just struggling a little with the bolts and screws so if you can help that would be great.

Additionally let me know if you want me to contribute my code, I'll be happy to create a branch on your github so you can check it out.

Thanks!

Great feedback, thank you! I was aware of this module issue but just didn't have the time to fix it yet. I'm really looking for contributors, if you can create a pull request with your solution, it will be amazing and really appreciated. Regarding the bolts/screws and better assembly instructions, I will work on that as soon as possible.

Great work on this project, I love it. Wanted to also check in to see if a design for the SHCHV wide angle lense with IR, seems like it would be a perfect fit for this. Thanks!

good idea! I will try to come up with a version that will fit the SHCHV wide angle camera. It will be a great variation for the project. Just bought one...

Hello! Thanks for the camera case model! Does this model work with the official camera?

Yes, it does work with the official Raspberry Pi camera. I also tested with cheap generic versions I purchased on Aliexpress.

Great idea and great case. I've printed one out and installing it this evening. Pi Wifi Zero and cameras are dirt cheap so can see making plenty of these. Adding a cheap £1 PIR detector would be good to catch wildlife events during the night?

Thanks! I recently got some PIR detectors and I'm thinking about incorporating this to the case. Thanks a lot for the feedback. Let me know if you find any issues in the process or have any suggestions for improvement!

Hi, pillar supports seem a bit thin that hold the pi up. Ive broken mine and probably going to remix to make them more solid and open up the holes that fit the lid to take some 3mm screws. Some reason the scripts dont work , seems to be something to do with the sudo wrappers on either the main file on the on_picture_save etc. The scripts run, just that the dropbox uploader doesnt seem to like running inside them. Dropbox uploader and on_picture_save work fine from the command line though.

Hi,

I've just released a new alpha version with various permission fixes and the ability to setup a name for the camera, this way the dropbox folder will be structured in a way that allows multiple cameras. If you define name X for the camera, the dropbox folder where files will be stored will have the same name.

Can you please update (git pull) and try to reinstall it? If git pull doesn't work, you can do:
git fetch --all
git reset --hard origin/master

Or, if you prefer, you can remove everything and start over by cloning the project again.

If after installation of the new version you still have troubles with Dropbox, please edit the file pigeon.conf and in the line 15, change 'daemon on' to 'daemon off'. This way motion will not run in the background.

After doing so, please make sure motion is not running:
ps aux | grep motion

if you see a motion process, like this:
root 5283 18.9 6.5 99216 24816 ? Sl 02:52 2:33 motion -c pigeon.conf

kill it by doing:
sudo kill -9 5283

When you confirm motion is not running, run it:
sudo motion -c /home/pi/pigeon/pigeon.conf

Now motion will be running in the console, please do any movement in the camera and you should see a motion event starting, like below:
[1:ml1] [NTC] [ALL] motion_detected: Motion detected - starting event 1

When you see that, stop any movement for around 30s, so the event will be finalized and upload will begin. If you have issues with the uploading process to dropbox, we will know at this point. Please send the output to me so I can troubleshoot.

Thanks a lot for testing/using the project, you can also create a Github issue if you still have no luck and want to continue troubleshooting from there. I'm fine continuing troubleshooting here too, but since it's code related, it will be nice to handle in the repository.

In regards to the 3D files, if you do any remix, please show me so I can implement your idea in the design as well. I didn't have troubles with my pillar support, what type of material did you print? What resolution and infill? If you want, you can also send some rough drawing of what solution you think will be good to prevent this pillar issue and I can try to implement asap.

I'm using PLA+ with 20% infill. Second iteration I added a web between pillar and case and that kept them in place, but the pillar pegs still broke after inserting the USB power several times. I also added an extension to the lid so that it held the pi in place and gave something to push against. However next iteration I'm going to look at just fixing the pi to the lid which should make it more robust when using the USB connector. Wonder if there is a way to periodically flash the pi onboard LeD and show it's working? It's currently in place keeping an eye on the garden, a PiNoir is en-route today as I have a large IR array and want to capture garden nightlife and going to use an old zero with USB dongle wifi for that

I replied to your comments with instructions how to do a simple script to turn the LED on and off in an interval, but for some reason, it's being moderated (probably because of the code). Hopefully will not take a long time...

Thanks! I will try to incorporate those improvements in the next iteration of the model. Regarding the Led, It's totally possible.

To turn the the ACT led on, the command is:
echo 0 | sudo tee /sys/class/leds/led0/brightness

To turn it off, just echo 1 instead:
echo 0 | sudo tee /sys/class/leds/led0/brightness

It's possible to make it run whenever a motion event is triggered (just need to run this on/off command during the events we expose through the modules), but if you want to just turn on and off periodically, I would do a script like this:

```#!/usr/bin/env bash

while true; do
echo 1 | sudo tee /sys/class/leds/led0/brightness &&
sleep 60 &&
echo 0 | sudo tee /sys/class/leds/led0/brightness &&
sleep 60
done



Save it as something like leds.sh and then run it in the background (make sure to add run permission first)
chmod +x leds.sh
sh leds.sh > /dev/null &

This will run the script in the background and turn it on, wait 60 seconds, turn off, wait 60 seconds turn on and do it over and over. You can add this to your rc.local file if you want to make it run whenever the PI restarts.

I'm not sure how visible the LED is after the PI is in the case. Let me know how it goes. Maybe if it's super dark, you will be able to notice well from a distance.

that worked :) I'll post anything else to the git. Interestingly dropbox was all working from cmd line, but when run in no daemon mode it asked for the key again, when that was entered it works and is now catching motion on movement in the garden..

Thanks for the feedback, will look into that!

Great idea and nice solution. The problem in our country is, you won't get a Pi Zero under 25 $, if you get it at all (the offerings are really rare). Not to speak about the camera module and the rest of the parts, including the printed ones. A rough calculation showed me, that it would make around 50 $ :-(

Where are you from? Yeah, I understand that this might not be low cost for people outside the U.S :(

... from Germany.
I could order it from US or UK, but in this case I had to pay a lot for the mailing and the result would be the same. It is only about the Pi Zero, the other Pis are available for approx. the same price as in US.

bummer.... I bought mine very close to the launch date and it was unavailable everywhere in the US, I ended up buying in the UK:
https://thepihut.com/products/raspberry-pi-zero-w?variant=30332705425

Interesting, that's my supplier too but from within Germany and it was more expensive. But even if you take the UK Pi Hut, the camera adapter there costs 4 Pound (approx. the same as Euro or $, the later a little more) and the camera module 24 Pound plus the Pi Zero plus the rest of the parts you will be in the same price area as I mentioned.
But I'm not arguing against you. You are not making the prices ;-) It is still a nice project and it has benefits compared to similar solutions out of the store. You are flexible in programming the functions you need and to make it more secure as many other products.
I will keep a eye on it :-)
Thanks again!

Thanks for the information :-)

Other option is to get things from China (not the original PI camera). If you get the raspberry PI zero W from PiHut and the rest from China (generic camera&cable + long power cable), I guess the cost will be the lowest possible. (not sure how hard is to buy from China from Germany).

Anyway, Thanks for checking this project out, really appreciate the conversation.

No problem with orders from China except the time it takes till parts arrive. I had some that took up to 8 weeks, average is 5 weeks. I enjoyed the conversation too and as I said, I will keep an eye on this :-)