[HN Gopher] Open Source security camera on Raspberry Pi
       ___________________________________________________________________
        
       Open Source security camera on Raspberry Pi
        
       Author : Sean-Der
       Score  : 169 points
       Date   : 2024-09-15 13:32 UTC (9 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | atum47 wrote:
       | I was working on a similar think a while back [1]
       | 
       | I was living in an apartment while building my house. My idea was
       | to have a camera making a time lapse video with the secondary
       | effect of being able to be accessed by me from the internet so I
       | can take a look at how the crew was doing. Unfortunately every
       | single ideia that I have is already had and developed by anybody
       | else. In this case, china. Ali express have some pretty good
       | cameras that does that and more; with a better finish then a 3D
       | print shitty case...
       | 
       | 1 https://youtube.com/watch?v=5E7_40PWqiQ
        
         | marcodiego wrote:
         | Some (maybe most or all) of these devices require an external
         | service to be used. That means it will work as longs as the
         | service exists. You are in the hands of the vendor. My dream is
         | to make devices like this and make them remotely accessible
         | through Tor; that way it can be fully local but remotely
         | accessible from anywhere in the world.
        
           | idunnoman1222 wrote:
           | Why did you throw Tor in there?
        
             | marcodiego wrote:
             | Because that gives me independence with a decentralized
             | service.
        
             | roywashere wrote:
             | Exposing a service to tor is actually useful as a way to
             | circumvent NAT issues
        
             | fimdomeio wrote:
             | The other option would probably be a vpn.
        
           | atum47 wrote:
           | I have a 6 dollars month VPS on digital ocean that I use for
           | everything. Host my website, send server events to my
           | devices, socket connections...
        
           | amluto wrote:
           | A lot of cheap Chinese cameras work just fine without ever
           | being connected to the Internet. Look for ONVIF.
        
       | jchoksi wrote:
       | An alternative project I was looking to use with my Raspberry Pi
       | Zero WH's was mediamtx.
       | 
       | https://github.com/bluenviron/mediamtx?tab=readme-ov-file#ra...
        
       | nubinetwork wrote:
       | > Raspberry Pi 5 [...] do not support v4l2 hardware encoding
       | 
       | I'm not sure I get the point of that... they go through the
       | effort for video decoding, but why doesn't it have an encoder?
        
         | bmh wrote:
         | They decided to use the silicon space for other things. The Pi5
         | CPU is powerful enough to decode most h264 streams in software.
         | The Pi5 has an h265 hardware decoder.
        
           | hcfman wrote:
           | Shame. Cause h265 is problematic wrt licensing etc. I would
           | have preferred that they kick out h265 and used the silicon
           | for h264.
           | 
           | And maybe the pi5 has enough cpu to do the decoding. But how
           | much would be left over for more interesting AI tasks ?
        
             | bmh wrote:
             | I agree 100%
        
             | moffkalast wrote:
             | Well it's not fast enough for most AI tasks as it is, you'd
             | need to offload that bit to a pcie accelerator.
        
           | knowitnone wrote:
           | sure it's powerful enough but I'd rather it built into the
           | hardware for energy efficiency. But I guess we can't have our
           | cake.
        
         | Sean-Der wrote:
         | My assumption is the amount of people encoding is much smaller
         | then decoding.
         | 
         | overlap exist in encode/decode. When working on a Opus codec I
         | did have a fair amount of code distinct to one path still.
        
       | gz5 wrote:
       | nice use of WebRTC, which somehow is still underutilized.
       | 
       | >If you're self-hosting and you want to access the signaling
       | server remotely via mobile data, you may need to set up DDNS and
       | port forwarding if your ISP provides a dynamic IP.
       | 
       | this also exposes your server to the internet. instead you can
       | use one of the open source solutions which creates a private
       | connection between your Pi and server (so there is no network
       | access to the server - make it unreachable), and doesn't require
       | static IPs or port forwarding.
        
         | Sean-Der wrote:
         | It's my passion in life to see WebRTC utilized to its full
         | potential! When I learned about P2P/NAT Traversal I could never
         | go back :)
         | 
         | Why do you think it's had trouble? Poor software, educational
         | materials etc... always looking for new projects
        
           | gz5 wrote:
           | i believe the p2p strengths should play better with other in-
           | progress tech transitions - e.g. transition of all thick apps
           | to the browser, decentralized identity, micropayments,
           | distributed IoT and IIoT devices. what do you think?
        
           | IgorPartola wrote:
           | We need wider IPv6 deployment now. If only someone like Zoom
           | put their foot down and said "our shit doesn't work without
           | IPv6" we would see 90% deployment virtually overnight.
        
       | yu3zhou4 wrote:
       | Neat, I was looking for exactly something like this to run person
       | detection! I'm using yolov3-tiny, not quite a new but very
       | lightweight computer vision ML model, and just right now I'm
       | trying to maximize performance of inference with C++, to perform
       | real-time person detection around my house (I want to know when
       | someone enters the parcel at night so a siren and lights can turn
       | on automatically to deter the intruder) -
       | https://github.com/jmaczan/yolov3-tiny-openvino
        
       | hcfman wrote:
       | Very nice to be able to see how to do this C.
        
       | hcfman wrote:
       | very small amount of code to make a functional webrtc
       | implementation.
        
       | bityard wrote:
       | A while back, I had the need to remotely monitor a house while it
       | was under renovation. A few friends of mine recommended a
       | particular brand of highly-advertised security system. It was not
       | cheap. As I was setting it up, I found out that most of the
       | features that I wanted required broadband internet. This was not
       | disclosed in ANY of the marketing materials. This house didn't
       | have Internet and I wasn't going to purchase it because it would
       | have been $60 minimum on top of the $40 or so the security system
       | was going to cost.
       | 
       | What I did instead: I bought a Raspberry Pi camera, hooked it up
       | to a RPi Zero 2W that I already had, bought an LTE hotspot and a
       | $5/mo prepaid SIM from T-Mobile. On the software side, I used
       | imgcomp (https://github.com/Matthias-Wandel/imgcomp) to take a
       | photo every second and save it to a RAM disk. If the two pictures
       | differed (modulo noise), the Pi would upload the changed picture
       | to a directory on my VPS, which would then trigger a notification
       | to my phone via Gotify containing the link to the picture.
       | 
       | It was all very Rube Goldbergian but it worked quite flawlessly
       | for a couple of years.
        
         | Topgamer7 wrote:
         | Is not all tech basically rube goldbergy XD
        
       | rubicks wrote:
       | I'm interested in doing something similar, except using a board
       | with open-source firmware. What kind of options do I have (if
       | any)?
        
         | Sean-Der wrote:
         | I'm working on this!
         | 
         | A WebRTC implementation for my microcontrollers exist
         | https://github.com/sepfy/libpeer it requires more work to use
         | then most want (but it is the perfect building block for higher
         | pieces)
         | 
         | I am trying to make it easier with a SDK for LiveKit
         | https://github.com/sean-der/embedded-sdk
        
       ___________________________________________________________________
       (page generated 2024-09-15 23:00 UTC)