Posted by mpweiher 2 days ago
Sticking something with 2 second lifespan on disk to shoehorn it into aws serverless paradigm created problems and cost out of thin air here
Good solution moving at least partially to a in memory solution though
Regardless, I enjoyed the article and I appreciate that people are still finding ways to build systems tailored to their workflows.
> Disable keep-alive: close the connection immediately after each upload completes.
Very odd idea.
Using S3 for an MVP and marking this component as “done” seems like the right solution, regardless of the serverless paradigm.
My first thought is, why bother with local storage if your turnaround on video chunks is 2 seconds? What's disk going to add besides a little bit more resiliency in that 2 second time frame? This at the cost of having slower pod startups given you have to mount the PVC, and a small performance hit of writing to a filesystem instead of memory.
All moot anyway given that the cameras/proxy allegedly has retries built-in, but interested to hear your thoughts.
Resiliency is the point. How would you protect against machine's loss/crash?
Nanit needs this storage because they run cloud based baby cameras. Every Nanit user is uploading video and audio of their home/baby live to Nanit without any E2EE. It's a hot mic sending anything you say near it to the cloud.
Their hardware essentially requires a subscription to use, even though it costs $200/camera. You must spend an additional $200 on a Nanit floor stand if you want sleep tracking. This is purely a software limitation since there's plenty of other ways to get an overhead camera mount. (I'm curious how they even detect if you're using the stand since it's just a USB-C cable. Maybe etags?)
Of course Nanit is a popular and successful product that many parents swear by. It just pains me to see cloud based in-home audio/video storage being so normalized. Self-hosted video isn't that hard but no one makes a baby-monitor centric solution. I'm sure the cloud based video storage model will continue to be popular because it's easy, but also because it helps justifies a recurring subscription.
edit: just noticed an irony in my comment. I'm ranting about Nanit locking users into their 3rd party cloud video storage, and the article is about Nanit's engineering team moving off a 3rd party (S3) and self-hosting their own storage. Props to them for getting off S3.
I wish we could have local-first and e2ee consumer software for this sort of thing, but given the choice of that or actually usable software, I am going to pick the latter.
But I do miss the lack of any baby-specific features like sleep tracking. It has support for crying detection, but that's it.
If you don't want a baby camera system that's also a part-time hobby...Nanit does seem like the best option. I just lament that the best option requires giving up so much.
I have a little server rack cobbled together out of wood under my basement stairs, with a UDM Pro, 24 port POE switch, and an ancient Dell 2U poweredge for TrueNAS.
My definition of "trivial" seems to be different.
It's not perfect because wifi networks might block the VPN, but for the one wifi network I use the most, Wireguard on port 53 works splendidly, for now.
It's not really self hosted since it relies on Apple but it's the least evil at this point. Giving unencrypted video and audio to some company (if what OP says is right) would be way beyond my risk tolerance point.
You just need a console (NVR) and the a camera. Here's what I use:
- https://store.ui.com/us/en/category/cloud-gateways-compact/c...
- and a wireless camera: https://store.ui.com/us/en/products/uvc-g6-ins
and the camera has a standard 1/4" female thread mount, so also a stand to hold the camera. And in the UniFi protect setting enable "Hallway Mode" to rotate it 90 degrees to get the length of baby.
Unifi accidentally made a fantastic baby monitor.
The recent APIs they’ve built makes me hopeful that I could run an AI model against the footage eventually and build those Ai features for myself.
My impression is live feed is a solved problem.
I had to set up a dedicated Nanit-only AP in my house in order to stabilize the connection. It would not work any other way, tried many different configurations, even other APs.
They've mostly sold off bits of themselves, and/or licensed their name to other producers. It's highly unlikely that Philips actually made that camera.
if i'm understanding "anywhere you happen to be" right: Real question -- I'm not a parent. What is your use case for wanting to monitor your baby remotely from a different location than your baby? Obviously someone is with them at the house or location with the baby! You don't trust em? Or just like seeing/hearing your baby when you are out?
I see why a baby monitor in general is helpful so you can be in another room in the house and still keep an eye/ear on baby, but obv someone has to actually be in the location with the baby! (and the monitor at least needs to be on the wifi, right? So the monitor is in a place you have network access to, yes?)
* Doing garage or yard work where Wifi coverage was spotty. May seem like an edge case but remember that when baby is sleeping is exactly when you want to be doing things like yard work.
* Hanging out across the street cooking out with the neighbors while baby sleeps
* Having a couple drinks at the hotel bar on vacation after baby goes to sleep. You're only ~30 seconds from your room if baby wakes up, but it's nice to not have to sit in a dark room for the whole evening after 7pm.
- I'm at a small party 1 block away. Baby is sleeping in the bedroom with mama but I'm trying to protect her sleep. I listen to baby with an airpod in my ear at the party. If baby shows signs of waking I come back and either bottle him or help mama feed him.
Also just because I'm out of the house and miss my baby and want to stare at him...
Your way of phrasing it makes it sound like it would be fine to upload the video if it were end-to-end-encrypted. I think this is worth clarifying (since many don’t really understand the E2EE trade-off): E2EE is for smart clients that do all the processing, plus dumb servers that are only used for blind routing and storage. In this instance, it sounds like Nanit aren’t doing any routing or (persistent) storage: the sole purpose of the upload is offloading processing to the cloud. Given that, you can have transport encryption (typically TLS), but end-to-end encryption is not possible.
If you wanted the same functionality with end-to-end encryption, you’d need to do the video analysis locally, and upload the results, instead of uploading the entire video. This would presumably require more powerful hardware, or some way of offloading that to a nominated computer or phone.
Apple has done some interesting this with privacy-centric cloud processing. Might be some way to eventually get the benefits of cloud based detections without revealing your video.
also my other gripe is they also store audio. Which personally I feel like is even more sensitive. Wish their was an option to allow live audio listening but not store any audio in the cloud.
In the case of this product, there is only one client (and a server).
E2EE bills then down to having the traffic encrypted like you have with a https website.
I can absolutely imagine an architecture where video can be streamed in an encrypted manner, or stored in encrypted time-stamped blobs, allowing the server to provide rough searching, and then the client can perform fine-grained scanning.
This obviously doesn't enable any kind of processing of the video data on the server side, and doing it on the receiving client would require the feed to be active This means that any kind of processing would almost necessarily have to happen on the sending device, which would probably increase the power and compute requirements by a lot.
The third option is unreliable because if that "client" (a desktop app, a phone app, etc.) dies, then the process stops working completely. The second option is unreliable because if you increase the cost of the camera then most users will buy the other camera because everyone is financially constrained these days.
That basically just leaves the first option as the only practical one at an appealing price point.
That’s not what most people expect though.
In the case in point, the parent (camera owner) is one party and Nanit is another party. (Prior to the work in the linked post, AWS S3 was another party). The goal of E2EE is to deny plaintext access to some of these parties. So, in an E2EE deployment, Nanit (and AWS) would not have unencrypted access to the video content, even though they're storing it.
As chrismorgan pointed out, if Nanit did not have access to the unencrypted data, they could not do server-side video processing.
(Also, FWIW, there are multiple clients in this scenario -- the parents' phones are clients, and need unencrypted access to the video stream.)
(As an aside, where I used to work, we did some cool stuff with granting conditional access to certain server-side subsystems, so that the general data flow was all end-to-end encrypted, but customers could allow certain of our processes to be "ends" and have key access. This was really elegant; customers could dial in the level of server-side access that we had, and could see via the key authorization metadata which services had that access.)
> It’s all end-to-end encrypted
> The video is privately analyzed by your home hub using on-device intelligence to determine if people, pets, or cars are present.
You can use a cloud provider's infrastructure without giving it access to your material. My devices generate the content, my devices do the processing and analysis, I consume the content. The cloud just coordinates the data in flight, and stores it at rest, all encrypted. It's possible but most companies don't bother because they have to put effort and their "payoff" is that they can't monetize your data anymore.
Self-hosting video is not something the typical user of a baby monitor would ever even consider.
From the product description though it sounds like sleep analysis is what you're paying for, which they do on servers analyzing the video.
It's hilariously crazy but we were given the cams as a gift so we stuck with them.
If UniFi Protect was re-skinned and had a bunch of its security camera complexity removed and optimized for the baby-camera use case it'd be normal consumer level friendly.
I'm not leaving a baby at home while I go on vacation. I would never be on another network, even. Why need the cloud?
The typical parent has never heard of Synology or Ubiquiti, doesn’t have a NAS, and gets whatever tech their ISP gave/rents them.
In that case no parent needs to know about Synology or even IP addresses.
But they need to know about networking enough to be on the same network. I understand that sounds easy, but every time someone gets confused about their cursed setup the company making the device will get a returned product and an angry review. Client isolation, multiple wifi networks, some devices being on wifi some on the mobile network.
A common use case for baby monitors is being able to wander short distances away and still listen in: Work in yard, talk to a neighbor, go out to the detached garage.
Having a baby monitor which is not tethered to the WiFi coverage is a selling point. Many cheap monitors are WiFi connected or use their own WiFi network and the range is limited.
A lot of people in this thread are also completely missing the selling points of Nanit which include breathing tracking and sleep tracking features. It’s a product that could technically be implemented locally with enough extra processing power and cloud servers for coordinating out of home access and bouncing notifications, but obviously the number of people who would pay extra for that (instead of trying to roll their own solution HN style) is not large.
I’d least I never heard a parent complain that their biggest problem dealing with a baby is lack of E2EE.
Pay money to solve a problem and time-save as a parent is a valid business idea/strategy. The externalities that the parents might suffer if these businesses do not completely adhere to good security practices don't seem to come back to bite them (and most parents get lucky and not have any bad consequences - yet).
Maybe you want to check up on the babysitter (as creepy as that sounds, there might be good reasons). Or you're traveling but your partner is home, and you want to be able to see your sleeping child from half a world away.
I do think we've gone to far in the direction of cloud-only, but I don't think it's a bad option of have. The problem I have is that many of the companies running these services have really terrible security. So for S3 for a nanny cam, I'd assume that each customer have their own bucket, with their own credentials, but I doubt that's the case.
I hope you do tell them in advance. Secret surveillance is indeed in the creep territory.
Not sure about your setup, but I replied to this.
Many cheap baby monitors are WiFi connected. You have to haul the video unit around and keep it live to hear when it cuts out, then move back toward where WiFi coverage was good.
This won’t seem like a big deal to someone who lives in an apartment or who has a house with 7 Ubiquiti APs covering everywhere inside and out, but it is a big deal to a parent who has a single WiFi router and wants to be able to do something like pull weeds in the yard, have a conversation with the neighbor, or go to a detached garage and work on a project without having to worry about their exact WiFi coverage at every moment to check on the baby.
It's much easier to create a device<->internet connection + a smartphone<->internet connection that it is to deal with the myriad of issues that occur if you try to do local device<->smartphone connections in networks with unknown topology and quirks (e.g. ISP provider being overly conservative in their firewall presets). If that in general would be a more trivial issue you would see less cloud services.
(You would probably still a similar amount of cloud services due the increased monetization options, but this would level the playing field for local-only options.)
- most people want to build lovely structures in the cloud, as it's hard to fix bugs in software on devices
- you'd need to open up a firewall on the home router
- auth might be tricky
- can't bolt on value added "enhancements"
ox and hearth rate baby monitor definitely alert on sids. prevent, no, and that's why they are not medical devices, and wouldn't make sense to pay a randomized controlled trial to certify as one.
works? yeah. hearth stops beating, ox goes under parameter, parents get an alert.
here's the FDA statement about it https://www.accessdata.fda.gov/cdrh_docs/pdf22/K222597.pdf
from [0]
https://en.wikipedia.org/wiki/SIDS
So, 24/7 kinda, yeah... Realistically, the risk is relatively low I'd say, so to still stay a functioning parent with other duties (for baby or otherwise), you don't look 24/7
I made a simple wood mount and painted it to match the crib. It worked well. There was no software enforcement requiring you to buy their mount at the time. Has this changed recently?
It sounds like they're not hosting it though. They are processing it, and storing it temporarily while it's queued.
A fully self hosted AI powered baby monitor that accurately detects sleep states and danger situations would be incredibly expensive today. Maybe not in a few years though.
They don't provide a display, so I put a Raspberry Pi, a display, and an audio hat in an enclosure. It plays an rtsp stream from the camera at startup and works pretty well.
Baby monitors around here -Alecto is a popular brand - cost twice as much and have only half the capabilities.
It's not that easy. The only usecase that is actually really fucking easy is when both the camera and the device trying to access it is in the same network - broadcasts for discovery, that's it. Although I've seen people turn on "client isolation" in their wifi back when I did computer repairs, so it's not a given that this works!
But as soon as that assumption goes out the window - and if it's just you going into the garden to check on some weeds where the wifi doesn't reach - the task suddenly becomes so, so much harder:
- the "easiest" case is an ISP that hands your wifi router a globally routed IPv4 address, allows UPnP to be configured, and the user has UPnP configured. All that the camera has to do here is to request a port opening and that's it. Still, you as manufacturer need a server to store a mapping between user, IP address and port. (And you need to hope that the user's mobile device or their ISP doesn't have a nasty firewall blocking non-standard ports)
- No UPnP? Now you as manufacturer either need some STUN/TURN server or explain to the user how to manually enable port forwarding.
- Worst case: the user's ISP either has IPv6 only, CGNAT, double/triple/... NAT or similar shit in play because they don't have enough IP addresses to supply to their customer base. That's pretty much impossible even with STUN/TURN, sooo many ways for things to go wrong along the path.
- even a theoretical fully IPv6 world where everyone has globally routed IPv6 addresses everywhere and all ISPs have their routing working still wouldn't solve the issue... because consumer ISP routers enable a firewall on IPv6 to avoid stuff like "online game cheaters 0wning their opponents running an outdated version of their game".
The sad reality is, running a cloud service is the only actually pain-free way for any given smart Thing to work as the customer expects it.
And on top of that, a NAS capable of storing video costs about 300-ish bucks with a HDD capable of running 24/7 and eats about 10-ish watts of electricity, which is quite the cost factor on its own.
Sure, the "nerd population" here on HN can rig something up that works in a matter of a few days, including some rudimentary AI to spot if the baby managed to escape the crib. But the 99% of people out there will crash at the "please open your router's config page to allow UDP port 65535 passthrough" step, if only because they forgot the password that they set five years ago.
Exactly. There are a lot of comments in this thread from people who are either non-parents or who haven’t lived in a situation where they didn’t have perfect WiFi coverage of their entire living area.
Being able to visit the neighbors or go out in the yard without worrying about missing baby monitor events is a huge advantage that many parents will pay for.
I think this entire comment section is a prime example of HN not understanding non-technical audiences.
... and from people who take care of configuring their entire smart home crap of their entire relatives. In Germany we have a joke roughly translated to "Christmas is the time of the year where the children come back home to fix their parents' computers" for a reason - but a lot of people don't have family or friends who can deal with getting stuff set up.
The average user isn't competent enough to deal with a setup flow more complicated than "install this app, scan this QR code on the device, enter your wifi password, that's it". The user neither knows nor cares to know that the Thing sets up a temporary wifi access point (whose credentials are in the QR code), gets the home wifi credentials via a small API endpoint, tests the connectivity and then shuts down the temporary wifi. For them, it Just Works.
The comment you’re replying to literally started by saying you don’t need it.
The v-tech ones are fine though. No need for anything with an Internet connection (though some of them even do now).
Source: also 2 kids.
I don't understand this attitude, sure its easy for some people but MOST people want an easy out of the box solution
its nothing wrong with that
It's less about whether I would have a use case for this exact thing (or whether or not it was appropriate for this use case, i dunno, prob don't have enough context to know).
More just seeing what is possible, how they thought about it and analyzed it, what they found unexpected and how, etc. I learned a lot!
The only practical reason to put a video in S3 for an average of 2 seconds is to provide additional redundancy, and replacing that with a cache removes most of the redundancy.
Feels like if you uploaded these to an actual server, the server could process them on upload, and you could eliminate S3, the queue in SQS, and the lambdas all in one fell swoop...
Don't know how they came up with such a bad and complicated cloud design for something that is straight forward.
> We used S3 even though it wasn’t the right service
The solution they document also matches the S3 'reduced redundancy' storage option, so I hope they had this enabled from day one.
What an appalling screwed up world we seem to have manufactured for ourselves.
Different folks parent differently, culture evolves. You're free to have your "old school" thoughts as are people who use services like this.
Its not like they're publishing it in public. The service in discussion especially just stores it in the server only temporarily to use ML to detect things such as sleeping or crying. Sounds innocuous to me.
Many of us can do the math ourselves and choose to make choices based on our own beliefs. That's true freedom.
1) a business making (seemingly) huge profits from the fears of others; more specifically from the fears of young parents who are quite often vulnerable. And, I’d suggest, offering a “solution” with no problem attached to it apart from that fear. Not to mention the issues around privacy, the fact that however many “it’s safe and encrypted” services get hacked, or sold on when the IPO comes around.
2) As another commenter says below - this is symptomatic of a type of parenting which ultimately creates fearful, anxious, badly adjusted children. Study after study shows that “free roam” children end up as better balanced humans. I’m not saying that watching and monitoring and stat-ifying your newborn is immediately going to make them anxious, but it says something about parenting which to me is unhealthy, obsessive, and ultimately not about freedom for the most important beings here: the kids.
I’m extrapolating of course, but hopefully my drift is somewhat clear..
So I do think people from these generations should just focus on retiring, stop voting evil people into positions, and looking up latest alzheimers research, which btw was derailed by the same type of free range kid turned scientists from the greatest generation or whatever.
Its a baby monitor. Not some clockwork orange contraption.
You are framing it as if every change is in a positive direction, which it clearly isn't. Risking at sounding like an old man yelling at clouds, look at the kids these days. They are so dependent, and so sensitive to negative stimuli or emotions.
Parents need to realise that they need to grow adults, not perpetual kids.
I think many of us have found people writing comments like this are not interacting with children very much. More just reading the takes of others who also don't interact with children.
And if this was a legitimate problem to address, you would not address it by taking away baby monitors.
And while it is certainly true that I don't interact with young children a lot, the case is different for older ones or "young adults".