Daphne’s tweeting catflap
Daphne the WonderCat is the feline owner of Kate Bevan, a tech journalist. Daphne is surprisingly active on social media for somebody who doesn’t have opposable thumbs; her Facebook is full of a mixture of (perfectly justified) boasting about her superbosity, and complaints about the inadequacy of her human support team.
Bernie Sumption, an acolyte of Daphne’s, had an observation to make.
Unfortunately, Daphne’s catflap was until recently mute, and couldn’t tell the world about its thoughts and feelings.
This was a pity, because Daphne’s catflap actually has a lot to tell the world. You see, the catflap *loves* daphne. Each time daphne passes through, its universe lights up with joy. Every time Daphne’s whisker brushes against it, a tremor of excitement passes through its little plastic body.
In this project, we gave the catflap a voice.
Each time Daphne walks through, the catflap will take a photo and tweet it, along with a little paean to Daphne’s greatness:
Daphne, the sweetest and most sought-after kitteh, so noble is your regal demeanour. *swoon*. pic.twitter.com/t8f6rKn32k
— Daphne’s Catflap (@DaphneFlap) January 25, 2016
What’s going on here? Bernie describes the technology stack as not so much a stack as a “technology teetering edifice”, and illustrates it thus:
(If you, proud servant to another cat – or multiple cats, want to add another layer of complexity to such a project, you could also look into feline facial recognition with OpenCV, which, as Tomomi Imura demonstrates, turns out to be pretty effective, as long as they’re facing the camera.)
There’s a very nice account of the whole project, including all the wiring and code you’ll need on Bernie’s website. (People who are new to coding and who are interested in a standalone generative grammar project should also check out our Storytelling resource.) Follow the instructions, and your own home decor can produce this sort of thing:
My goodness! It’s the sumptuous pocket-sized tiger, your nose is so pink and moist. I am ecstatic!. pic.twitter.com/D7eTxZ9OEr
— Daphne’s Catflap (@DaphneFlap) January 22, 2016
(At the risk of being a massive curmudgeon, I’m a little torn on whether or not to follow Daphne’s Catflap on Twitter. She uses it an awful lot.)
Gadzooks! It’s the inspirational Daphne, all glittering emerald eyes. I am tickled pink!. pic.twitter.com/VZyF6oR9Pg
— Daphne’s Catflap (@DaphneFlap) January 7, 2016
Still, it’s rather pleasing to note that the script is tweaked to allow for seasonality.
Revered Daphne, marvellous festive fluffball, such nobly held, amazing tail. My joy knows no bounds. pic.twitter.com/ZF2XfAIBvc
— Daphne’s Catflap (@DaphneFlap) January 3, 2016
Where would we be, internet folks, without cute cats? ADRIFT. That’s where. Please take some time to read Bernie’s extremely entertaining account of this project, tickle your cats between the ears, and let us all give thanks that not everything on Twitter is dreadfully serious.
the link ‘Tomomi Imura demonstrates’ doesn’t appear to work.
Thanks for that – looks like I had a moment of mousing inaccuracy when pasting in the url. Fixed now.
Liz, you should totally follow her catflap. She goes *hours* between visits to the outside world/empire; she tends to have busy periods when she pops in and out, so your feed won’t be full of the tweets all the time! And Daphne would be delighted.
Thanks for writing such a lovely piece – we are all delighted with it.
“a moment of mousing inaccuracy”
Your mouse was obviously trying to avoid all the cat pictures, in case it got pounced on ;-)
I’ve recently had a RFID-tag reading Cat-flap fitted into some new glazing and was wondered whether I could attach it to an RPi to track the comings and goings of my future feline owners (I am currently dispossessed) but no, this is not going to be easy as I hoped!
At the moment there does seem to be a dearth of UK Cat-flap manufacturers providing I/O capabilities “out-of-the-box” with the only option being a bit of DIY hardware hackery. Seems they are missing a market share there – a PoE solution would mean they could both power and provide Home Automation (“Which Cat is in or out right now?”) in one swell foop. For those with more extensive dwellings where multiple Cat-Flaps are required this could really pay off “Tiddles is booked for the Vet later today, she alone must be kept inside; Rover (he thinks he is a dog) is free to roam as he usually does…”!
Didn’t you know this is wat the internetz was invented for. Lolcats rulez.
@Stephen, when we initially started talking about the project we wanted to use Daphne’s RFID chip to trigger the Pi as the catflap reads it to let her in, and I had a long email conversation with one of the experts at Element 14 about that. Turns out it was sort of theoretically possible, but not really doable. That said, it’s a couple of years ago, so someone might well have come up with a way to do that now.
WRT managing separate cats, Sureflap, the makers of Daphne’s catflap, now does a flap that can set permissions for individual cats. All you need to do now is cobble together a way for the Pi to recognise each cat, maybe via the face recognition project linked to in the piece above?
The Other Peter Green
You need to hook the facial recognition algorithm into the grammar module, thus avoiding tweets like the one that juxtaposes praise for Daphne’s “glittering, emerald eyes” with a photo of her backside! :)
With all those tweets the Internet will become 100% cats not 99%.
I wonder if the door (Humanflap) is jealous.
I feel a little prototyping with our littlebits and cloudbit coming on…time to extricate the necessary bits from our minecraft-controlled lego sweetie dispenser.
All I can say is that “cat” is a perfectly useful *n*x utility for disgorging the fabulous contents of regal filesystem elements, and that there’s a reason why “dog” is dyslexic for “god” and not “tac” :D
OTOH, we have five fingers (furiously typing on another keyboard at ~200 wpm, as usual) and this demonstrates why there’s a song about “Who let the dogs out?” and not “Who let the cats out?”. No self-respecting dog (which is redundant, of course) would ever tweet every time it’s gone out to solve the apparent lawn fertilizer shortage problem. They also tend to not bring back nasty trophies either, taking care of the feeding problem themselves. That other species is only interested in humans when it’s time to eat – go do something with that carcass you hauled in and unceremoniously dumped on the carpet or, more likely, in an inaccessible corner. Its presence will only become known through olfactory senses, or a long trail of ants, sometime much, much later. Then there are cats and laser pointers – need I say more? ;)
OK canine fans, let’s show them what a _real_ piece of computing-integrated engineering looks like, capable of handling breeds closer in size, musculature, and intelligence to horses than rodents! :P
Facial recognition would be great if it could alert me to the imminent need to rescue a rodent from certain death, or chase one around the house. Our cats have two flaps – one into the garage and then from the garage into the house. If the first flap could tell the second to lock itself until the rodent is dealt with, I’d have a much easier time with the rescues.
Comments are closed