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:37 am

SSH-ing into the machine and looking for error messages in /tmp/motion.log should give you some hints. I'll move this file to /var/log and make it persistent in the next release.
bench2010 wrote: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.

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

Re: Surveillance camera based on BuildRoot and Motion

Tue Sep 23, 2014 9:56 am

Thanks for your reply ccrisan, I have now sorted this. Simple mistake, I had not configured the user correctly on the NAS.
ccrisan wrote: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.

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 24, 2014 3:46 pm

I've released a new version (20140924) with a couple of features that were suggested during the past few weeks:
* support for static IP (using writeimage.sh)
* support for custom listen port (using writeimage.sh)
* option to disable rebooting when wireless connection is lost or unavailable
* added reboot and shutdown buttons
* better support for hidden wireless networks (untested)
* motion.log is now persisted in /var/log on the data partition

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

Re: Surveillance camera based on BuildRoot and Motion

Wed Sep 24, 2014 6:51 pm

Hi, I gave up in the end with the writeimage script. I tried on three different laptops including one running Ubuntu and one Mint and all failed with mount errors. I needed to get them working quickly so I just copied the image to the SD card and edited config.txt to disable the camera LED. I don't have fixed IP but I can manage.

I now have three Rasperberry Pi equipped birdboxes, all with NOIR cameras and IR LED's working great thank you.

My only question is - is it possible to get all three cameras in the same Motioneye window? I'm sure I managed this while testing but now, although I can open each in separate instances, I cannot open more than one in one browser window. I have tried Safari, Chrome & Firefox. When I add the second / third camera I add 'Network Camera' (My only other choice is 'Remote Motioneye camera'. I add the URL as 'http://192.168.xx.xx:80' (I have tried 80, 8080, 8081 etc. Username 'root' Password '<=serial number> . I don't get any field for 'Camera'. When I press okay I just get a grey box that says 'Unable to open video device since...' with the time ticking.

AM I doing something 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 25, 2014 6:31 am

Add two Remote Motioneye cameras to a third motionPie. Don't add them as Network cameras (the CPU of a PI won't be sufficient for such a scenario). An even better scenario is to install motionEye (not motionPie!) on a fourth PC and use it just for watching the three remote motioneye cameras.
Kirkbybil wrote:Hi, I gave up in the end with the writeimage script. I tried on three different laptops including one running Ubuntu and one Mint and all failed with mount errors. I needed to get them working quickly so I just copied the image to the SD card and edited config.txt to disable the camera LED. I don't have fixed IP but I can manage.

I now have three Rasperberry Pi equipped birdboxes, all with NOIR cameras and IR LED's working great thank you.

My only question is - is it possible to get all three cameras in the same Motioneye window? I'm sure I managed this while testing but now, although I can open each in separate instances, I cannot open more than one in one browser window. I have tried Safari, Chrome & Firefox. When I add the second / third camera I add 'Network Camera' (My only other choice is 'Remote Motioneye camera'. I add the URL as 'http://192.168.xx.xx:80' (I have tried 80, 8080, 8081 etc. Username 'root' Password '<=serial number> . I don't get any field for 'Camera'. When I press okay I just get a grey box that says 'Unable to open video device since...' with the time ticking.

AM I doing something wrong?

Luky
Posts: 3
Joined: Thu Sep 25, 2014 9:21 am

Re: Surveillance camera based on BuildRoot and Motion

Thu Sep 25, 2014 9:36 am

Very nice program!!

Im using it for 2 month now and its works perfect.
But i have a question.
Is it possible to activate or chance the automatic white balance (AWB)?
In low light, the picture is very dark.
And when I reboot the raspberry then is the picture good.
If it be brighter than the image is overexposed, and I have to reboot again to get the picture good.


Luciën

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 25, 2014 10:41 am

The auto_brightness option of motion is not recommended in most cases and personally I had problems with it. I recommend using a camera with automatic white balance support (most of the cameras have this feature).
Luky wrote:Very nice program!!

