Page 12 of 22

Re: Surveillance camera based on BuildRoot and Motion

Posted: Mon Jan 12, 2015 11:40 am
by Saffik
Hello ccrisan.

My name is saffi, and first of all thank you for your good work on this project and the time you have devoted to it.

I had a question regarding MotionPie.

I wanted to make some changes to the UI that we see when we open it in our browser (Chrome) and to do that, i believe there are some html/php and css files somewhere that we can edit/change.
Do you know where they are, on our pi... or if that's even possible?

Thank you,
Kind regards.
Saf

Re: Surveillance camera based on BuildRoot and Motion

Posted: Mon Jan 12, 2015 6:45 pm
by ccrisan
The 20150112 is out and should fix the login issue: https://github.com/ccrisan/motionPie/re ... g/20150112. I apologize for the inconvenience and I hope this version fixes all your recent issues. If it doesn't, please let me know.
ccrisan wrote:There seems to be a bug with the new version not prompting for login when password is empty (by default). Don't upgrade and don't use it for now.

Re: Surveillance camera based on BuildRoot and Motion

Posted: Mon Jan 12, 2015 6:49 pm
by ccrisan
Of course that's possible. It's opensource after all. You may want to take a look at motionEye https://bitbucket.org/ccrisan/motioneye/wiki/Home and get familiar with the code. It's JS + CSS on the client side and Python/Tornado on the "server" side.

If you want to change the files directly on your PI, you'll find motionEye installed at /programs/motioneye on your root partition. Check out these notes before tweaking your motionPie: https://github.com/ccrisan/motionPie#tweaks.
Saffik wrote:Hello ccrisan.

My name is saffi, and first of all thank you for your good work on this project and the time you have devoted to it.

I had a question regarding MotionPie.

I wanted to make some changes to the UI that we see when we open it in our browser (Chrome) and to do that, i believe there are some html/php and css files somewhere that we can edit/change.
Do you know where they are, on our pi... or if that's even possible?

Thank you,
Kind regards.
Saf

Re: Surveillance camera based on BuildRoot and Motion

Posted: Tue Jan 13, 2015 2:18 pm
by hockinfinger
Marvelous work! I'm a relative noob, but have successfully set up 2 RPi surveillance cameras. I have one model B with a wired connection and a MS webcam, and an A+ with the RPi camera module connected via wireless adapter. Both work well. The writeimage script was a bit of genius.

I changed them both to static IP and enabled port forwarding for one of them in my router, so I can view it over the internet.

My problem is when I changed them to static IP, both now have the wrong time and date displayed. I assume there is probably a simple fix for this, but have not found it yet.

In my static_ip.conf, I have the following:

static_ip=192.168.0.150
static_gw=192.168.0.1
static_dns=0.0.0.0

I am not totally sure about the static DNS numbers, and whether this is my problem.

Like I said, everything works perfectly on both units, except the time and date. They were correct prior to changing them to static IP.

Any suggestions are welcome. Keep up the good work.

Cheers,

Marty

Re: Surveillance camera based on BuildRoot and Motion

Posted: Tue Jan 13, 2015 9:31 pm
by hockinfinger
Also note that previous to my changing the static_ip.conf, email notifications were working, but now do not.

Re: Surveillance camera based on BuildRoot and Motion

Posted: Wed Jan 14, 2015 7:53 am
by rpiuser1234
Hi,

I'm trying to determine the best solution to my problem. I would like to have around 10 to 15 high quality (HD resolution or better if possible) security cameras.

My idea is to use one raspberry pi + rpi camera for each "security camera" device (10 to 15 of them), and have all of these feeding back to a PC (Linux) for recording, display to clients, and reviewing of previous recordings.

I don't think I want to run motion on each raspberry, as it doesn't have the CPU to record in HD along with the motion detection/etc, so what is the minimum software I would need on the raspberry to simply collect the HD video and send to a remote motion server?

Any suggestions or ideas would be greatly appreciated

Thank you

Re: Surveillance camera based on BuildRoot and Motion

