dwyl / learn-nerves

Learn how to use the Nerves embedded framework to build incredibly efficient & fault-tollerant network devices (IoT)
https://youtu.be/zBzKoV2iFdQ
GNU General Public License v2.0
6 stars 1 forks source link

Using Raspberry Pi Camera with Wifi and Picam #5

Open nelsonic opened 4 years ago

nelsonic commented 4 years ago

@pdgonzalez872 wrote this post in 2018. it looks like a good starting point: https://medium.com/@pdgonzalez872/using-nerves-with-rpi3-wifi-and-picam-3b04cee78d22 Code + full walkthrough: https://github.com/pdgonzalez872/nerves_rpi3_wifi_picam

It would be great to:

The practical applications are: a. Home security camera (external): https://github.com/dwyl/home/issues/130 b. Monitoring Plants/Fish/Grow System for Aquaponics https://github.com/dwyl/learn-aquaponics/issues c. OctoPi to monitor/record 3D printer activity - https://octoprint.org | https://youtu.be/ZxHf1LqPiPI d. GrannyCam - create a secure stream using RTSP / WebRTC obviously we wouldn't advise anyone to have a camera streaming publicly on the Internet! But with auth it could be a fun little project to create a bi-directional stream between grandparents and grandchildren who are otherwise separated by thousands of miles and only get updates when exhausted new parents remember to send them ... We know a couple of Grandmothers who would be addicted to this 24/7. 😜 ... Baby photos/videos are basically Crack for Grandmothers, they just can't get enough. 🙄

I have the V2.1 Camera and a RPI3 (the exact components used in this tutorial), so I can try and get it working. But we could consider getting a more advanced camera (with a variable focus lens): https://www.amazon.co.uk/dp/B07R4JH2ZV image

@th0mas are you interested in helping out with this after you have finished your current work on Access Control?

pdgonzalez872 commented 4 years ago

Please let me know and I'll edit the article to show your findings! This is excellent!

nelsonic commented 4 years ago

@th0mas as noted in https://github.com/dwyl/smart-home-security-system/issues/10 we would like to use a Camera Connected to the Pi to detect motion and switch on the Welcome Display. Which camera do you think would be appropriate for that? (Please do a some Amazon research and share a link so we can send you one today). Thanks!

th0mas commented 4 years ago

For your use case, I'd use https://www.amazon.co.uk/LABISTS-Official-Camera-Surrordings-Raspberry/dp/B07VT2KGQC:

Screenshot 2020-07-10 at 10 20 20

Which Is an Infrared version of the Standard Pi camera.

There's a few problems that we'd need to overcome to tick all the boxes however:

Membrane Looks promising but doesn't have Native Picam support yet

nelsonic commented 4 years ago

Yeah, totally understand that doing motion detection is definitely not easy. (hence making it a stretch goal). 👍 The only reason I thought it was doable is because a couple of people have managed to do it using Elixir/Nerves.

Arto Bendiken (@artob) gave a superb presentation on Home Security with Elixir and Nerves where he demonstrates using a PI + Cam to do facial detection: image https://youtu.be/oyNSmhkS7Dw - the slides are: https://speakerdeck.com/arto/building-a-home-security-system-with-elixir-and-nerves and corresponding blog post is: https://ar.to/2019/02/talk-at-pivorak-conf-2 But sadly, the code does not appear to be Open Source ... maybe I'm not looking in the right place: https://github.com/artob?tab=repositories ... 🤷 We could just ask Arto really nicely if he can share some of his work to save time.

Similarly Jacqueline Manzi's (@JacquiManzi) excellent ElixirConf 2019 talk "Breaking Into Nerves" does motion detection: image https://youtu.be/IU8epH8FAI4

The code appears to be: https://github.com/JacquiManzi/jacqui_manzi_elixir_conf_breaking_into_nerves And the motion worker looks like a good starting point for tackling the challenge of motion detection (without face recognition): https://github.com/JacquiManzi/jacqui_manzi_elixir_conf_breaking_into_nerves/blob/master/lib/hello_nerves/motion/worker.ex