Im using it for 2 month now and its works perfect.
But i have a question.
Is it possible to activate or chance the automatic white balance (AWB)?
In low light, the picture is very dark.
And when I reboot the raspberry then is the picture good.
If it be brighter than the image is overexposed, and I have to reboot again to get the picture good.


Luciën

Luky
Posts: 3
Joined: Thu Sep 25, 2014 9:21 am

Re: Surveillance camera based on BuildRoot and Motion

Thu Sep 25, 2014 11:16 am

Thanks for the answer,

I understand that there are problems whit motion when using AWB.
But i use the original raspberry camera and not a external webcam.
For now i use Motion detection on my Synology Nas and securitystation.
There for I want to know how i can change this setting.

sidb
Posts: 23
Joined: Tue Jul 03, 2012 9:05 pm

Re: Surveillance camera based on BuildRoot and Motion

Sat Sep 27, 2014 12:10 pm

Hi - been trying to get this going for ages now and no joy. I have two Pis - a model A and a very early model B.

Have tried multiple downloads, multple SD cards.

On the B, the ethernet link lights come up for a short while but then go out again. I even had an ssh prompt briefly after one boot but then I assume it crashed.

Github says "a Raspberry PI (any model and revision should be fine)" but I can't see how to do initial setup on the model A which doesn't have ethernet, and my old model B doesn't want to play ball.

Any suggestions please? Do I need a Pi with 512 MB of RAM?

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 27, 2014 12:35 pm

The symptoms of your model B crashing quickly after boot indicate in 90% of the cases a bad power supply. Try using a better one (i.e. higher max current, possibly a 5.25V one, shorter and thicker wires).

Regarding the model A with no ethernet, you have to use the writeimage.sh script and preconfigure your wireless connection (and optionally a static IP). You must run Linux (or maybe OSX) to use writeimage.sh.
sidb wrote:Hi - been trying to get this going for ages now and no joy. I have two Pis - a model A and a very early model B.

Have tried multiple downloads, multple SD cards.

On the B, the ethernet link lights come up for a short while but then go out again. I even had an ssh prompt briefly after one boot but then I assume it crashed.

Github says "a Raspberry PI (any model and revision should be fine)" but I can't see how to do initial setup on the model A which doesn't have ethernet, and my old model B doesn't want to play ball.

Any suggestions please? Do I need a Pi with 512 MB of RAM?

sidb
Posts: 23
Joined: Tue Jul 03, 2012 9:05 pm

Re: Surveillance camera based on BuildRoot and Motion

Sat Sep 27, 2014 12:47 pm

Thanks - I'll give these suggestions a go.

I'm using an official Apple iPad PSU which is rated 5.1V, 2.1A and has never given me any problems with other PI images, even with loads of gubbins hanging off the GPIO.

I shall keep trying, including using writeimage.sh for the A (apologies, I had missed the fact that I could configure WiFi settings with the script).

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 27, 2014 12:54 pm

Your PSU seems alright. There might by an issue with the polyfuses earlier B models had mounted on the power supply circuit as well as on the USB power line. I remember having problems with them limiting the current drawn. I recommend bypassing them as decribed here: http://theiopage.blogspot.ro/2012/06/in ... -host.html.
sidb wrote:Thanks - I'll give these suggestions a go.

I'm using an official Apple iPad PSU which is rated 5.1V, 2.1A and has never given me any problems with other PI images, even with loads of gubbins hanging off the GPIO.

I shall keep trying, including using writeimage.sh for the A (apologies, I had missed the fact that I could configure WiFi settings with the script).

sidb
Posts: 23
Joined: Tue Jul 03, 2012 9:05 pm

Re: Surveillance camera based on BuildRoot and Motion

Sat Sep 27, 2014 3:22 pm

Sadly I remain totally baffled. Have now tried writing to 2 different SD cards from Windows, Mac and a Pi running Raspbian.

I have no problem writing my Raspbian backup using any of the above and then booting on either Pi, but I just can't get this MotionPie (or the previous image) to boot on either.

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 27, 2014 4:21 pm

Use writeimage.sh from a Linux if you must use motionPie with a Raspberry PI model A. Let me know what the output of the command looks like.
sidb wrote:Sadly I remain totally baffled. Have now tried writing to 2 different SD cards from Windows, Mac and a Pi running Raspbian.

I have no problem writing my Raspbian backup using any of the above and then booting on either Pi, but I just can't get this MotionPie (or the previous image) to boot on either.

sidb
Posts: 23
Joined: Tue Jul 03, 2012 9:05 pm

Re: Surveillance camera based on BuildRoot and Motion

Sat Sep 27, 2014 4:39 pm

ccrisan wrote:Use writeimage.sh from a Linux if you must use motionPie with a Raspberry PI model A. Let me know what the output of the command looks like.
I used writeimage.sh on a Pi:

Code: Select all

[email protected] ~ $ ./writeimage.sh -d /dev/sda1 -i ./motionPie-20140924.img -n orchard:xxxxxx
:: writing disk image to sdcard
140+0 records in
140+0 records out
146800640 bytes (147 MB) copied, 17.1915 s, 8.5 MB/s
:: re-reading sdcard partition table
Error: Error informing the kernel about modifications to partition /dev/sda1p1 -- Invalid argument.  This means Linux won't know about any changes you made to /dev/sda1p1 until you reboot -- so you shouldn't mount it or use it in any way before rebooting.
Error: Failed to add partition 1 (Invalid argument)
[email protected] ~ $ 
Last edited by sidb on Sat Sep 27, 2014 4:44 pm, edited 1 time in total.

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 27, 2014 4:44 pm

It is very likely that your sdcard device is in fact /dev/sda, and not /dev/sda1 (which stands for the first partition). Give it a try with -d /dev/sda and come back with the output you get now.
sidb wrote:I used write image.sh on a Pi:

Code: Select all

[email protected] ~ $ ./writeimage.sh -d /dev/sda1 -i ./motionPie-20140924.img -n orchard:xxxxxx
:: writing disk image to sdcard
140+0 records in
140+0 records out
146800640 bytes (147 MB) copied, 17.1915 s, 8.5 MB/s
:: re-reading sdcard partition table
Error: Error informing the kernel about modifications to partition /dev/sda1p1 -- Invalid argument.  This means Linux won't know about any changes you made to /dev/sda1p1 until you reboot -- so you shouldn't mount it or use it in any way before rebooting.
Error: Failed to add partition 1 (Invalid argument)
[email protected] ~ $ 

sidb
Posts: 23
Joined: Tue Jul 03, 2012 9:05 pm

Re: Surveillance camera based on BuildRoot and Motion

Sat Sep 27, 2014 11:23 pm

Thanks - after a few more attempts, and following your pointer with /dev/sda, I finally got up and running. Need to put it through its paces but the web interface looks really impressive.

Is there a significant difference in performance with motionPie betweeen 256 & 512 MB models?

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 28, 2014 4:45 pm

Version 20140928 is out. Here's what's new:
* implemented downloading of zip file with pictures
* implemented timelapse movie creation
* better media browser layout
* added a delete button for media files
* fixed still images "all frames" capture mode
* removed reboot button (it was pointless)

PISang99
Posts: 6
Joined: Sun Sep 28, 2014 4:35 pm

Re: Surveillance camera based on BuildRoot and Motion

Sun Sep 28, 2014 6:04 pm

Hello there,

This is exactly what I want for my Raspberry-PI. Unfortunately there are two things I can't seem to get working.

1.] Wifi
2.] Networkshare

What I did so far:
Installed the latest image with the writeimage script to the memorycard

Code: Select all

writeimage.sh -d /dev/sdx -i motionPie-20140924.img -n 'My SSID':'My Password' -l -p 8082 -s 1.2.3.4/24 1.2.3.254 1.2.3.254
IP - GW - DNS (GW and DNS are the same in my network) The SSID and Password I put in between ' ' due to spaces and characters linux interprets as commands like the !.

Logged in to my router and see that the WiFi is connected and active (has an A in front of it, could be a B for blocked and some other choices. The A stands for connected with WPA2.
When I do a ping a get a no route to host.

When I reinstall the image with no option and put in a cable in the ethernet port I can connect to the number given by the dhcp server.

I then can enable WiFi from the web interface but still there is no connection possible. Ifconfig tells me there is no IP4 IPadress given to the WiFi connection (connected through ssh and then ifconfig)

I tried to create a file interfaces in /etc/network (by default it does not exist) and reboot but still no luck. I tried it with and without the wpa_supplicant (directly add the SSID and password to the /etc/network/interfaces file)
I know the WiFi dongle can work with the Rapsberry (raspbian_wheezy_20140726.img) because when I install the original Wheezy image from the Raspberry site and edit the /etc/network/interfaces file as mentioned above the WiFi is connected through DHCP. So it must be something in the BuildRoot image.

The second problem is the network share. Even with the network cable attached there is no streaming video when I put in the desired information like the IP number of the NAS, the sharename (complete), the username, the password and the start of the root dir. When I leave it on the memory card I can see the stream.

IP = 1.2.3.4
share is c/media/[path2]/[folder]
name is my name for the nas share
password is my password for the nas share
root starting point is /

If have tried this with motion on the image mentioned above and then it is working, I can also connect to the share on the nas from my PC using lines in the fstab file.

Adding the desired line in the fstab file pointing to a directory in the /data partion does not help. (First created a directory Share in /data, then chmod 777 Share to get full access to the directory) and afterwards rebooted the RPI

So please what is it that I do wrong and what should I do to fix it? If these two problems are solved I can use this image and don't need to use the original wheezy image from Raspberry with all the ballast I do not need.

Thanks.

Arthur

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 28, 2014 8:39 pm

Your first problem (the IP-related one) may be because you separate the arguments following the "-s" by a space and not by a colon ":" when running writeimage.sh. Your command should look like this:

Code: Select all

writeimage.sh -d /dev/sdx -i motionPie-20140924.img -n "My SSID:My Password" -l -p 8082 -s "1.2.3.4/24:1.2.3.254:1.2.3.254"
For the second issue it looks like you mixed up the share name and the root directory. It should be something like:
IP = 1.2.3.4
share = name_of_the_share_without_slashes
password = ****
root = c/media/[path2]/[folder]

I hope this helps.
PISang99 wrote:Hello there,

This is exactly what I want for my Raspberry-PI. Unfortunately there are two things I can't seem to get working.

1.] Wifi
2.] Networkshare

What I did so far:
Installed the latest image with the writeimage script to the memorycard

Code: Select all

writeimage.sh -d /dev/sdx -i motionPie-20140924.img -n 'My SSID':'My Password' -l -p 8082 -s 1.2.3.4/24 1.2.3.254 1.2.3.254
IP - GW - DNS (GW and DNS are the same in my network) The SSID and Password I put in between ' ' due to spaces and characters linux interprets as commands like the !.

Logged in to my router and see that the WiFi is connected and active (has an A in front of it, could be a B for blocked and some other choices. The A stands for connected with WPA2.
When I do a ping a get a no route to host.

When I reinstall the image with no option and put in a cable in the ethernet port I can connect to the number given by the dhcp server.

I then can enable WiFi from the web interface but still there is no connection possible. Ifconfig tells me there is no IP4 IPadress given to the WiFi connection (connected through ssh and then ifconfig)

I tried to create a file interfaces in /etc/network (by default it does not exist) and reboot but still no luck. I tried it with and without the wpa_supplicant (directly add the SSID and password to the /etc/network/interfaces file)
I know the WiFi dongle can work with the Rapsberry (raspbian_wheezy_20140726.img) because when I install the original Wheezy image from the Raspberry site and edit the /etc/network/interfaces file as mentioned above the WiFi is connected through DHCP. So it must be something in the BuildRoot image.

The second problem is the network share. Even with the network cable attached there is no streaming video when I put in the desired information like the IP number of the NAS, the sharename (complete), the username, the password and the start of the root dir. When I leave it on the memory card I can see the stream.

IP = 1.2.3.4
share is c/media/[path2]/[folder]
name is my name for the nas share
password is my password for the nas share
root starting point is /

If have tried this with motion on the image mentioned above and then it is working, I can also connect to the share on the nas from my PC using lines in the fstab file.

Adding the desired line in the fstab file pointing to a directory in the /data partion does not help. (First created a directory Share in /data, then chmod 777 Share to get full access to the directory) and afterwards rebooted the RPI

So please what is it that I do wrong and what should I do to fix it? If these two problems are solved I can use this image and don't need to use the original wheezy image from Raspberry with all the ballast I do not need.

Thanks.

Arthur

sidb
Posts: 23
Joined: Tue Jul 03, 2012 9:05 pm

Re: Surveillance camera based on BuildRoot and Motion

Mon Sep 29, 2014 10:25 am

Hi - 2 questions...

Firstly, would you rather that I ask a question here or create an issue in GitHub?

Secondly, I updated from 20140924 to 20140928 using the Software Update button in the web interface, and the interface now shows that I am indeed running 20140928 . I can see that the Reboot button has disappeared, but I can't find any of the other changes mentioned in the release description: zip files, timelapse, media browser layout, delete button?

Am really impressed with this software by the way, it's great to find a plug-and-play solution for the Pi which isn't a media player! Please keep up the good work.

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

Mon Sep 29, 2014 10:29 am

If you think it's an issue, you're invited to create one on GitHub. If it's just a question then feel free to ask it here on the forum.

The new features are probably missing from the UI because of your browser's cache. Hit Ctrl+F5 a couple of times and you should see the changes in the media browser.
sidb wrote:Hi - 2 questions...

Firstly, would you rather that I ask a question here or create an issue in GitHub?

Secondly, I updated from 20140924 to 20140928 using the Software Update button in the web interface, and the interface now shows that I am indeed running 20140928 . I can see that the Reboot button has disappeared, but I can't find any of the other changes mentioned in the release description: zip files, timelapse, media browser layout, delete button?

Am really impressed with this software by the way, it's great to find a plug-and-play solution for the Pi which isn't a media player! Please keep up the good work.

sidb
Posts: 23
Joined: Tue Jul 03, 2012 9:05 pm

Re: Surveillance camera based on BuildRoot and Motion

Mon Sep 29, 2014 11:19 am

ccrisan wrote:The new features are probably missing from the UI because of your browser's cache. Hit Ctrl+F5 a couple of times and you should see the changes in the media browser
Different browser... ...and there they are! :oops:

valtr
Posts: 2
Joined: Tue Sep 30, 2014 11:29 pm

Re: Surveillance camera based on BuildRoot and Motion

Tue Sep 30, 2014 11:32 pm

Hi, is there a way to password-protect the web access? I know there is a parameter in motion.conf but I could not find the motion.conf in the 09282014 build.

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

Wed Oct 01, 2014 7:26 am

Hi,

There's no parameter to protect the access to the mjpeg stream (as far as I know). The password settings for the web UI are at the top of the settings menu.

valtr wrote:Hi, is there a way to password-protect the web access? I know there is a parameter in motion.conf but I could not find the motion.conf in the 09282014 build.

Thanks!

Return to “Camera board”