Posted: Wed Jan 14, 2015 10:03 am
by ccrisan
A DNS server set to 0.0.0.0 is invalid. Use 8.8.8.8, for example. Your local 192.168.0.1 router should also work. Without DNS, NTP and SMTP won't work. That means your date/time will be wrong and email notifications won't work.
hockinfinger wrote:Marvelous work! I'm a relative noob, but have successfully set up 2 RPi surveillance cameras. I have one model B with a wired connection and a MS webcam, and an A+ with the RPi camera module connected via wireless adapter. Both work well. The writeimage script was a bit of genius.

I changed them both to static IP and enabled port forwarding for one of them in my router, so I can view it over the internet.

My problem is when I changed them to static IP, both now have the wrong time and date displayed. I assume there is probably a simple fix for this, but have not found it yet.

In my static_ip.conf, I have the following:

static_ip=192.168.0.150
static_gw=192.168.0.1
static_dns=0.0.0.0

I am not totally sure about the static DNS numbers, and whether this is my problem.

Like I said, everything works perfectly on both units, except the time and date. They were correct prior to changing them to static IP.

Any suggestions are welcome. Keep up the good work.

Cheers,

Marty

Re: Surveillance camera based on BuildRoot and Motion

Posted: Wed Jan 14, 2015 11:46 am
by hockinfinger
I thought I did change it to 8.8.8.8 last night, but that still gave me the wrong time and no email notifications. I looked at it again this morning and I had put in 8.8.8.8.8 :oops:

I fixed that and everything works perfectly.

Don't let friends drink and configure.

Thanks for your help.

Marty
ccrisan wrote:A DNS server set to 0.0.0.0 is invalid. Use 8.8.8.8, for example. Your local 192.168.0.1 router should also work. Without DNS, NTP and SMTP won't work. That means your date/time will be wrong and email notifications won't work.

Re: Surveillance camera based on BuildRoot and Motion

Posted: Wed Jan 14, 2015 6:53 pm
by dazkgoodwin
I'm learning the ropes around motionpie, and have successfully edited the wpa_supplicant.conf file with my SSID and PSK as per instructions in the forum.

However, it appears stuck in the known wifi failure bootloop. It hangs on the Starting wpa_supplicant: screen for a time before eventually giving in and resetting, again!

Any ideas what could be wrong?! I haven't a clue what next. I love motionpie, but within being able to abandon ethernet it's useless to me.

Thanks

Re: Surveillance camera based on BuildRoot and Motion

Posted: Wed Jan 14, 2015 7:21 pm
by Saffik
Hi ccrisan

Thanks for the help earlier.
As part of working on another project with a raspberry pi, I had some scripts under:
- /usr/bin/
- /etc/

Which would create a file ".ipaddress" under /tmp and hold the external ip address there and, then using a cron, keep checking the external IP (router) ip address every hour against the value in the file. If it matches, it would do nothing but if it's different, It would then:
a) update the value in the file
b) email me the new IP address.

I was thinking of doing the same and was wondering.. are there any plans for you to integrate that into the MotionPie, if not, then my question was.. if i was to have stuff in directories '/usr/bin/..' and '/etc/..'... but after I was to do a software/version upgrade.. would they be wiped out?

Thanks
Saf

Re: Surveillance camera based on BuildRoot and Motion

Posted: Wed Jan 14, 2015 7:37 pm
by ccrisan
1) Notifying whenever your public IP changes is a service that has nothing to do with motionPie. No, I will not add such a feature to motionPie. I suggest using a second Raspberry PI with Raspbian for this purpose.
2) Yes, the entire root filesystem is replaced with each "firmware" update. The /data partition is however preserved. And so are your settings in /boot/config.txt, in case this helps you.
Saffik wrote:Hi ccrisan

Thanks for the help earlier.
As part of working on another project with a raspberry pi, I had some scripts under:
- /usr/bin/
- /etc/

Which would create a file ".ipaddress" under /tmp and hold the external ip address there and, then using a cron, keep checking the external IP (router) ip address every hour against the value in the file. If it matches, it would do nothing but if it's different, It would then:
a) update the value in the file
b) email me the new IP address.

I was thinking of doing the same and was wondering.. are there any plans for you to integrate that into the MotionPie, if not, then my question was.. if i was to have stuff in directories '/usr/bin/..' and '/etc/..'... but after I was to do a software/version upgrade.. would they be wiped out?

Thanks
Saf

Re: Surveillance camera based on BuildRoot and Motion

Posted: Wed Jan 14, 2015 7:42 pm
by Boothy
Hi ccrisan

Is the port setting preserved in motioneye/settings.py ? It seem to override back to port 80 default last time I updated via browser.

Thanks again

Boothy

Re: Surveillance camera based on BuildRoot and Motion

Posted: Thu Jan 15, 2015 10:23 am
by ccrisan
Unfortunately not. Most of the custom settings are lost upon update. It's not the way it is supposed to be and I'm going to fix it soon.
Boothy wrote:Hi ccrisan

Is the port setting preserved in motioneye/settings.py ? It seem to override back to port 80 default last time I updated via browser.

Thanks again

Boothy

Re: Surveillance camera based on BuildRoot and Motion

Posted: Thu Jan 15, 2015 10:32 am
by Boothy
Many thanks for all your efforts
Boothy

Re: Surveillance camera based on BuildRoot and Motion

Posted: Thu Jan 15, 2015 12:42 pm
by hockinfinger
Using Microsoft Lifecam HD-6000 works well, except that the autofocus is occasionally annoying and triggers motion capture. I was wondering if it's possible to disable the autofocus.

Does uvcdynctrl exist in motionPie, or can it be installed?

Re: Surveillance camera based on BuildRoot and Motion

Posted: Fri Jan 16, 2015 12:30 pm
by southafricanrob
Hi great image and works seamlessly. I am trying to use apt-get to install squeezelite (a small audio player) but not having any luck, seems apt-get not supported and not too familiar with Buildboot. Any idea if its at all possible to install squeezelite package?
Thanks

Re: Surveillance camera based on BuildRoot and Motion

Posted: Fri Jan 16, 2015 12:38 pm
by ccrisan
No, there's no support for uvcdynctrl. It could be added to the image but I'm not sure how one would make use of it.
hockinfinger wrote:Using Microsoft Lifecam HD-6000 works well, except that the autofocus is occasionally annoying and triggers motion capture. I was wondering if it's possible to disable the autofocus.

Does uvcdynctrl exist in motionPie, or can it be installed?

Re: Surveillance camera based on BuildRoot and Motion

Posted: Fri Jan 16, 2015 12:38 pm
by ccrisan
motionPie is not a general-purpose linux distro. You cannot install anything into it.
southafricanrob wrote:Hi great image and works seamlessly. I am trying to use apt-get to install squeezelite (a small audio player) but not having any luck, seems apt-get not supported and not too familiar with Buildboot. Any idea if its at all possible to install squeezelite package?
Thanks

Re: Surveillance camera based on BuildRoot and Motion

Posted: Fri Jan 16, 2015 1:50 pm
by southafricanrob
Aha, thanks for quick answer

Re: Surveillance camera based on BuildRoot and Motion

Posted: Sun Jan 18, 2015 7:00 pm
by mikevie
Hi there! Hi CCrisan!

I just started discovering the really great motionpie and have a question about authentication

At the moment i am trying to connect to motionpie via the android-app "IP cam viewer" (also on iOS).
I can either choose the preset "motioneye" or "generic url". Both works fine, as long as no surveillance user password is set.
As soon as I set the password I get an error, although i provide the correct credentials in the app.

Then in motionpie I recognized, the url with the authentication parameters in the field "streaming url". (e.g http://192.168.0.200:8081?_username=adm ... ature=xxxx).
But it doesn't make sense to me, because there is no password protection for this streaming url. So I tried to change the url to http://192.168.0.200?_username=admin&_signature=xxxx. That brought me just an empty motionpie screen in the browser with runnig dots ("waiting bar"). I thought calling the url with authentication parameters could be a workaround for the non-working validation in "IP Cam Viewer".

So can someone explain me the sense of calling the streaming url with authentication parameters, although they are not needed. Maybe I didn't understand something ;-) And does eventually someone has experience with the "IP Cam Viewer"?

many thanks in advance

Mike

Re: Surveillance camera based on BuildRoot and Motion

Posted: Mon Jan 19, 2015 6:36 am
by Thaui
There is not PW protection available in motioneye. I had the same question months ago. Also I had the same problems like you with IP Cam View. When I changed to Tinycam Monitor it works fine. Hope that helps.

Re: Surveillance camera based on BuildRoot and Motion

Posted: Mon Jan 19, 2015 7:32 am
by ccrisan
Indeed, there's no password protection for the mjpg streaming and there's no easy way to implement it.

Also, don't open that stream directly with Chrome; it behaves oddly - the page looks like it's loading while there's no image shown.
mikevie wrote:Hi there! Hi CCrisan!

I just started discovering the really great motionpie and have a question about authentication

At the moment i am trying to connect to motionpie via the android-app "IP cam viewer" (also on iOS).
I can either choose the preset "motioneye" or "generic url". Both works fine, as long as no surveillance user password is set.
As soon as I set the password I get an error, although i provide the correct credentials in the app.

Then in motionpie I recognized, the url with the authentication parameters in the field "streaming url". (e.g http://192.168.0.200:8081?_username=adm ... ature=xxxx).
But it doesn't make sense to me, because there is no password protection for this streaming url. So I tried to change the url to http://192.168.0.200?_username=admin&_signature=xxxx. That brought me just an empty motionpie screen in the browser with runnig dots ("waiting bar"). I thought calling the url with authentication parameters could be a workaround for the non-working validation in "IP Cam Viewer".

So can someone explain me the sense of calling the streaming url with authentication parameters, although they are not needed. Maybe I didn't understand something ;-) And does eventually someone has experience with the "IP Cam Viewer"?

many thanks in advance

Mike

Re: Surveillance camera based on BuildRoot and Motion

Posted: Mon Jan 19, 2015 3:04 pm
by Saffik
Hi ccrisan,

Since it's possible to run the camera in high resolution and taking pictures then would mean, overtime.. it will require a lot of disk space to store it and, I wanted to mount a network drive to MotionPie and was wondering if that'll be possible?

Initially I was planning to mount box . com for which i'd need to do something like:
sudo apt-get install davfs2 // which is a program called webdav.
but since the command is invalid with " apt-get: command not found.

I understand that the reason is that Buildroot is intended to build software for a fixed system that will never be updated. It doesn't make sense to have a file system with network update, but any ideas about what I'm trying is even remotely possible?

Regards
Saffi

Re: Surveillance camera based on BuildRoot and Motion

Posted: Mon Jan 19, 2015 3:46 pm
by mikevie
ccrisan wrote:Indeed, there's no password protection for the mjpg streaming and there's no easy way to implement it.

Also, don't open that stream directly with Chrome; it behaves oddly - the page looks like it's loading while there's no image shown.
Thanks, that's it. It shows like it is loading. So are the URL with the authentication parameters to call motioneye (on port 80) without the login screen? Should that work?
and btw: great work! thank you!

Thaui wrote:There is not PW protection available in motioneye. I had the same question months ago. Also I had the same problems like you with IP Cam View. When I changed to Tinycam Monitor it works fine. Hope that helps.
I think I didn't express myself right. ;-)
In IP Cam Viewer it works fine to see the stream on port 8081. But it also works fine to see the cam on port 80, as long as I do not set the surveillance user. I looks like the "motioneye" preset in IP Cam Viewer grabs the Image out of the website (don't beat me, if that's a wrong guess) and can't do this when the user is set, because the login screen appears instead of the cam-image.
My thought was to call the URL with the authentication parameters, so that no login screen appears.

The app you suggested works "only " with the streaming port. nevertheless a nice app

please excuse if my thoughts are nonsens, but I am very new to this.

Re: Surveillance camera based on BuildRoot and Motion

Posted: Mon Jan 19, 2015 5:21 pm
by ccrisan
You can choose "Network Share" as storage device, in the settings of your camera. Then just fill in the rest of the details and it should work.
Saffik wrote:Hi ccrisan,

Since it's possible to run the camera in high resolution and taking pictures then would mean, overtime.. it will require a lot of disk space to store it and, I wanted to mount a network drive to MotionPie and was wondering if that'll be possible?

Initially I was planning to mount box . com for which i'd need to do something like:
sudo apt-get install davfs2 // which is a program called webdav.
but since the command is invalid with " apt-get: command not found.

I understand that the reason is that Buildroot is intended to build software for a fixed system that will never be updated. It doesn't make sense to have a file system with network update, but any ideas about what I'm trying is even remotely possible?

Regards
Saffi