Settings

Theme

Automated Cat feeder powered by Node.js

github.com

117 points by ohhoe 10 years ago · 70 comments

Reader

bigchewy 10 years ago

I built something similar for my girlfriend recently. When she's at work, she misses our dog so I built her a device that, when activated, dispenses a few treats, takes a video of Pickles enjoying the treats and sends it back to the sender. She can activate it by either sending an email or, better, picking up a picture frame that I customized. Inside the frame is a sensor that detects her touching the photo and that triggers the process, with the video ending up on her phone.

The main components are a Raspberry Pi to listen and control things plus an Amazon Dash button that I reconfigured as an on/off switch located next to my front door.

Overall, the software itself was relatively easy. The tricky part was building a machine that dispenses a few treats consistently, not 3 treats then 15 then 0.

I've been thinking of writing this up in more detail. If there is interest, that may provide the motivation.

  • ohhoeOP 10 years ago

    I definitely hope to incorporate a camera as one of the future releases. :D I want to be able to spy on my kitties while I'm away.

    • bigchewy 10 years ago

      I tried an Arduino based one and the Raspberry PiCam. PiCam was far better quality. The challenge is getting it to stream real time which typically requires a hardcoded IP address. Easy if you have a router, hard if you live in an apartment complex.

      The s/w for both can be largely cut/paste from the templates.

      Of course you could also just buy a dropcam or similar device, which streams video to a site and then the mobile app watchest that stream, with a ~3 second delay. But that's not really fun

      • HaseebR7 10 years ago

        Have you tried one of those Dynamic DNS services ?

        • bigchewy 10 years ago

          not yet. I did some basic research but haven't gotten to it yet. I"m wondering if that is how the commercial IoT devices do it.

lawnsea 10 years ago

this is a great project! i'm working on a go rewrite right now (i wish the author had chosen a less broken language in the first place lol).

question: how hard would it be to make this work for a nutrient suspension? i'm asking because i have switched to soylent (for obvious reasons that i will not belabor here) but am frustrated that i still have to remember to prepare and consume it at the correct interval.

it would be truly liberating to simply insert a tube into my mouth that would dispense an appropriate amount of fuel into my system at the optimal moment - perhaps triggered by my blood glucose dropping below a particular threshold[1].

[1]: http://www.diabetesforecast.org/2015/may-jun/glucose-monitor...

  • ntumlin 10 years ago

    I mean this in the nicest way possible, but is this satire? I actually can't tell. Between go rewrite, criticizing the language choice, and wanting to just stick a tube in your mouth and be automatically fed soylent this almost seems generated by a markov chain.

    If sincere I apologize.

    • commandar 10 years ago

      I'm mostly impressed that this kind of Poe's Law material is the only comment on a 1400 day old account.

      • ntumlin 10 years ago

        Well, it's not my only comment, I think that older ones only show up to me though past a certain point and I haven't commented in a while. And surely I'm not too crazy to think he could be serious, I mean there's so much on here that talks about the same thing, maybe just not all together, and I hope I'm not the victim of some long running hyper-trendy startup joke.

        • striking 10 years ago

          No, it's his only comment (his account's about two months older than you, funny that it happens to be that close).

        • commandar 10 years ago

          like striking pointed out, I was referring to the OP, not you. Your reaction was completely in-line with mine.

    • avitzurel 10 years ago

      Your comment made me laugh really loud in an office that is dead quiet right now. Just thought you should know.

  • processing 10 years ago

    "it would be truly liberating to simply insert a tube into my mouth that would dispense an appropriate amount of fuel"

    It's Happening!

kator 10 years ago

I built one of these a couple of months ago using a rPI and a simple relay to control the 12v feed to one of these:

    http://www.super-feeder.com/csfmodel.html
Literally the code to feed them is a crontab:

    0 5,11,17 * * * /home/pi/bin/feed - > /dev/null 2>&1
Using this script in /home/pi/bin/feed:

    #!/bin/bash

    export PATH=$HOME/bin:$PATH

    (
        source gpio
        echo "Using pin 12"
        gpio mode 12 out
        gpio mode 12 out
        gpio write 12 0
        sleep 1
        echo "Turn On"
        gpio write 12 1
        sleep 20
        echo "Turn Off"
        gpio write 12 0
    ) 2>&1 | logger -p local0.info -s -t feed

    gpio write 12 0

    exit 0

    /home/pi/bin/gpio is from here: https://github.com/lasandell/RaspberryPi.git
I re-wrote it this weekend as a Openresty powered API (nginx+luajit) and put a web page on with a feed from the picam so my wife could look at the bowl and hit a button to dispense more if the cats needed it.
  • mnort9 10 years ago

    I'm looking to build something similar. What did you use as a hopper?

    • kator 10 years ago

      The super feeder (linked in my original comment) is amazing, high quality, really strong, so far I'm very happy with it.

    • ohhoeOP 10 years ago

      they linked to a feeder! they're pretty cool, really heavy duty.

