Encrypted cloud upload + further question regarding Spy Cam

172 views
Skip to first unread message

Valentin He

unread,
Jul 15, 2017, 4:07:16 PM7/15/17
to motioneye
Hello everybody,

I was in search of a solution for a motion detection camera on Raspberry Pi and stumbled upon motioneyeos today. So far it seems to offer almost everything I am looking for, but I could not find anything regarding encryption features.
I am currently using a combination of pikrellcam + gpg + rclone on my Pi B to record video upon motion detection, encrypt the files and upload them to google drive. However I wrote the whole gpg + rclone part myself as a shell script and it is not builtin to pikrellcam.
Since motioneyeos does offer builtin cloud upload afaik, it would be great to know if it also can encrypt files before uploading them. I've seen that there are some crypto libraries installed so I guess you have something going there?

What I am aiming for now is:

- migrate to Pi Zero W with PiCam IR 2
- Record video and take pictures at the same time upon motion detection
- encrypt both and upload to google drive (pictures preferably on the fly, while motion is still present)
- also it would be great if I could make this dependent on whether a certain device is in the network (only film if I am not at home/smartphone is not present in the WiFi)

If only video OR pictures are possible thats also okay, but both would be even better of course.

Looking forward to  replies and further impulses regarding the idea.


Thanks in advance

Jimmy McCrillis

unread,
Jul 16, 2017, 3:27:52 AM7/16/17
to motioneye
The encryption piece is not that useful to me, but I LOVE the idea of turning recording on/off depending on whether a specified device is on the network.  It wouldn't have to be BlueTooth.  If my PiEye can ping my cell phone, stop recording.  If it can't turn recordingback on.  The schedule feature is quite lacking.  I considered trying to figure out a way to send an email to my cameras to turn recording on/off.  But I couldn't quite get it to work.

Any efforts in this regard would be hugely appreciated.

Cheers,

Jimmy

Valentin He

unread,
Jul 17, 2017, 5:52:06 AM7/17/17
to motioneye
Thanks for the feedback. Pinging the device would be practical with Android at least, as long as the user sets WiFi to always on in standby mode in their device and their WiFi assigns the same IP every time. Could you give me some insight where such participation would make the most sense?
Would the motion or motioneyeos project on github be the right place to go?

Jimmy McCrillis

unread,
Jul 17, 2017, 4:36:00 PM7/17/17
to motioneye
After I posted this, I started thinking about it.  I was the victim of a home invasion last December.  My IR on my RPi camera wasn't working properly, so I only got poor quality pictures and the four men were not identifiable.  I have since soldered the connection and fixed it.  But, if the RPi stopped recording because it could ping my phone, it would not have recorded anything at all.  So, it is a potential feature that I would need to consider whether or not I would use.  I would imagine it would need to be tied into a better schedule.  For example, if it is from 6:00 AM and 10:00 PM and my phone is in the house, don't record.  If it is in the middle of the night and my phone is in the house, record.

It is pretty simple to configure your router to always assign the same IP address to your phone's wifi.  I would think that anyone that can setp MoteionEye can figure it out.  =0)

Also, even if you don't give it a fixed IP address, you can usually find the name of your device and maybe it could be pinged instead of by IP address.  Just some thoughts.

Love your work,

Jimmy

Valentin He

unread,
Jul 19, 2017, 2:50:00 PM7/19/17
to motioneye
A home invasion is actually also the reason I got into video surveillance with open source components!

Regarding the phone pinging mechanism: I originally thought of it not as a on/off switch but as a encryption switch.
I want to upload my video to a cloud service so that it is available even if the bad guys take the Pi/shared storage with them. But I also want it to be encrypted since there might be footage of me running naked around the house on there. The encryption slows down the upload of course, so I thought it would be nice to switch off encryption when the phone isnt pingable and upload directly to the cloud.
I know encryption is not such a big concern to some but for me it is very important when it is about such sensitive files as footage from inside my home. The delay the encryption process causes will of course get smaller with Pi and other boards getting faster eventually but when there are strangers in your house every moment counts in my opinion.

Besides that the pinging mechanism could also be used to send some sort of notification to let you know that there is motion while youre not at home. It could also attach a static image of what caused the motion. Might be interesting to act quickly when something like a home invasion happens...
As long as you dont have 5 cats running around all the time of course :D

I've seen that MotionEyeOS includes libsodium and Python bindings for it, so I would certainly be interested in looking into encryption and the mechanism described above. Firstly, however, I'd have to try out the OS more extensively and study my way into it.

Valentin H.

unread,
Sep 13, 2018, 11:06:53 AM9/13/18
to motioneye
I made a pull request implementing media file encryption before the cloud upload earlier this year in the motioneye repository. The feedback was that people liked the feature but didn't see it fit with motioneye as a whole. I took the code and made an independent python module from it. I've been using that to encrypt my media files before the cloud upload for a few weeks now and it works like a charm.
If you're interested, check out my last comment on the PR. That includes all necessary info:

Reply all
Reply to author
Forward
0 new messages