User avatar
sav25
Authorised Reseller
Authorised Reseller
Posts: 397
Joined: Thu Aug 30, 2012 7:18 pm
Location: Southend-on-Sea, Essex, UK
Contact: Website Twitter

Re: Surveillance camera based on BuildRoot and Motion

Tue Sep 09, 2014 7:22 pm

I've completed a Pi CCTV camera system (one camera so far) using MotionPie and a Nwazet case. Check it out here:

http://www.averagemanvsraspberrypi.com/ ... urity.html

Image

Kirkbybil
Posts: 14
Joined: Mon Sep 08, 2014 12:43 pm

Re: Surveillance camera based on BuildRoot and Motion

Wed Sep 10, 2014 2:26 pm

Thanks for the reply- I got the Network share running and it's now sending the videos to my NAS.

Do you have a date estimate for the next version release? I really just need to be able to turn off the camera LED as I am setting up two bird boxes and I think this will be a better and more reliable solution.

I can live without static IP addresses so my only problem is that I want to nail them up on the wall in the next week but the red light might put off nesting birds (it will look too much like a brothel so I will only get birds of ill-repute :lol: )

I could always try covering it with a sticker I suppose and then upgrade later but once they are up the wall I can't get to them for several months so it's risky if an upgrade bricks it.

User avatar
ccrisan
Posts: 176
Joined: Thu Jan 19, 2012 7:59 am
Contact: Website Yahoo Messenger

Re: Surveillance camera based on BuildRoot and Motion

Wed Sep 10, 2014 2:33 pm

I already have a "beta" version including all the promised features. I have yet to test it before releasing it into the wild and I'm hoping to find some time to test and release it tonight. I'm not promising anything though.
Kirkbybil wrote:Thanks for the reply- I got the Network share running and it's now sending the videos to my NAS.

Do you have a date estimate for the next version release? I really just need to be able to turn off the camera LED as I am setting up two bird boxes and I think this will be a better and more reliable solution.

I can live without static IP addresses so my only problem is that I want to nail them up on the wall in the next week but the red light might put off nesting birds (it will look too much like a brothel so I will only get birds of ill-repute :lol: )

I could always try covering it with a sticker I suppose and then upgrade later but once they are up the wall I can't get to them for several months so it's risky if an upgrade bricks it.

User avatar
sav25
Authorised Reseller
Authorised Reseller
Posts: 397
Joined: Thu Aug 30, 2012 7:18 pm
Location: Southend-on-Sea, Essex, UK
Contact: Website Twitter

Re: Surveillance camera based on BuildRoot and Motion

Wed Sep 10, 2014 2:36 pm

Top stuff Crisan, looking forward to it!

Quick question - can you add generic IP cams to MotionPie?

User avatar
ccrisan
Posts: 176
Joined: Thu Jan 19, 2012 7:59 am
Contact: Website Yahoo Messenger

Re: Surveillance camera based on BuildRoot and Motion

Wed Sep 10, 2014 2:43 pm

What do you mean by "ceneric IP cams"? Normally everything that talks JPG or MJPG should be visible as a Network Camera in motionPie. The tricky part is to find the URL (usually chrome with developer tools is of help).
sav25 wrote:Top stuff Crisan, looking forward to it!

Quick question - can you add generic IP cams to MotionPie?

User avatar
sav25
Authorised Reseller
Authorised Reseller
Posts: 397
Joined: Thu Aug 30, 2012 7:18 pm
Location: Southend-on-Sea, Essex, UK
Contact: Website Twitter

Re: Surveillance camera based on BuildRoot and Motion

Wed Sep 10, 2014 2:49 pm

I mean your generic £30 IP camera, kind of thing you get from Amazon etc. I have one at home and would be good to see that alongside my Pi (seen screenshots showing multiple video feeds)

Thaui
Posts: 30
Joined: Thu Jan 16, 2014 8:32 pm
Location: Germany

Re: Surveillance camera based on BuildRoot and Motion

Wed Sep 10, 2014 3:28 pm

Why messing up the motionPie software with other IP cams. If you want so see several generic cams just take some apps and implement your other stuff. As I said on Android a good solution is tinycam monitor or ipcam view.

User avatar
sav25
Authorised Reseller
Authorised Reseller
Posts: 397
Joined: Thu Aug 30, 2012 7:18 pm
Location: Southend-on-Sea, Essex, UK
Contact: Website Twitter

Re: Surveillance camera based on BuildRoot and Motion

Wed Sep 10, 2014 3:43 pm

I could say why use 2 apps/interfaces when you can use one? It's 2014 after all...

It was just a question, I prefer MotionPie to TinyCamMonitor (I have the paid version and know how that works, just prefer MotionPie).

If I can do both in one - perfect.

Thaui
Posts: 30
Joined: Thu Jan 16, 2014 8:32 pm
Location: Germany

Re: Surveillance camera based on BuildRoot and Motion

Wed Sep 10, 2014 4:12 pm

You have answered your own question. You can do it with one app. Tinycam Monitor is doing the job for you. I am doing exactly the same thing. 2 motionpie cams and 2 dlink ip cams. Works perfect.

User avatar
sav25
Authorised Reseller
Authorised Reseller
Posts: 397
Joined: Thu Aug 30, 2012 7:18 pm
Location: Southend-on-Sea, Essex, UK
Contact: Website Twitter

Re: Surveillance camera based on BuildRoot and Motion

Wed Sep 10, 2014 4:13 pm

Ohhh I see! Dumb moment...Wednesday is a killer.

MotionPie makes my Pi like an IP cam...of course...well I'm earning my 'average' name today!

Cheers

User avatar
ccrisan
Posts: 176
Joined: Thu Jan 19, 2012 7:59 am
Contact: Website Yahoo Messenger

Re: Surveillance camera based on BuildRoot and Motion

Wed Sep 10, 2014 4:26 pm

Nevertheless, you can add as many extra cameras as you want to motionPie as well, obtaining the same effect. I don't see why not, as long as you don't care for high resolution and framerate.
sav25 wrote:Ohhh I see! Dumb moment...Wednesday is a killer.

MotionPie makes my Pi like an IP cam...of course...well I'm earning my 'average' name today!

Cheers

User avatar
ccrisan
Posts: 176
Joined: Thu Jan 19, 2012 7:59 am
Contact: Website Yahoo Messenger

Re: Surveillance camera based on BuildRoot and Motion

Wed Sep 10, 2014 5:29 pm

Just as I (didn't) promise, I prepared a pre-release image that includes support for static IP and for disabling the camera led. It's not a full update because the features are too few and not tested enough. You can download the image from here: https://github.com/ccrisan/motionPie/re ... g/20140910. Use the writeimage.sh script (supposing you use Linux) to further configure your PI when writing the image. Let me know what you think and how this works for you.
Kirkbybil wrote:Thanks for the reply- I got the Network share running and it's now sending the videos to my NAS.

Do you have a date estimate for the next version release? I really just need to be able to turn off the camera LED as I am setting up two bird boxes and I think this will be a better and more reliable solution.

I can live without static IP addresses so my only problem is that I want to nail them up on the wall in the next week but the red light might put off nesting birds (it will look too much like a brothel so I will only get birds of ill-repute :lol: )

I could always try covering it with a sticker I suppose and then upgrade later but once they are up the wall I can't get to them for several months so it's risky if an upgrade bricks it.

Kirkbybil
Posts: 14
Joined: Mon Sep 08, 2014 12:43 pm

Re: Surveillance camera based on BuildRoot and Motion

Thu Sep 11, 2014 4:48 pm

Wow - Thanks for the fast response. I have no idea what to do with the script but I'll see if I can figure it out from your instructions.

I assume I just run it with the parameters I need, as opposed to changing anything in the actual script?

Thank you!

User avatar
ccrisan
Posts: 176
Joined: Thu Jan 19, 2012 7:59 am
Contact: Website Yahoo Messenger

Re: Surveillance camera based on BuildRoot and Motion

Thu Sep 11, 2014 4:49 pm

Just run it without arguments and you'll see the list of available options.
Kirkbybil wrote:Wow - Thanks for the fast response. I have no idea what to do with the script but I'll see if I can figure it out from your instructions.

I assume I just run it with the parameters I need, as opposed to changing anything in the actual script?

Thank you!

Kirkbybil
Posts: 14
Joined: Mon Sep 08, 2014 12:43 pm

Re: Surveillance camera based on BuildRoot and Motion

Thu Sep 11, 2014 9:33 pm

I have tried running the script but I get the following error:

:: writing disk image to sdcard
dd: bs: illegal numeric value

I get this even if I strip the command back to just : ./writeimage.sh -d /dev/rdisk1 -i /Users/A/Desktop/motionPie-20140901.img
If I copy the image 'normally' using: dd if=/Users/A/Desktop/motionPie-20140901.img of=/dev/rdisk1 bs=1m it works fine?

A couple more questions: I have never used cidr before - do I need it? If not do I just remove '/cidr' ?
Is DNS the same as Netmask in this case on my home network?
Does overclocking have any impact on video recording performance ie can framerates/resolutions be higher? If so is there any guidance on this and any downside?

Sorry to have so many questions but I'm learning and hopefully they will help others.

Thanks again.

User avatar
ccrisan
Posts: 176
Joined: Thu Jan 19, 2012 7:59 am
Contact: Website Yahoo Messenger

Re: Surveillance camera based on BuildRoot and Motion

Thu Sep 11, 2014 9:46 pm

Hi,

It appears that a certain argument of the command dd does not work on your computer as it does on mine. Just replace "bs=1M" with "bs=1m" in writeimage.sh and it should no longer complain.

CIDR is used instead of a netmask. Most likely you're using 192.168.x.y with a netmask of 255.255.255.0. In CIDR notation that would be 192.168.x.y/24.

DNS and netmask are differnent things. Use 8.8.8.8 as DNS server if you're unsure.

Overclocking is enabled by default in motionPie (@900 Mhz), these options only allow you to further alter the overclocking settings using the presets available with Raspbian's raspi-config.
Kirkbybil wrote:I have tried running the script but I get the following error:

:: writing disk image to sdcard
dd: bs: illegal numeric value

I get this even if I strip the command back to just : ./writeimage.sh -d /dev/rdisk1 -i /Users/A/Desktop/motionPie-20140901.img
If I copy the image 'normally' using: dd if=/Users/A/Desktop/motionPie-20140901.img of=/dev/rdisk1 bs=1m it works fine?

A couple more questions: I have never used cidr before - do I need it? If not do I just remove '/cidr' ?
Is DNS the same as Netmask in this case on my home network?
Does overclocking have any impact on video recording performance ie can framerates/resolutions be higher? If so is there any guidance on this and any downside?

Sorry to have so many questions but I'm learning and hopefully they will help others.

Thanks again.

Kirkbybil
Posts: 14
Joined: Mon Sep 08, 2014 12:43 pm

Re: Surveillance camera based on BuildRoot and Motion

Fri Sep 12, 2014 12:55 pm

Hi, Thanks for the response, I tried the script with your changes an suggestions but the light remains on and the Static IP does not get assigned. I changed the bs=1m as advised and ran as follows:

./writeimage.sh -d /dev/rdisk1 -i /Users/A/Desktop/motionPie-20140910.img -l -s 192.168.2.99/24:192.168.2.1:8.8.8.8
:: writing disk image to sdcard
140+0 records in
140+0 records out
146800640 bytes transferred in 7.619787 secs (19265714 bytes/sec)
:: mounting sdcard
mount: You must specify a filesystem type with -t.

The image works fine but the parameters didn't change. I can turn off the LED by editing config.txt but not sure how to manually add the IP.

User avatar
ccrisan
Posts: 176
Joined: Thu Jan 19, 2012 7:59 am
Contact: Website Yahoo Messenger

Re: Surveillance camera based on BuildRoot and Motion

Fri Sep 12, 2014 12:57 pm

Obviously writeimage.sh did not complete. It managed to write the vanilla image but it did not manage to mount it and make the customizations. What distro do you use anyway? You have some strange versions of dd and mount.
Kirkbybil wrote:Hi, Thanks for the response, I tried the script with your changes an suggestions but the light remains on and the Static IP does not get assigned. I changed the bs=1m as advised and ran as follows:

./writeimage.sh -d /dev/rdisk1 -i /Users/A/Desktop/motionPie-20140910.img -l -s 192.168.2.99/24:192.168.2.1:8.8.8.8
:: writing disk image to sdcard
140+0 records in
140+0 records out
146800640 bytes transferred in 7.619787 secs (19265714 bytes/sec)
:: mounting sdcard
mount: You must specify a filesystem type with -t.

The image works fine but the parameters didn't change. I can turn off the LED by editing config.txt but not sure how to manually add the IP.

Kirkbybil
Posts: 14
Joined: Mon Sep 08, 2014 12:43 pm

Re: Surveillance camera based on BuildRoot and Motion

Fri Sep 12, 2014 8:20 pm

I am using terminal on my mac to run the script and write the image. This is how I have written the image in the past. Is this not the way to do it?

User avatar
ccrisan
Posts: 176
Joined: Thu Jan 19, 2012 7:59 am
Contact: Website Yahoo Messenger

Re: Surveillance camera based on BuildRoot and Motion

Fri Sep 12, 2014 8:42 pm

Mac you say? That might be the cause of these differences between the two command line programs. I'm not sure OS X is able to mount extended Linux partitions natively.
Kirkbybil wrote:I am using terminal on my mac to run the script and write the image. This is how I have written the image in the past. Is this not the way to do it?

Kirkbybil
Posts: 14
Joined: Mon Sep 08, 2014 12:43 pm

Re: Surveillance camera based on BuildRoot and Motion

Fri Sep 12, 2014 8:52 pm

As everything else seems to work, and I can change the LED in config.txt is it possible to put the IP etc details into the script manually?

ie could I insert my IP in this line for example?:

sed -i "s%static_ip=\"\"%static_ip=\"$IP\"%" $conf

.. and if so where would it go?

User avatar
ccrisan
Posts: 176
Joined: Thu Jan 19, 2012 7:59 am
Contact: Website Yahoo Messenger

Re: Surveillance camera based on BuildRoot and Motion

Sat Sep 13, 2014 7:17 am

What the script does after writing the image is mounting the system partition (linux ext4) and making custom changes to some files. Those files are *not* on the boot partition (which is fat32). You can make any changes you want to the system files but you need to be able to mount ext partitions!
Kirkbybil wrote:As everything else seems to work, and I can change the LED in config.txt is it possible to put the IP etc details into the script manually?

ie could I insert my IP in this line for example?:

sed -i "s%static_ip=\"\"%static_ip=\"$IP\"%" $conf

.. and if so where would it go?

Kirkbybil
Posts: 14
Joined: Mon Sep 08, 2014 12:43 pm

Re: Surveillance camera based on BuildRoot and Motion

Sat Sep 13, 2014 9:25 am

Okay, I think I understand :) I either find a Linux machine or stick with what I've got working which is now everything except static IP's. Thanks.

bcre3306
Posts: 21
Joined: Tue Jul 17, 2012 9:08 pm

Re: Surveillance camera based on BuildRoot and Motion

Tue Sep 16, 2014 12:11 am

So I am trying to record all the time and not just when motion happens. I tried the suggestion on the previous page to set the frame change threshold to 0 but that forces it to record nothing. If I change it to .01 it records but eventually stops and starts back up when motion reactivates it. Any other suggestions on how to accomplish full time recording? Also if I could have it create a new file everyday that would be awesome!

Thanks!

User avatar
ccrisan
Posts: 176
Joined: Thu Jan 19, 2012 7:59 am
Contact: Website Yahoo Messenger

Re: Surveillance camera based on BuildRoot and Motion

Tue Sep 16, 2014 7:34 am

Hi bcre3306,

I'm planning on implementing timelapse support some time in the near future. I'm not promising anything but I know it's a highly requested feature and is one of my priorities as well.
bcre3306 wrote:So I am trying to record all the time and not just when motion happens. I tried the suggestion on the previous page to set the frame change threshold to 0 but that forces it to record nothing. If I change it to .01 it records but eventually stops and starts back up when motion reactivates it. Any other suggestions on how to accomplish full time recording? Also if I could have it create a new file everyday that would be awesome!

Thanks!

Return to “Camera board”