Mikiya
Posts: 3
Joined: Tue Jan 05, 2016 2:31 pm

Re: Surveillance camera based on BuildRoot and Motion

Tue Jan 05, 2016 2:44 pm

skarabe wrote:Hi
I'm new to MotionEyeOS and must say you have done a great job, making the Pi accessible for surveillance purposes for a non tech wizard like me.

However, one thing puzzles me. I don't want to fill up my NAS with movies of me walking around at home. I want the motion detection running when I'm away and off when I'm home. I'm aware of the schedule possibility, but my life doesn't follow a schedule like that. With the schedule, there would still be loads of movies of myself + motion detection would sometimes be off when I'm away.

Naturally, the cream of awesomeness would be if the MotionEyeOS could detect the state of my alarm system and activate motion detection when the system is armed, but I realize that will be a tough one.. So, to bump RPi85's idea with external triggering, I have another question. Is there as command I could run from a SSH session that would start (and stop) the motion detection? If Yes, maybe I could find a way to have my automation system connect via SSH and start/stop the motion detection depending on the state of my alarm.

While you're at it - is there a shell command to start/stop recording? That would be of interest in case my alarm system goes into an "in alarm" state.

Thanks!
ccrisan wrote: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.
I use it exactly like that.
I have an init script that ping regularly defined smartphones. If none detected, script calls another script to start motionEye init.d (motion process is started with it). When a smartphone is detected, it stops motionEye by init.d too. With a SSH priv/pub keys the process can be automatic.

Another question : Does the RPi2 version of MotionEyeOs use MMAL-motion and optimized for RPi2 ? I have a RPi1 and think about buying RPi2 to improve perf but i'm not sure now that RPi2 is better for now, apparently it depends on motion version.

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 Jan 05, 2016 4:06 pm

Hi Mikiya,

Yes, normally all models of RPi will use motion-mmal if (and only if) there's one single camera and that is a bcm2835-v4l2-based camera. However from my experience I haven't seen any perceivable experience between using motion-mrdave and motion-mmal.

Mikiya
Posts: 3
Joined: Tue Jan 05, 2016 2:31 pm

Re: Surveillance camera based on BuildRoot and Motion

Tue Jan 05, 2016 4:18 pm

Thanks for your quick response :D
What about this thread : viewtopic.php?f=43&t=99096 ? People get the same perf with Pi2, because a specific version of motion (ARMv7 and NEON) seems needed to improve that between RPi1 and 2. Is it really the case ? Have you ever tested perfs between RPi1&2 ?

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

Re: Surveillance camera based on BuildRoot and Motion

Thu Jan 07, 2016 8:14 pm

I want to make sure that my motioneyeos installation won't run out of free space by overwriting oldest recordings. I found this script that deletes oldest files if free disk space is under X percent. The script takes a mount point (to keep an eye on) and a percentage (maximum used capacity threshold) as arguments.

I can see that the mount point for recordings is /home/ftp/sdcard. Would there be any problems running this script at regular intervals using cron?

edit: also, where should I store the script to make sure it survives software updates?

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 Jan 08, 2016 7:39 am

Hi,

The "official" mount point is /data/. /home/ftp/sdcard is just a bind mount to /data/output.

Anything that is stored under /data will survive upgrades: https://github.com/ccrisan/motioneyeos/ ... ion-layout.
RPi85 wrote:I want to make sure that my motioneyeos installation won't run out of free space by overwriting oldest recordings. I found this script that deletes oldest files if free disk space is under X percent. The script takes a mount point (to keep an eye on) and a percentage (maximum used capacity threshold) as arguments.

I can see that the mount point for recordings is /home/ftp/sdcard. Would there be any problems running this script at regular intervals using cron?

edit: also, where should I store the script to make sure it survives software updates?

Mikiya
Posts: 3
Joined: Tue Jan 05, 2016 2:31 pm

Re: Surveillance camera based on BuildRoot and Motion

Fri Jan 08, 2016 9:39 am

And what about motion for RPi2 ? Is it a "special" version for armv7 ? Does it improve drastically perf compare to RPi1 ?

Thanks !

skarabe
Posts: 2
Joined: Wed Dec 30, 2015 8:19 am

Re: Surveillance camera based on BuildRoot and Motion

Fri Jan 08, 2016 11:35 am

Mikiya wrote:
skarabe wrote: Is there as command I could run from a SSH session that would start (and stop) the motion detection?
I have an init script that ping regularly defined smartphones. If none detected, script calls another script to start motionEye init.d (motion process is started with it). When a smartphone is detected, it stops motionEye by init.d too. With a SSH priv/pub keys the process can be automatic.
Thanks Mikiya! Works great. I now have my Vera 3 controller starting/stopping the MotionEye service depending on the state of my alarm system. Haven't tested it very much, so I don't know if keys etc will be persistant after Vera reboot..

Another question (asked before): Is there a command to start and stop recording? There might be situations I want to record video, even if there is no motion detected - say the Alarm system goes into an "In alarm" state, or my smoke detectors for some reason goes on..

Yet another question: I have set my videos to be kept for one day, but they never get deleted - I have to do this manually. How is this supposed to 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

Fri Jan 08, 2016 12:13 pm

There's no start/stop recording command (yet). If your files don't get removed after the time you have set, please send me your log files.
skarabe wrote:
Mikiya wrote:
skarabe wrote: Is there as command I could run from a SSH session that would start (and stop) the motion detection?
I have an init script that ping regularly defined smartphones. If none detected, script calls another script to start motionEye init.d (motion process is started with it). When a smartphone is detected, it stops motionEye by init.d too. With a SSH priv/pub keys the process can be automatic.
Thanks Mikiya! Works great. I now have my Vera 3 controller starting/stopping the MotionEye service depending on the state of my alarm system. Haven't tested it very much, so I don't know if keys etc will be persistant after Vera reboot..

Another question (asked before): Is there a command to start and stop recording? There might be situations I want to record video, even if there is no motion detected - say the Alarm system goes into an "In alarm" state, or my smoke detectors for some reason goes on..

Yet another question: I have set my videos to be kept for one day, but they never get deleted - I have to do this manually. How is this supposed to work?

mad_marko
Posts: 27
Joined: Thu Nov 07, 2013 11:25 am

Re: Surveillance camera based on BuildRoot and Motion

Mon Jan 25, 2016 1:27 pm

Hi, is there a list of non-Raspberry Pi cameras which are known to NOT plug into the web interface well?

I have my eye on an auction for an outdoor camera with IR lights but it's all very Chinese looking and has features like "cloud support" which makes me wonder if it's going to be difficult to communicate with the Motion Pie web interface.

hans12345
Posts: 4
Joined: Wed Jan 27, 2016 1:36 pm

Re: Surveillance camera based on BuildRoot and Motion

Wed Jan 27, 2016 1:54 pm

Somehow the notification mails do not contain attachments i.e. cam pictures. I can see in the output directories that pictures are made, they are just not attached. MotionEye.log shows a.o:

2016-01-27 14:05:05: [motioneye] ERROR: mjpg client for camera 1 on port 8081 error: [Errno 32] Broken pipe
2016-01-27 14:05:06: [motioneye] ERROR: connection problem detected for mjpg client for camera 1 on port 8081
2016-01-27 14:05:14: [motioneye] ERROR: mjpg client for camera 1 on port 8081 error: [Errno 32] Broken pipe
2016-01-27 14:05:15: [motioneye] ERROR: connection problem detected for mjpg client for camera 1 on port 8081
2016-01-27 14:05:21: [motioneye] ERROR: mjpg client for camera 1 on port 8081 error: [Errno 32] Broken pipe
2016-01-27 14:05:22: [motioneye] ERROR: connection problem detected for mjpg client for camera 1 on port 8081
2016-01-27 14:14:43: [motioneye] ERROR: mjpg client timed out receiving data for camera 1 on port 8081
2016-01-27 14:14:57: [motioneye] WARNING: mjpg client connection for camera 1 on port 8081 is closed
2016-01-27 14:15:49: [sendmail] ERROR: timeout waiting for the media listing process to finish
2016-01-27 14:15:51: [sendmail] INFO: email sent
2016-01-27 14:23:33: [sendmail] ERROR: timeout waiting for the media listing process to finish
2016-01-27 14:23:36: [sendmail] INFO: email sent


I have experimented with "Attached Pictures Time Span" changed 10 to 5 to 15 seconds, but to no avail. I have started with a fresh image and then for some time pictures are attached.

Any clues what I can do?

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 Jan 27, 2016 3:18 pm

You have that "[sendmail] ERROR: timeout waiting for the media listing process to finish" message which clearly states what's going on: you simply have too many media files and motionEyeOS cannot finish parsing all of them in time. The solution is to keep your media directory clean by preserving one day or one week worth of media files, depending on your scenarios and use cases.
hans12345 wrote:Somehow the notification mails do not contain attachments i.e. cam pictures. I can see in the output directories that pictures are made, they are just not attached. MotionEye.log shows a.o:

2016-01-27 14:05:05: [motioneye] ERROR: mjpg client for camera 1 on port 8081 error: [Errno 32] Broken pipe
2016-01-27 14:05:06: [motioneye] ERROR: connection problem detected for mjpg client for camera 1 on port 8081
2016-01-27 14:05:14: [motioneye] ERROR: mjpg client for camera 1 on port 8081 error: [Errno 32] Broken pipe
2016-01-27 14:05:15: [motioneye] ERROR: connection problem detected for mjpg client for camera 1 on port 8081
2016-01-27 14:05:21: [motioneye] ERROR: mjpg client for camera 1 on port 8081 error: [Errno 32] Broken pipe
2016-01-27 14:05:22: [motioneye] ERROR: connection problem detected for mjpg client for camera 1 on port 8081
2016-01-27 14:14:43: [motioneye] ERROR: mjpg client timed out receiving data for camera 1 on port 8081
2016-01-27 14:14:57: [motioneye] WARNING: mjpg client connection for camera 1 on port 8081 is closed
2016-01-27 14:15:49: [sendmail] ERROR: timeout waiting for the media listing process to finish
2016-01-27 14:15:51: [sendmail] INFO: email sent
2016-01-27 14:23:33: [sendmail] ERROR: timeout waiting for the media listing process to finish
2016-01-27 14:23:36: [sendmail] INFO: email sent


I have experimented with "Attached Pictures Time Span" changed 10 to 5 to 15 seconds, but to no avail. I have started with a fresh image and then for some time pictures are attached.

Any clues what I can do?

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

Re: Surveillance camera based on BuildRoot and Motion

Wed Jan 27, 2016 9:59 pm

Has anyone encountered the following:
If using the Raspberry camera board with MotionEye, only resolutions 1280x720, 1024x576, 800x480, 640x480, 320x240 work.
If you boot the system in a dark environment when any other resolution is used and the put the lights on, camera will only show a dark, green image (attached).
If you boot the system in a well lit environment when any other resolution is used and the lighting environment changes, you're going to have problems with under or over exposure and sometimes the dark green tinted image as before.

This doesn't apply to MotionEyeOS, where any resolution works. I have tested this with two completely different hardware with official Pi's and camera boards (normal, not the NoIR ones). MotionEye was installed using the guide here: https://github.com/ccrisan/motioneye/wi ... n-Raspbian

I'm pretty sure this must be a known feature, but I couldn't find this mentioned in the documentation or with some Googling.
Attachments
Capture.jpg
Capture.jpg (51.92 KiB) Viewed 9993 times

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 Jan 28, 2016 7:23 am

See modinfo bcm2835-v4l2, especially parameters max_video_width and max_video_height. They determine the resolution limit between video mode and stills mode. motionEyeOS has max_video_width=2592 max_video_height=1944 which will practically always force video mode.
RPi85 wrote:Has anyone encountered the following:
If using the Raspberry camera board with MotionEye, only resolutions 1280x720, 1024x576, 800x480, 640x480, 320x240 work.
If you boot the system in a dark environment when any other resolution is used and the put the lights on, camera will only show a dark, green image (attached).
If you boot the system in a well lit environment when any other resolution is used and the lighting environment changes, you're going to have problems with under or over exposure and sometimes the dark green tinted image as before.

This doesn't apply to MotionEyeOS, where any resolution works. I have tested this with two completely different hardware with official Pi's and camera boards (normal, not the NoIR ones). MotionEye was installed using the guide here: https://github.com/ccrisan/motioneye/wi ... n-Raspbian

I'm pretty sure this must be a known feature, but I couldn't find this mentioned in the documentation or with some Googling.

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

Re: Surveillance camera based on BuildRoot and Motion

Thu Jan 28, 2016 3:41 pm

I can confirm that by running modprobe bcm2835-v4l2 max_video_width=2592 max_video_height=1944 the problem is fixed, thanks!

What would be the best way to do this automatically? I removed the module from /etc/modules and added the above command to crontab as @reboot, which seems to work.

southafricanrob
Posts: 31
Joined: Wed Sep 18, 2013 12:54 pm

Re: Surveillance camera based on BuildRoot and Motion

Mon Feb 08, 2016 12:29 pm

Hi,
I am trying to install the new motioneye on raspbian and am getting stuck trying to run systemctl daemon-reload
and the other systemctl commands.

In order to be able to use the systemctl command I ran

Code: Select all

sudo apt-get install systemd systemd-sysv
and can now run systemctl daemon-reload but trying to get motioneye started with

Code: Select all

systemctl enable motioneye
systemctl start motioneye
get this error "Failed to issue method call: Invalid argument"

Any idea what the issue may be? Jave checked and motion is running but not motioneye / no web interface access

TheWaterbug
Posts: 79
Joined: Fri Feb 05, 2016 12:35 am
Location: Los Angeles, CA, USA, Earth

Re: Surveillance camera based on BuildRoot and Motion

Tue Feb 09, 2016 12:51 am

I'm a little late to this party, but I just received my Arducam module with CS mount lens for my RPi 2, which I'm going to build put into an outdoor enclosure to make a BeeCam, so I watch my bees from work.

I installed MotionEye OS, which was pretty amazingly painless and easy, and now I can see video from my browser. 1280 x 720 performs pretty reasonably for monitoring stuff, but 1980 x 1280 gets very low frames rates.

But after doing some more reading it looks like motion's raison d'être is to detect motion, and not just to serve up video.

If I'm not actually doing any motion detection (right now I have "fast network camera" turned on), and I just want an MJPEG stream (or later, an h.264 stream), is motion still a good back end to use?

Does motion add a lot of overhead if it's not motion-ing?

Are there any other ways to get better imaging performance? Things I want to see:

1) Are my bees bringing in nectar? I'll need to see if their abdomens are swollen vs. unladen [strike]swallows[/strike] bees.

2) Are they bringing in pollen? Probably easier to see than nectar

3) How is the "bee traffic" today? Probably easiest to see, and just requires basic video

But #1 requires that I inspect the bees pretty carefully and compare them to one another. Frame rate is relatively unimportant, but I'll want the best possible picture possible, at distances of a few inches or maybe up to 18" (which is why I bought the CS-mount module).

Teselecta
Posts: 1
Joined: Sun Feb 14, 2016 9:13 pm

Re: Surveillance camera based on BuildRoot and Motion

Sun Feb 14, 2016 9:24 pm

Hello everyone,
I just want to start by saying thanks to Calin for making this wonderful software. I'm new to the world of Pi, coding and networking so this has been a wonderful learning experience for me.

Now I'm hoping someone can help me configure my system so I can access the live stream while I'm away from my home network. I have searched through this forum and others and I'm still at a loss, hopefully I'm not just being thick All I want is a way to access my MotioneyeOS live stream from my phone, or another computer when I'm away from home. If anyone can point me in the right direction it would be appreciated. I'll be quick to respond to any advice with feedback from my end. Thanks in advance.

-Teselecta

Feri
Posts: 2
Joined: Tue Mar 01, 2016 10:36 am

Re: Surveillance camera based on BuildRoot and Motion

Tue Mar 01, 2016 10:45 am

Hm, i see always a problem, if no DHCP router or similar will be connected:
Try both versions - one with Raspi 1.2 with simply Raspberry image, the other with Raspi B+ and loaded Raspberry2 image.

Raspi1: Does running on screen, until eth0: starting dhclient, the long wait, then system reboot, because the eth0 does not have IP address!
Raspi2: Comes with color screen and waiting forewer.

My problem may be (and not solved in the version) - i cannot have DHCP server! I am on LAN, i need to set a constant IP address. No DHCP !!! This is my network, in which i have a lot of devices. No automatical IP address needed and will be not alowed. How to slove this?
Thx,
Feri

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 Mar 01, 2016 12:11 pm

Please use the writeimage.sh script to configure a static IP.
Feri wrote:Hm, i see always a problem, if no DHCP router or similar will be connected:
Try both versions - one with Raspi 1.2 with simply Raspberry image, the other with Raspi B+ and loaded Raspberry2 image.

Raspi1: Does running on screen, until eth0: starting dhclient, the long wait, then system reboot, because the eth0 does not have IP address!
Raspi2: Comes with color screen and waiting forewer.

My problem may be (and not solved in the version) - i cannot have DHCP server! I am on LAN, i need to set a constant IP address. No DHCP !!! This is my network, in which i have a lot of devices. No automatical IP address needed and will be not alowed. How to slove this?
Thx,
Feri

Feri
Posts: 2
Joined: Tue Mar 01, 2016 10:36 am

Re: Surveillance camera based on BuildRoot and Motion

Wed Mar 02, 2016 8:55 am

Thx!
May be not usefull to activate screen output in all versions? Yes may be slower, but - it may be a question at the end who waiting on dhcp to give a break - a simply question, if i wish to break the loop and give him a static IP address, or after 10-20 sec to repeat the reboot loop. If the IP address may be given directly, or by editing config file (like interfaces.cfg) that is not important. But a simply reason to interrupt the loop. This will be made one time and finito.

Is there a image to flash of the last version? I am not so familiar with linux, and the procedure describe how to compile and setup the last version is a little bit complicated for a windose noobs like me :(

Thx for all,
Feri

yancey
Posts: 1
Joined: Tue Mar 15, 2016 4:55 pm

Re: Surveillance camera based on BuildRoot and Motion

Tue Mar 15, 2016 5:05 pm

MotionEyeOS is great. Thanks for creating such a useful and easy-to-use tool.

This wouldn't hinder most surveillance applications, but I've noticed choppy video playback of videos, regardless of settings. I've set frame rates low and high. I've set resolution low and high. I still get hesitation and chop. The videos are not recording smoothly. Is there another setting I should be tweaking?

I'm using a Raspberry Pi 2 with a Pi camera.

Any suggestions?

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

Re: Surveillance camera based on BuildRoot and Motion

Fri Apr 15, 2016 7:19 pm

New release Form April 10th is out. Thanks :D

Pangu
Posts: 78
Joined: Tue Dec 18, 2012 5:30 pm

Re: Surveillance camera based on BuildRoot and Motion

Sat Jul 02, 2016 10:24 pm

Hi everybody,

at first I want to express a BIG thank you to the creator of MotionEye OS which I really appreciated to test. I own various RPi's with the original Raspberry Cam 5MP and since a few days I experimented with MotionEye OS which was new to me. I did read some days ago about MotionEye OS and gave a detailled test, because I only knew the "RPi Web Cam Interface" from Silvan Melchior which I used some years ago successfully. My personal opinion and conclusion is:

MotionEye OS is really nice, it's a pre-configured image which you can install onto a SD card and you can use it immediately. It's very quick and easy to configure and the Web UI looks awesome. Everything is fine but (!)

the performance is really bad on my side. I tried various resolutions, frame rates, quality settings and all the other suggested stuff from the WiKi. You cannot compare it to "RPi Web Cam Interface" from Silvan Melchior which comes with real 30FPS at 1080p and brilliant quality. With MotionEye OS I get about 4-6FPS when comparing to the same picture settings. I also tried the "Fast Network Camera" option. Unfortunately this has a big downside --> you cannot use video recording, no still image and no motion triggering. In summary --> this mode is quite useless for a daily use when you want motion/trigger/record an area. This "Fast Network Camera" really brings better performance and higher FPS but even not as good as "RPi Web Cam Interface" program from Silvan Melchior.

Why isn't that possible? If you would use the same procedure and technique that "RPi Web Cam Interface" uses, shouldn't it be possible to get the same performance results with MotionEye OS, too ?

In my opinion the mix of these mentioned two great camera tools would be awesome! If it would be possible to get the performance/functionality from Silvan Melchiors' tool "RPi Web Cam Interface" into "MotionEye" OS with its great UI and configuration options, that would be AWESOME 8-)

What do you guys think? Or can you give me some tips how to get satisfied results with MotionEye OS? Unfortunately I have chosen "RPi Web Cam Interface" for all my RPi's because I was not satisfied with the bad performance (very low FPS rates) on "MotionEye OS". That's the only reason I didn't choose "MotionEye OS". Any help and hint is appreciated. I am also looking forward to read your comments.

A newbie says "thank you" in advance

Pangu
Posts: 78
Joined: Tue Dec 18, 2012 5:30 pm

Re: Surveillance camera based on BuildRoot and Motion

Sun Jul 10, 2016 6:18 pm

yancey wrote:MotionEyeOS is great. Thanks for creating such a useful and easy-to-use tool.

This wouldn't hinder most surveillance applications, but I've noticed choppy video playback of videos, regardless of settings. I've set frame rates low and high. I've set resolution low and high. I still get hesitation and chop. The videos are not recording smoothly. Is there another setting I should be tweaking?

I'm using a Raspberry Pi 2 with a Pi camera.

Any suggestions?
The same experience as I have posted before. MotionEye OS looks really nice and it would be awesome if the performance would be good. Unfortauntely as is it's quite useless, the frame rates are <6 FPS on a Raspberry Pi and you cannot use that for a serious surveillance station.

I think I'll switch back to RPi Web Cam Interface which works pretty fast at 30FPS with no stuttering.

BTW: This forum thread is not frequent visited, right? no action here :/

petay
Posts: 5
Joined: Wed Feb 04, 2015 9:14 am

Re: Surveillance camera based on BuildRoot and Motion

Mon Sep 19, 2016 11:44 am

does anyone know if motionEyeOS support Ethernet gadget mode on the pi Zero?

would be pretty good if we could have a little Zero camera powered and networked from just a single usb cable!!

Return to “Camera board”