ape4 10 years ago

Sorry to be boring but a simple timer seems more sensible. Dispense the preset amount everyday at the same time. And kitty needs water.

  • steveklabnik 10 years ago

      > Sorry to be boring but a simple timer seems more sensible.
    
    Not all projects are about being sensible. This is "hacker" News after all.

      > And kitty needs water.
    
    Water and food have different needs; an automatic water fountain like http://www.amazon.com/Drinkwell-Platinum-Pet-Fountain-168oz/... keeps a pool of water fresh at all times, without needing to dispense a particular measure of it.
    • nyan4 10 years ago

      > Not all projects are about being sensible. This is "hacker" News after all.

      Problem is: people in the node.js community have a pattern of going from the "weekend hack" to the "production" stage in weeks. Code maturity has no meaning to some.

      • rhgraysonii 10 years ago

        If were being honest with ourselves, are we really concerned about the code maturity of a simple server feeding a cat? This isn't rocket science. Its a silly/fun project.

  • ohhoeOP 10 years ago

    just noticed this comment, but that's what the scheduler is for. same amount however many times you set it to.

RankingMember 10 years ago

I've envisioned something similar, but for wet food (dry food is better for our convenience than it is for cat health in my experience). You'd fill a (washable and refrigerated) cylinder with wet food, which would be forced out a heated tip by a piston (sort of like squeezing a toothpaste tube).

The refrigeration and heated tip are the complicating factors. The heated tip is used because cats don't tend to like cold food, and if you're going to go to the trouble of hacking something like this together, you might as well go all the way.

  • mkoryak 10 years ago

    My cat doesn't care if the food is cold. In fact, he will eat pretty much anything.

    He loves to eat the salad we make every day for dinner, and its not just the avocado, the other day he ate some tomato that I dropped on the floor by mistake.

    If your cat doesn't like cold food, perhaps you are feeding him too much?

    • CaptSpify 10 years ago

      More likely: the cats are just different. I've had cats that were super picky eaters, and ones that will eat almost anything.

      • joshschreuder 10 years ago

        I think from an evolutionary standpoint, having warm food is probably more to their liking (killing prey and eating it), though I agree with your point, as my cat doesn't seem to care either way if it's room temperature or cold.

cauterize 10 years ago

Very cool! I've had a Petnet (www.petnet.io) feeder for a few months now and I never want to go back. Dispensing small quantities multiple times a day has made my cats inhale-until-instant-vomit issues go completely away.

  • gouggoug 10 years ago

    This product looks absolutely great. Unfortunately they don't offer an android app, and it's not clear whether you need the app to program it or if it's just a bonus.

    Do you need the app to use this feeder?

    edit: just saw someone else's comment about the app being mandatory to use this pet feeder.

    • cauterize 10 years ago

      It is unfortunate, but given that the product is quite solid, time may change that.

  • CaptSpify 10 years ago

    FYI: For my cats, feeding them some pumpkin has also helped prevent them from vomiting. The fiber helps them process the food better. (talk to your vet before following advice from some anonymous asshole on the internet, yadda yadda, etc.)

  • darkstar999 10 years ago

    > The product requires a compatible iOS device to operate (iPhone 5, 5C,5S, 6, 6+).

    Well that sucks! Why would they lock themselves to a platform like that?

    • cauterize 10 years ago

      Most likely due to lack of resources.

      • izacus 10 years ago

        Why does it need a mobile phone to work at all?!

        • gknoy 10 years ago

          It probably doesn't -- there's likely an API that the app calls, and that one could, with time, mimic it. That would also require the intersection of people with the tools, cats, and inclination.

  • ohhoeOP 10 years ago

    I have a petnet too. :D It's great.

cing 10 years ago

Cool project, I'm a major fan of automated cat feeders but never attempted the DIY approach. On a related note, I got a laugh out of this insanely complex "review" about hacking a cat feeder: http://www.amazon.com/review/R3V5LAWRW84JF7/

baldeagle 10 years ago

I backed a kickstarter for something like this, plus a wifi camera and laser pointer. It hasn't shipped yet, but does look like it might actually deliver (which is something for hardward KS).

http://kittyo.com/

  • keehun 10 years ago

    Holy batman that scroll hijacking.

    • krisroadruck 10 years ago

      I have to ask. Why do people dislike this? The browser scroll bar is often ugly as sin. Also its useful when having more than one area that needs scrolling capability without having that ugly default scrollbar junk up the middle of the screen in said application.

      • djloche 10 years ago

        Look at the name people give it. Scroll-hijacking. The web designer hijacked the scroll action and modified the behavior to something other than the os and/or browser level setting. When I scroll, I expect to scroll based on the settings in my browser. I don't want your website to stop scrolling and use my scroll action to play through the frames of your slow-loading animation. I just want to scroll down and keep reading.

      • chestervonwinch 10 years ago

        It's not the appearance so much as the behavior. For example, I have (probably like many) an intimate muscle memory associated with the sensitivity of my touch pad for scrolling. The deviation from how I expect the software to behave using the same physical interactions I normally use suddenly makes me feel like a clumsy oaf.

      • bvm 10 years ago

        I have a touchscreen laptop, so the inertial scrolling often gets broken when sites scrolljack. That said, styling the default scrollbar (except in Firefox, where it can't be done) is a different behaviour, and whilst imho it should be discouraged for "regular" sites like this example, is totally fine when scrolling small widgets.

      • keehun 10 years ago

        There are some (very few, rare) scroll-hijackers that work pretty well. This one is not one of them. In fact, the one used on this site is one of the worst. Why I say this is its behavior. Instead of smooth scrolls, it seems like there is a certain threshold at which the scroll bar "ticks." They mask this tick by slapping on it a tween animation. So it's a bunch of ticks that result in tween animations. There are beautiful scroll-hijackers that use complicated math to make it an actually smooth experience. This one is neither smooth nor helpful. There are also those scroll-hijackers that are employed to do card/slide/page based interfaces. Those are still awful, much more understandable than this garbage.

      • bluejellybean 10 years ago

        I hate it because it completely distorts my view of how the input works. It's just as annoying as changing the velocity of the mouse on a page. Don't mess with inputs.

  • ohhoeOP 10 years ago

    Kittyo was so cool!

    I actually own a petnet, but I wanted to see if I could build my own feeder in a simple enough way so people could adapt it and add modules on so it could be like kittyo or even like petnet, or whatever anyone wants.

  • joshschreuder 10 years ago

    That's pretty cool, do you know how it's powered? I don't see any cords, which implies battery, but I can't imagine it would be battery given the wifi connectedness etc.

2xlbuds 10 years ago

I never understood the point of automatic feeders for cats - you lose out on that association your cat makes with you feeding them so your cat doesn't necessarily like you as much.

  • bobbyd3 10 years ago

    My cats are very neurotic when it comes to me feeding them. Sometimes they don't eat when I am not standing right by them. I am looking to disassociate myself from feeding time as much as possible.

  • ohhoeOP 10 years ago

    My cats are lap cats and I've been using automated feeders for over a year.

    I guess some people just have crappy cats.

armini 10 years ago

I built a dog ball launcher and treat dispenser similar to this using Arduino. Feel free to ping me if you want the source code and electronic diagrams https://www.youtube.com/watch?v=P8jMdRXeMfA

brandonmenc 10 years ago

This is definitely a product category that needs shaken up.

My parents recently had to buy four or five of these things just to find one that worked kind-of sort-of reliably.

dominotw 10 years ago

cool. but I won't subject my cat to "kibble".

  • ohhoeOP 10 years ago

    $30 bags of Nutro grain-free high in omega-fatty acids dry food, coupled with a constant flow water fountain feeder is completely healthy and good for indoor cats.

    I'm not feeding them meow mix or friskies.

  • justboxing 10 years ago

    What do you mean? What do you feed them instead? Curious. I have 3 cats and they are on the kibble. 1 of them has IBS. I always wonder(ed) if it's cos of this solid food full or "fillers".

    • skunkworks 10 years ago

      Wet food is almost certainly healthier for cats. Less carbs, more moisture, fewer urinary tract issues, etc.

      Kibble is great for when you need to get away for the weekend, however.

      • gknoy 10 years ago

        How do your cats maintain clean teeth when on solely wet food? I had thought the kibble helped with that, but that may have been more because of my prior cat's allergies than the food itself.

        • skunkworks 10 years ago

          Surprisingly, kibble is supposed to be worse for teeth because it gets stuck on teeth more easily. Same argument has been made for humans and cereal grains.

    • dominotw 10 years ago

      raw food. checkout primal if you just want something simple to start out.

      • darkstar999 10 years ago

        You can get high quality grain-free dry "kibble" pet food. Just because it's kibble doesn't mean it's low quality or full of junk.

  • Oompa 10 years ago

    Tell that to my cat who refuses to eat wet food, but loves kibble. She opted to not eat most of her kibble when I mixed the two.

guymcarthur 10 years ago

A simple (gravity-powered) cat feeder works perfectly well. Unlike dogs, cats are smart enough to eat only what they need. I have to refill the feeder for our 3 cats maybe once or twice a month.

  • ohhoeOP 10 years ago

    As the person who made this project, I assure you this isn't true.

    I have one cat who is a reasonable free-feeder, and another cat who is a food beast and will devour everything in his grasp.

  • bpicolo 10 years ago

    > cats are smart enough to eat only what they need

    Could you tell my immense cat about that?

  • GordonS 10 years ago

    Hah, not all cats! Ours will eat everything that is put in front of it, and then throw up

  • darkstar999 10 years ago

    Not all dogs are fatties. Mine only eats what he needs.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection