←back to thread

551 points arrdalan | 9 comments | | HN request time: 0.222s | source | bottom

I needed a security camera inside my house, one that would send motion notifications to my smartphone and would allow me to livestream remotely. However, I could not find one that I could trust due to privacy concerns. Many of them upload the plaintext of videos to their servers and none is fully open-source as far as I know. Therefore, I decided to use my spare time to build one from scratch. Called Privastead (as in Private Homestead), it uses OpenMLS for end-to-end encryption (between the camera local hub and the smartphone) and is mostly implemented in Rust (except for part of the Android app that is implemented in Kotlin). The system is functional now and I've been using it in my own house for the past couple of weeks.

Based on some of the discussions I've seen online, it seems like there are other users who are also concerned with the privacy implications of home security cameras. Therefore, I decided to open source my solution for everyone to use. If you need a privacy-preserving home security camera, please give it a try and provide feedback. Note that trying out the system requires you to have a supported IP camera, a local machine connected to the IP camera, a server, and an Android smartphone. I have put together detailed instructions on setting up the system, which I hope makes it easier for others to get the system up and running.

In addition, consider contributing to the project. The prototype currently has a lot of limitations: mainly that it has only been tested with one IP camera, only allows the use of one camera, and only supports Android. I'll continue to improve the prototype as time permits, but progress will be much faster if there are other contributors as well.

1. 0points ◴[] No.42287854[source]
Certainly interesting project, but I do encourage people to do more thorough research before starting a new project and claiming they needed to fill a void.

> However, I could not find one that I could trust due to privacy concerns.

> Many of them upload the plaintext of videos to their servers and none is fully open-source as far as I know.

There's Frigate [1] which is off-cloud, opensource and self-hosted and it does person detection using GPU or Google Coral. It relays camera streams over WebRTC using ssl and works well with Home Assistant [2], which is your self-hosted off-cloud smart home solution.

Then there's moonfire-nvr [3] which is written in rust and less feature complete than frigate.

And then there's sentryshot [4], another option written in rust.

Interestingly, your project got more stars since you posted it on HN than sentryshot has in total, and they have had a product out since 2021 while yours only support a single camera model and has no object detection.

I suppose this reflects how unknown these option are, which is kind of unexpected since googling "rust nvr" lists them all in the first page.

1: https://frigate.video/

2: https://www.home-assistant.io/

3: https://github.com/scottlamb/moonfire-nvr

4: https://github.com/SentryShot/sentryshot

> The prototype currently has a lot of limitations: mainly that it has only been tested with one IP camera

Since you use rust, you should maybe have a look at retina:

https://github.com/scottlamb/retina

Personally, I use frigate with Home Assistant linked to HomeKit, so I get snapshots & video from frigate straight into my iPhone lock screen as soon as it detects moving people or cars outside my house.

replies(3): >>42287973 #>>42288852 #>>42289126 #
2. acidburnNSA ◴[] No.42287973[source]
I've got frigate running at 3 sites and use wireguard to log into them and then monitor/review through the browser. Truly awesome technology. Self-hosting object detection and getting alerts is very effective and satisfying.
replies(1): >>42287978 #
3. thelittleone ◴[] No.42287978[source]
I'm looking at a similar setup. Mind sharing which cameras you went with?
replies(2): >>42288009 #>>42288138 #
4. 0points ◴[] No.42288009{3}[source]
I use Reolink fwiw. Cheap china cameras which stream in https & rtsp in h264 and h265.
5. acidburnNSA ◴[] No.42288138{3}[source]
I have a bunch of Amcrest brand cams, indoor and outdoor, plus one Reolink combination floodlight/camera.

I like these PoE outdoor ones best: IP5M-T1179EW

Indoor PTZ ones: IP4M-1041W

Old wifi outdoor one: IP4M-1026E

I got some with the plastic dome around them but they do not work well at night, especially in weather.

I also have a ridiculous industrial PTZ camera that I put on my roof to watch birds, planes, and boats, and this thing is an absolute beast. I love it. https://www.alibaba.com/product-detail/4k-action-ptz-camera-...

replies(1): >>42288455 #
6. smitelli ◴[] No.42288455{4}[source]
Those Amcrest cameras are rebranded Dahua products with the logos changed. Right down to the firmware bugs and confusing UI. They’re actually great cameras for the money, but man do I loathe their quirks sometimes.
7. arrdalan ◴[] No.42288852[source]
Thanks for the pointers. Frigate, Home Assistant, and HomeKit were mentioned in other comments and we had some discussions there. They're certainly good setups.

A key design decision for me was using a strong end-to-end encryption scheme between the camera/hub and the app. MLS fit this need perfectly and therefore I came up with the design that is now Privastead.

I was also less concerned with supporting many cameras since all I needed was one camera inside my house. Rather, I wanted a lean solution that I could fully understand and reason about. I will however look more carefully into the NVRs you listed to see if I can borrow some ideas to support more cameras more easily in Privastead.

replies(1): >>42289386 #
8. ◴[] No.42289126[source]
9. ◴[] No.42289386[source]