Hacker News new | past | comments | ask | show | jobs | submit login

I live in an apartment with quite strict fire-protection standards. Due to the fact that I have a cat that absolutly loves to go outside, I needed to find a solution for him to get outside without a catdoor trough my door.

So I installed a fire-protecion-approved door drive that is hooked to a raspberry pi. Another raspberry pi then analyzes a video stream and detects my cat. If my cat is in the frame for n amount of time, a message is sent to the pi conntected to the door drive and the door opens up slightly for him to get in.

Wow. I literally just sat down to relax after building a cardboard prototype cat door fitting in my open window in winter. You just made me feel partly inferior, and partly like I'm in good company

Now check out this project: https://www.youtube.com/watch?v=1A-Nf3QIJjM

A cat door that can tell if the cat has a mouse it's going to "gift" to you, and locks to keep the cat out.

I may now get a cat just to set this up.

Sounds like there is a market for fire standard approved cat doors! ;)

I loved reading what you are doing with the Pi though.

As you might have guessed, that came to my mind too. Due to the fact that I have worked with a company in the fire damper business, I was contacting them and we were brainstorming about it. The thing is: The market is just non existent. Also fire-protection regulations can be very specific depending on the country you are in. For example, EU ratings are not always recognized here in Switzerland.

Since last week I'm in contact with the manufacturer of the door drive tough because they maybe want to create a product out of it. To be honest I think it would pure marketing and at the moment it is very unlikely to ever hit the market.

A fun dream I've had (context: I've always been confined to apartments) is some sort of cat/pet utopia in a block, so they wouldn't be stuck inside alone. But that wouldn't be feasible since they have to navigate the fire-proof doors between floors...

Unless your cat door goes to market. May luck be on your side :)

