Hacker News new | past | comments | ask | show | jobs | submit login
Reverse Engineering a Cat Feeder to Boost Productivity (sensibledefaults.io)
142 points by bubblehack3r on Oct 9, 2022 | hide | past | favorite | 38 comments



I was just looking into this the other day. Nice to see someone do it. I wonder if making it more hackable by replacing the electronic guts with something like a ESP8266 would be worthwhile. I'd much rather be able to have a simple little server on this device that I can talk to over the network rather than having to go through some random company's servers. I imagine connecting it to the motor that turns the feeding mechanism wouldn't be too hard and the screen and buttons could simply be removed to prevent any, ahem, manual tampering. Adding some way to lock the food bin would also help with impulse control for those who need it.

Another upgrade would be to randomly reward the desired behavior instead of always rewarding it. This helps to both prevent gaming the system as well as keeping those dopamine spikes high when you unexpectedly get some candy. Using chocolate as a reward is perfect since it provides tryamine to help replenish your dopamine levels.


Might be possible to use DNS to point api.petkt.com to a local webserver and rewrite the API?

I can't imagine it has that many endpoints or that much logic. I would think the main issue would be potential encryption/authentication but if they're using plaintext HTTP for the phone app then maybe the feeders are using plaintext HTTP too...


If the device is using HTTPS, you'd need a valid certificate for that hostname - that's exactly the attack HTTPS is designed to defend against.

And if they're using certificate pinning, it can't even be any certificate from a trusted authority, it has to be one particular authority or even that specific certificate that they use (they could very well be using an internal CA for this, as they control the other end of the connection).


From the article:

> You'll see that the data for these products is sent in plaintext to and from their servers... No HTTPS... That's just sketchy.


That’s what I ended up doing. ESP8266 wired to a motor driver and flashed with ESPHome. It worked really well, though I lost out on the screen on the feeder itself it was a worthy compromise since it was all kept local.


I totally thought about that as a last resort, but their API is not well hidden or secured, I'm going to use it until they secure it lol.

Randomizing is a great idea, I've got to drop the calories per commit somehow lol


Just connect the reward to a good build and passing all the unit tests. Project management achieved. :)


Yet another reason to have a quick test suite and build pipeline?

I feel like having to wait for more than a few seconds to get the reward would remove the instant gratification our brains crave.

That's an interesting setup. I could certainly use something like that: I'm writing my PhD manuscript, and depriving myself of rewards (hobbies) until I'm done, but it seems like my brain can't really understand long-term rewards instinctively. I already have a few hooks that compute the number of lines when I push a commit; I could see myself wiring this up to boil water for a tea, or something similar. Want to take a coffee break? Work a bit first! Avoids procrastinating to some extent, while adding some kind of gamification to the self-discipline (having only myself standing between me and the reward is sometimes not enough).

Well, I guess I'll just pretend I have such an elaborate setup; and only build it once I'm done writing ;)


Someone somewhere will steal the idea and make these available to human farms (euphemistically known as offices).


SNL really went downhill once they stopped using this effective productivity boosting technique, because Lorne was just too stingy.

https://www.youtube.com/watch?v=_qIcYkEIVdc&t=3m23s


Fun hack. Though, for myself, I'd be afraid of breaking either my diet or my normal goal-directed work focus.


I was scratching my head on how he was capturing requests without mentioning a proxy cert, but then I saw the security note at the bottom.

  You'll see that the data for these products is sent in plaintext to and from their servers
The API seems to have a valid cert and is listening over HTTPS - strange that the app client uses plaintext.

  curl https://api.petkt.com/
  {"error":{"code":97,"msg":"App is out of date, please upgrade"}}


I was actually just thinking about a Tamagotchi-like program that required regular productive activities in order to keep a virtual pet alive, healthy and happy. A computer program would not need to deal with all that messy real world hardware; it would all be virtual.

You could also add a function that makes your virtual pet unhappy if you spent too much time reading Hacker News. Instant productivity boost.


There's this app for Android that's similar to the idea you mentioned. When you want to focus, you plant a tree in the app, and if you leave the app (eg. to browse the internet or check social media), the tree dies. If you focus for long enough, the tree grows to be a full one, and you can plant a forest.

https://www.forestapp.cc/


Habitica might scratch this itch to gamify your tasks.

https://habitica.com/


By mixing the chocolate almonds with a larger amount of less desirable snacks, one could get the lootbox effect of “just one more commit”.


When I have a bunch of friends over for coffee, we like to play "Moroccan Roulette" by tossing a chunk of hash into the automatic coffee machine's bean grinder hopper.

Probably a good thing I work at home and not in an office.


Isn't THC not really bioavailable when eaten in hash form?


If you're grinding beans for coffee, it'd end up in the filter basket or whatever and get hot-water extracted, right? I don't see how it necessarily qualifies as "roulette", but I bet everybody has a real good time.


My guess is that its one of those kind where most of your coffee is stored in the hopper, and they are only making singleton cups (pour over or cappuccino).


Add some cream to your coffee.


Reverse Engineering the Reverse Engineered Cat Feeder to Boost Snacks

while true: push


The tricky bit is trying to outwit yourself.

Just opening the lid and delving in.


As a person who eats all the candy in the house, I am very good at following rules also. E.g. “don’t buy candy” or “don’t eat someone else’s candy”.

Maybe “only eat dispensed candy” isn’t a good rule to follow in itself, but I do wonder if the dopamine release associated with triggering the release of candy counts for more than the candy itself. :-)


Haha this is a great reply and reminds me of how much I love Rube Goldberg machines! Simple outcome, complex process. The first thing that came to mind was Doc Brown’s automatic dog feeder for Einstein in the original Back to the Future.


Tangent to the project: Nuts are good, but what about a healthier mix?

Like wasabi covered almonds if you like almonds, or sunflower seeds (for trace minerals), walnuts, etc.

They are high in carbs but provide many other things.

On the tech side, it would be fun to be able to deliver just one for a lootbox effect ("when I get the walnut, I take a break")

It could also be at specified intervals, to act like a pomodoro?


That wouldn't work for me. Too hackable.

I need at least something like this:

https://www.thekitchensafe.com/pages/faq


> They send your complete location too, which is further sketchy

Why do they need your location in the first place? Can you run the app without GPS priviliges?


I'd game this immediately: commit every character individually.


why would you extend so much energy to eat more unhealthy junk?


This reduces the eating of unhealthy junk. Imagine if it was just an open bag of these sitting by the computer.



Almonds in dark chocolate don't sound that junky


According to the linked product page, they are 37% carbs (and 43% fat), so not too healthy if you eat a lot of them, but it could be worse.


Chocolate supports endorphins too so it’s a good reward


Almond chocolates aren’t unhealthy junk?


How American do you have to be to believe that something covered in milk chocolate is healthy?


I’m not assuming milk chocolate. :-)

To answer your question: I think milk chocolate is about just as popular in Germany and the Nordic countries, so perhaps you don’t have to be very American.

Chocolate and almonds are both quite healthy in the right doses. I mean the chocolate that’s isn’t mixed with methamphetamines, just to be absolutely clear. ;-)




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

Search: