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

Re: Surveillance camera based on BuildRoot and Motion

Tue Sep 16, 2014 1:57 pm

ok really appreciate it. You re doing a great job with this product!

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

Re: Surveillance camera based on BuildRoot and Motion

Tue Sep 16, 2014 4:56 pm

Hi, I realised that I did have a linux machine to write the image - a raspberry pi! I copied over the image and script, mounted a formatted SD card via a USB reader and ran it as below but I get the following error. - Any idea why?

$ ./writeimage.sh -d /dev/sda -i /home/pi/motionPie-20140910.img -l -s 192.168.1.25/24:192.168.1.1:8.8.8.8
:: writing disk image to sdcard
140+0 records in
140+0 records out
146800640 bytes (147 MB) copied, 17.1318 s, 8.6 MB/s
:: mounting sdcard
mount: you must specify the filesystem type

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 5:00 pm

No idea why that would happen. See what dmesg has to say after that error. Mount errors usually show up in dmesg.
Kirkbybil wrote:Hi, I realised that I did have a linux machine to write the image - a raspberry pi! I copied over the image and script, mounted a formatted SD card via a USB reader and ran it as below but I get the following error. - Any idea why?

$ ./writeimage.sh -d /dev/sda -i /home/pi/motionPie-20140910.img -l -s 192.168.1.25/24:192.168.1.1:8.8.8.8
:: writing disk image to sdcard
140+0 records in
140+0 records out
146800640 bytes (147 MB) copied, 17.1318 s, 8.6 MB/s
:: mounting sdcard
mount: you must specify the filesystem type

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

Re: Surveillance camera based on BuildRoot and Motion

Tue Sep 16, 2014 8:32 pm

These are the last few lines of dmesg:

[ 44.622147] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null)
[ 165.424316] EXT4-fs (sda1): VFS: Can't find ext4 filesystem
[ 165.430205] EXT4-fs (sda1): VFS: Can't find ext4 filesystem
[ 165.432112] EXT4-fs (sda1): VFS: Can't find ext4 filesystem
[ 165.434321] FAT-fs (sda1): bogus number of reserved sectors
[ 165.434352] FAT-fs (sda1): Can't find a valid FAT filesystem
[ 165.440475] FAT-fs (sda1): bogus number of reserved sectors
[ 165.440512] FAT-fs (sda1): Can't find a valid FAT filesystem
[ 165.442648] F2FS-fs (sda1): Magic Mismatch, valid(0xf2f52010) - read(0x0)
[ 165.442678] F2FS-fs (sda1): Can't find a valid F2FS filesystem in first superblock
[ 165.443679] F2FS-fs (sda1): Magic Mismatch, valid(0xf2f52010) - read(0x0)
[ 165.443705] F2FS-fs (sda1): Can't find a valid F2FS filesystem in second superblock

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 8:41 pm

The problem may be the fact that the kernel does not re-read the partition table of the USB storage device after writing the image to it. Your best bet now is to write the image as you normally do, with dd (from whatever OS you have), then comment out the line with dd in writeimage.sh and execute the script. It should work as expected. Let me know how this works out for you.
Kirkbybil wrote:These are the last few lines of dmesg:

[ 44.622147] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null)
[ 165.424316] EXT4-fs (sda1): VFS: Can't find ext4 filesystem
[ 165.430205] EXT4-fs (sda1): VFS: Can't find ext4 filesystem
[ 165.432112] EXT4-fs (sda1): VFS: Can't find ext4 filesystem
[ 165.434321] FAT-fs (sda1): bogus number of reserved sectors
[ 165.434352] FAT-fs (sda1): Can't find a valid FAT filesystem
[ 165.440475] FAT-fs (sda1): bogus number of reserved sectors
[ 165.440512] FAT-fs (sda1): Can't find a valid FAT filesystem
[ 165.442648] F2FS-fs (sda1): Magic Mismatch, valid(0xf2f52010) - read(0x0)
[ 165.442678] F2FS-fs (sda1): Can't find a valid F2FS filesystem in first superblock
[ 165.443679] F2FS-fs (sda1): Magic Mismatch, valid(0xf2f52010) - read(0x0)
[ 165.443705] F2FS-fs (sda1): Can't find a valid F2FS filesystem in second superblock

Retired Bob
Posts: 6
Joined: Sat Aug 09, 2014 6:44 pm

Re: Surveillance camera based on BuildRoot and Motion

Wed Sep 17, 2014 1:47 pm

ccrisan wrote: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.
I have tried this new version and it seems to be better than the previous version's that I have tried.

However.

Is Python included in this build?
Where do you recommend that I place my programs so that they are visible to MotionPie?
I have "borrowed" a Python one that works on Raspbian, in terminal, and would like to use it as a "test piece".
Will I need to adjust the path?

And I cannot locate the setting to turn off the led.

Finally. Can you please suggest a guide to BuildRoot as some of the commands in the Debian reference seem not to exist.
Although I am plowing though this reference in an attempt to learn more about Linux.

Thank again for a very nice program.

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 17, 2014 5:03 pm

Hi,

I don't recommend playing around with BuildRoot if you want to test your own programs. Instead I strongly advise you to use Raspbian. If you still want to dig into BuildRoot, their documentation is quite thorough and well written: http://buildroot.uclibc.org/downloads/m ... anual.html.

The option to turn off the LED is in fact a command line switch for the writeimage.sh script. Run it without arguments to see its basic usage.
Retired Bob wrote:
ccrisan wrote: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.
I have tried this new version and it seems to be better than the previous version's that I have tried.

However.

Is Python included in this build?
Where do you recommend that I place my programs so that they are visible to MotionPie?
I have "borrowed" a Python one that works on Raspbian, in terminal, and would like to use it as a "test piece".
Will I need to adjust the path?

And I cannot locate the setting to turn off the led.

Finally. Can you please suggest a guide to BuildRoot as some of the commands in the Debian reference seem not to exist.
Although I am plowing though this reference in an attempt to learn more about Linux.

Thank again for a very nice program.

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

Re: Surveillance camera based on BuildRoot and Motion

Wed Sep 17, 2014 11:03 pm

ccrisan wrote: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!

Just an FYI I figured out a way for this to work.. I changed the threshold to .01 and then changed the motion gap to 1440. It now creates a new video files every hour. Works perfectly!

Thanks!

greenembrace
Posts: 3
Joined: Mon Sep 08, 2014 2:13 am

Re: Surveillance camera based on BuildRoot and Motion

Thu Sep 18, 2014 4:17 am

Hi
Thanks for the static IP update and new script.
I did also have issue with static IP script, not remounting SD card. but found it to be a timing issue, i put pause in before remount and worked fine.

I have camera on Raspiberry Pi now working (thanks) and can view stream from my Linux box. I also have a webcam on my Linux box working fine, and viewable in Motioneye (using localhost:8765).

I would like to include the Raspiberry Pi camera in this Motioneye of the linux box, but when I try to add the network address of the Raspiberry Pi (tried IP, IP:8080, IP:8081), I get a window but with message "Unable to open video device..."

am I looking at this wrong...

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 18, 2014 7:13 am

Use the streaming URL or the snapshot URL that is shown in the menu of your Raspberry PI. The streaming URL should look something like this: http://192.168.0.1:8081 (including the leading http://). Also make sure you use the latest motionEye version.
greenembrace wrote:Hi
Thanks for the static IP update and new script.
I did also have issue with static IP script, not remounting SD card. but found it to be a timing issue, i put pause in before remount and worked fine.

I have camera on Raspiberry Pi now working (thanks) and can view stream from my Linux box. I also have a webcam on my Linux box working fine, and viewable in Motioneye (using localhost:8765).

I would like to include the Raspiberry Pi camera in this Motioneye of the linux box, but when I try to add the network address of the Raspiberry Pi (tried IP, IP:8080, IP:8081), I get a window but with message "Unable to open video device..."

am I looking at this wrong...

greenembrace
Posts: 3
Joined: Mon Sep 08, 2014 2:13 am

Re: Surveillance camera based on BuildRoot and Motion

Thu Sep 18, 2014 8:24 am

ccrisan wrote:Use the streaming URL or the snapshot URL that is shown in the menu of your Raspberry PI. The streaming URL should look something like this: http://192.168.0.1:8081 (including the leading http://). Also make sure you use the latest motionEye version.
Thanks that seems to do the trick, i'm a happy man

Ookpik
Posts: 9
Joined: Tue Mar 26, 2013 9:15 am

Re: Surveillance camera based on BuildRoot and Motion

Sat Sep 20, 2014 5:49 pm

Great job ccrisan.
I read on the blog page (averagemanvsraspberrypi.com) that 3 Pis running on MotionPie (image from MotionPie site) and "you can run more than one Pi camera on MotionPie as well" . Can you tell more about it ?
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

Sat Sep 20, 2014 5:59 pm

You can in theory add as many cameras as you want to any motionPie instance (regardless of the camera type). You are however limited by the processing power of a Raspberry PI. For adding more cameras you have 3 options, all of them starting by choosing the "Add camera..." option in the menu:
1) add a(nother) USB camera - it should be visible to the OS as /dev/video1
2) add a network (IP) camera - the challenge is to find the right URL at which your camera sends (M)JPG data
3) add a remote motionEye camera - allows daisy-chaining of motionEye (or motionPie) cameras, currently works only for two levels of chaining

I hope this helps.
Ookpik wrote:Great job ccrisan.
I read on the blog page (averagemanvsraspberrypi.com) that 3 Pis running on MotionPie (image from MotionPie site) and "you can run more than one Pi camera on MotionPie as well" . Can you tell more about it ?
Thanks :)

bench2010
Posts: 5
Joined: Sun Apr 21, 2013 4:43 am

Re: Surveillance camera based on BuildRoot and Motion

Sun Sep 21, 2014 5:09 am

anyone know bash commands to upload to google drive or dropbox?

I appreciate your work!

RPi85
Posts: 26
Joined: Fri Dec 27, 2013 10:42 pm

Re: Surveillance camera based on BuildRoot and Motion

Sun Sep 21, 2014 10:24 am

Hi,

First of all great work you have done, really appreciate it.

Would it be possible to trigger motion (=start recording) with our own scripts/Python? This way we could add external triggers from PIRs, magnetic switches, home automation systems, home alarms etc. Likewise, would it be possible to trigger a script when motion is detected? This would allow turning on IR/LED lights for example.

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

Sun Sep 21, 2014 10:27 am

External motion triggering is not currently possible with the motion daemon. I'm not sure how this could be implemented. However executing a script upon motion detection can be achieved using the "Run A Command" option in the "Motion Notifications" section of the menu.
RPi85 wrote:Hi,

First of all great work you have done, really appreciate it.

Would it be possible to trigger motion (=start recording) with our own scripts/Python? This way we could add external triggers from PIRs, magnetic switches, home automation systems, home alarms etc. Likewise, would it be possible to trigger a script when motion is detected? This would allow turning on IR/LED lights for example.

Ookpik
Posts: 9
Joined: Tue Mar 26, 2013 9:15 am

Re: Surveillance camera based on BuildRoot and Motion

Sun Sep 21, 2014 11:02 am

I think we can't make more accurate. I just know about motionEye and investigate this way.
Thank's again :)
ccrisan wrote:You can in theory add as many cameras as you want to any motionPie instance (regardless of the camera type). You are however limited by the processing power of a Raspberry PI. For adding more cameras you have 3 options, all of them starting by choosing the "Add camera..." option in the menu:
1) add a(nother) USB camera - it should be visible to the OS as /dev/video1
2) add a network (IP) camera - the challenge is to find the right URL at which your camera sends (M)JPG data
3) add a remote motionEye camera - allows daisy-chaining of motionEye (or motionPie) cameras, currently works only for two levels of chaining

I hope this helps.
Ookpik wrote:Great job ccrisan.
I read on the blog page (averagemanvsraspberrypi.com) that 3 Pis running on MotionPie (image from MotionPie site) and "you can run more than one Pi camera on MotionPie as well" . Can you tell more about it ?
Thanks :)

tuff
Posts: 5
Joined: Sun Sep 08, 2013 4:03 pm

Re: Surveillance camera based on BuildRoot and Motion

Sun Sep 21, 2014 8:42 pm

ccrisan wrote:The problem may be the fact that the kernel does not re-read the partition table of the USB storage device after writing the image to it. Your best bet now is to write the image as you normally do, with dd (from whatever OS you have), then comment out the line with dd in writeimage.sh and execute the script. It should work as expected. Let me know how this works out for you.
Kirkbybil wrote:These are the last few lines of dmesg:

[ 44.622147] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null)
[ 165.424316] EXT4-fs (sda1): VFS: Can't find ext4 filesystem
[ 165.430205] EXT4-fs (sda1): VFS: Can't find ext4 filesystem
[ 165.432112] EXT4-fs (sda1): VFS: Can't find ext4 filesystem
[ 165.434321] FAT-fs (sda1): bogus number of reserved sectors
[ 165.434352] FAT-fs (sda1): Can't find a valid FAT filesystem
[ 165.440475] FAT-fs (sda1): bogus number of reserved sectors
[ 165.440512] FAT-fs (sda1): Can't find a valid FAT filesystem
[ 165.442648] F2FS-fs (sda1): Magic Mismatch, valid(0xf2f52010) - read(0x0)
[ 165.442678] F2FS-fs (sda1): Can't find a valid F2FS filesystem in first superblock
[ 165.443679] F2FS-fs (sda1): Magic Mismatch, valid(0xf2f52010) - read(0x0)
[ 165.443705] F2FS-fs (sda1): Can't find a valid F2FS filesystem in second superblock
I can confirm that in Ubuntu. After getting the same script failure and response in dmesg, I tried manually mounting the partition with the same result. Removing the card and putting it back in my card reader was all that was needed. I commented out the dd line in the script afterwards and the rest of the script ran fine.

After wiping the contents of my sdcard partition again, I tried modifying the script with:
partprobe ${SDCARD_DEV}

...after the dd and sync commands. That seemed to fix the issue.

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

Sun Sep 21, 2014 8:45 pm

I must confess I didn't know about the partprobe command. I'll add it to writeimage.sh. Thanks.
tuff wrote:
ccrisan wrote:The problem may be the fact that the kernel does not re-read the partition table of the USB storage device after writing the image to it. Your best bet now is to write the image as you normally do, with dd (from whatever OS you have), then comment out the line with dd in writeimage.sh and execute the script. It should work as expected. Let me know how this works out for you.
Kirkbybil wrote:These are the last few lines of dmesg:

[ 44.622147] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null)
[ 165.424316] EXT4-fs (sda1): VFS: Can't find ext4 filesystem
[ 165.430205] EXT4-fs (sda1): VFS: Can't find ext4 filesystem
[ 165.432112] EXT4-fs (sda1): VFS: Can't find ext4 filesystem
[ 165.434321] FAT-fs (sda1): bogus number of reserved sectors
[ 165.434352] FAT-fs (sda1): Can't find a valid FAT filesystem
[ 165.440475] FAT-fs (sda1): bogus number of reserved sectors
[ 165.440512] FAT-fs (sda1): Can't find a valid FAT filesystem
[ 165.442648] F2FS-fs (sda1): Magic Mismatch, valid(0xf2f52010) - read(0x0)
[ 165.442678] F2FS-fs (sda1): Can't find a valid F2FS filesystem in first superblock
[ 165.443679] F2FS-fs (sda1): Magic Mismatch, valid(0xf2f52010) - read(0x0)
[ 165.443705] F2FS-fs (sda1): Can't find a valid F2FS filesystem in second superblock
I can confirm that in Ubuntu. After getting the same script failure and response in dmesg, I tried manually mounting the partition with the same result. Removing the card and putting it back in my card reader was all that was needed. I commented out the dd line in the script afterwards and the rest of the script ran fine.

After wiping the contents of my sdcard partition again, I tried modifying the script with:
partprobe ${SDCARD_DEV}

...after the dd and sync commands. That seemed to fix the issue.

bench2010
Posts: 5
Joined: Sun Apr 21, 2013 4:43 am

Re: Surveillance camera based on BuildRoot and Motion

Mon Sep 22, 2014 3:24 am

Could I compile and use grive to upload screenshots to google drive? I'm wondering if anyone has tried that, or has a different solution for moving file around.

Dozer
Posts: 3
Joined: Thu Jun 06, 2013 7:00 am

Re: Surveillance camera based on BuildRoot and Motion

Mon Sep 22, 2014 6:33 pm

Hi,

I've just installed motionPie and it's running well, easy to connect to on my network. Is it possible to set it up so that it can be viewed from the internet?
Last edited by Dozer on Mon Sep 22, 2014 9:58 pm, edited 1 time in total.

Dozer
Posts: 3
Joined: Thu Jun 06, 2013 7:00 am

Re: Surveillance camera based on BuildRoot and Motion

Mon Sep 22, 2014 9:57 pm

I also cannot get motionpie to use my Synology NAS for file storage.
I've tried for hours and it's probably something really simple but I'm stuck. I've read a previous post but it's not worked for me.
My NAS is setup for SMB as my partner uses it for connection of her mobile devices.
The path for the folder I want to save to is

I set Network Server as: '192.166.3.106' which is the NAS IP address.
I set Share Name as 'volume1'.
I set Share Username as 'motionpie' which is the new user I've setup on my NAS.
Password is set for the above username.
I set Root Directory as 'motionpie' which is the shared folder on my NAS that I wan the videos to be saved to.

I'm sorry if this is a stupid request, but can anyone help?
Thank you.

bench2010
Posts: 5
Joined: Sun Apr 21, 2013 4:43 am

Re: Surveillance camera based on BuildRoot and Motion

Tue Sep 23, 2014 2:24 am

My Email Notifications isn't working. Could you guys help me with the settings? Has anyone got the email notifications to work with gmail?

my not working setup:
Email Addresses: [email protected]
SMTP Server smtp.gmail.com
SMTP Port 587
SMTP Account [email protected]
SMTP Password my gmail password
Use TLS ON

I've enabled imap in my gmail settings if that matters.

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 23, 2014 6:31 am

I'm afraid that is up to your router's configuration.
Dozer wrote:Hi,

I've just installed motionPie and it's running well, easy to connect to on my network. Is it possible to set it up so that it can be viewed from the internet?

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 23, 2014 6:34 am

The share name should be the name of the shared folder (the folder configured as shared) on your NAS. I'm not sure if that is "volume1" indeed. Anyways it should appear in "smbclient -L 192.166.3.106" in the column "Sharename". Root directory is whatever you want it to be, it will be automatically created if it doesn't exist.
Dozer wrote:I also cannot get motionpie to use my Synology NAS for file storage.
I've tried for hours and it's probably something really simple but I'm stuck. I've read a previous post but it's not worked for me.
My NAS is setup for SMB as my partner uses it for connection of her mobile devices.
The path for the folder I want to save to is

I set Network Server as: '192.166.3.106' which is the NAS IP address.
I set Share Name as 'volume1'.
I set Share Username as 'motionpie' which is the new user I've setup on my NAS.
Password is set for the above username.
I set Root Directory as 'motionpie' which is the shared folder on my NAS that I wan the videos to be saved to.

I'm sorry if this is a stupid request, but can anyone help?
Thank you.

Return to “Camera board”