(really, don't underestimate niches, you can probably find plenty of places to sell this sort of product...)

Do you have a link to the "door drive" that you're using? I've had this idea for a long time and really want to build it.

I don't use this specific drive due to the fact that another company gave me a better deal for some marketing. But if I had to choose again, I would buy a dormakaba ED 100 or ED 250 (depending on the weight of your door). They support multiple opening angles depending on how you activate it.

Do you have a screengrab of your cat?

Here is a picture of him examining the tech behind his magic door https://i.imgur.com/81VgqaR.png

Now here's an experiment: can you trigger your door by printing out an image of your cat? :-)

Does this open a door or a cat door? I’m just imagining breaking into places by wondering around holding a picture of a cat.

Can you please open-source this?

super cool! Sorry for my ignorance, but how does it close again? Do you issue fire alarm and it closes ?

The door stays open for n amount of time (normally around 1min but I changed it to 30sec). The drive has a laser sensor attached to it (it is required to have installed with automatic doors in Switzerland if you don't want any issue with insurance). As soon as the specified amount of time has passed, the door drive tries to close the door. It only works if the laser sensor detects no obstacles.

Maybe a bit off-topic but: The only thing that differs an "fire-protection approved" door drive from a non approved drive is that the drive is not allowed to have an option to keep the door open. Also in case of power outage (or fire) the door needs to close without power.

Why do you use two separate pis for it?

I'd imagine the processing power required to detect whether or not a video feed contains a cat doesn't jive well with sharing a CPU with something presumably-realtime-sensitive like driving a motor to open a door.

You are exactly right. Before I "optimised" the image recognition the whole detection part was running on a Mac Mini. I also like to "separate concerns". The Pi that is handling the door opening runs Alpine with a read-only file system so whenever there is a power outage or whatever it boots into a known good state. The image processing part is behind a big UPS and is running with a writable file system.

Seems like the door opening Pi would be a good candidate for an esp8266 or an esp32 (if you were looking to save costs and/or have fun playing with a more limited environment)

esp8266 means wifi, and also means you don't have the whole linux TLS ecosystem to play with. I'd be somewhat cautious about using an esp8266 (as much as I like them) to unlock my front door...

Why would you be cautious? Not saying there's no downsides, but if anything I consider it to be an "upside" that the device is simpler. Now I don't need to worry about linux, or making sure it's a read only filesystem with an image all setup, etc.

I look at it this way: If you want a remote device that measures or controls just one or two things, but does very little if any calculations - use a esp8366/32 (or anything with low power requirements). If you need to process data (video stream), or do other calculations, potentially while controlling many different sensors/things - you'll likely want a raspberrpi/similar

I want locks on my doors.

If you can come up with a reasonably secure way to get an ESP8862 to unlock your door that I can't sniff from across the street with a pringles can hooked up to a wifi dongle running in promiscuous mode (perhaps with a pile of off board AWS to crack your WPA key), I'd be interested in checking it out.

I'm not saying it can't be done. But for _me_, I'd prefer to piggy back on all the battle tested tools available in linux like OpenSSL rather that pretend I can write bulletproof crypto code for the constrained resources available on the esp. And I'd prefer to run my unlock signals over wires rather than over a radio. I'm cautious like that.

Preshared one time pad would be pretty simple. But just because it has wifi, doesn't mean you have to use it. The chip is bristling with io so running real wires is always an option (and hey, you probably have to power it by wires anyway).

There's definitely something to be said for not having the surface area of some hobbiest-grade linux distro on your door locks also. I'd like to perform a "security update" on my door locks just about never.

Anyway, the esp32 has a tls stack which is adequate if you want to go that way. Lately there are a handful of boards on the market that pair the esp32 with a PoE chip that are becoming my goto for little "iot" projects.

There are probably much easier ways to break into your apartment than cracking a custom wifi widget.

Obligatory xkcd:


Thanks for the tips! I will order a esp8266 and check it out.

Unless you love soldering wires to tiny little smt pads I'd recommend looking for one of the "development boards" based on the 8266 (or as others have pointed out in this thread the bigger, faster, stronger, esp32). Not only will you get some through-hole connections to some subset of the pins, but you'll also get an onboard power supply and probably a usb port for programming so you can get right to cooking.

Thanks! Will do some research and then try to order the right one.

There are no end of ESP32 dev boards but if you're new to working with MCUs I'd always recommend starting with something from Adafruit or Sparkfun. They just have way more documentation and support.

So I'd go with something like an Adafruit ESP32 Feather [0]. Sure it's super impressive that one can pick up a perfectly functional anonymous board on eBay for almost nothing but, for getting started, $20 for something from Adafruit will save you a lot of initial hassle.

MicroPython on ESP32 [1]. MicroPython specifically on the Adafruit ESP32 Feather [2].

[0] https://learn.adafruit.com/adafruit-huzzah32-esp32-feather?v... [1] https://docs.micropython.org/en/latest/esp32/tutorial/intro.... [2] https://github.com/pvanallen/esp32-getstarted

I can highly recommend the "Wemos D1 Mini" for starting with ESP8266 as it's tiny, cheap but can be plugged in to a PC to be programmed over USB and has pin headers and readily available shields for getting started quickly. I have one in each room of the house reporting back temperature\humidity to the pi that controls the central heating :-)

You're welcome! You might also be interested in MicroPython (if you write python) which runs pretty solid on esp32 and has a lot of batteries included. You can almost forget you're running on a micro.

Do you by chance have a link to a good development kit for the esp32? I checked and I'm a bit overwhelmed by the amount of different components one can get.

One that I like is commonly branded TTGO, a search for "esp32 ttgo" or "esp32 oled battery" will turn up some options.

This is a link to the exact one I bought since you asked: https://www.ebay.com.au/itm/283082902927 (not actually branded TTGO, it's a clone)

Why you might like it:

- it has an OLED screen on the board for debugging and status output

- it has a battery holder and charging circuitry for an 18650 on the back of the board for portable powering/"UPS"

- it breaks out all the GPIO lines onto pins

Why you might not like it:

- like many esp32 dev boards it's slightly too fat to go straight into a standard breadboard. You have to join two breadboards to get access to both rows of pins.

Lately I've been playing with the Olimex esp32-poe [0]. It supports being powered over ethernet or lipo battery (or micro usb) and includes an SD card slot. If your application uses the ethernet, though, be sure to develop using a non-poe switch (or else power from the ethernet interface can leak over the usb programming interface and damage your laptop.)

[0] https://www.olimex.com/Products/IoT/ESP32/ESP32-POE/open-sou...

A cat or your cat specifically?

That’s amazing

I could actually use exactly that. Do you have a blog outlining how you did it, or the code on github by any chance?

No sadly not. I'd love to write about it but my English is just not good enough to write a compelling story. Writing it in German and then having it translated is always a bit of a hassle. But I may consider it. At the moment I have an offer of the door drive manufacturer for doing a "home story" about the solution. If that will happen, it will definitely be released in English.

I will open source everything once I'm happy with the security and the ability to configure it.

For what it's worth, I didn't have any clue that English wasn't your first language until you said it.

Likewise! Although perhaps part of it is the additional effort it takes them to write in English, which would be understandable.

I've been having pretty good luck with a friend who runs stuff through Google translate, and then I (a native English speaker) fix it up to make it more natural. Might be worth a try. I bet there's plenty of people on HN for example that would do that for you.

Deepl.com is light years ahead for English to German and vice versa.

I wouldn't underestimate your English skills. What you've written here is perfectly serviceable.

> No sadly not. I'd love to write about it but my English is just not good enough to write a compelling story.

Reads like a monty python sketch.

Your English is amazing. Don’t let it stop you.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact