Ask HN: What non-work task have you automated?

586 points by Kevin_S ↗ HN

721 comments

[ 5.6 ms ] story [ 445 ms ] thread
I’m receiving a weekly ePub compilation of all my pinboard “read later” links via email every Sunday evening.

That was basically my first project using serverless functions and it was a fun thing to build.

I automated checking the website of the French equivalent of the DMV to be able to book an appointmenT :)
I had a cron job that sends automatically a text to my wife each morning along with a joke, she's in another country so is something I did to keep the communication open
You automated a part of your relationship. This is awesome!
Reminds me of this reddit user that automated 'liking' his girlfriend's Instagram posts: https://www.reddit.com/r/Python/comments/70udwq/what_routine...
This is a great suggestion - will add it asap!
I thought so too, until I realize she could immediately call and ask what do I think about the picture.
Like + email with the picture? :)
Just spin up a good computer vision algorithm!
(comment deleted)
Did the text message come from a separate account or were you able to use your cell phone number? how did this work?
it was an azure webjob using twilio api to send the message, I randomized the time and the selection of jokes to make it seem like I was doing it :)
This sounds terrible. Even more terrible a lot of people (probably you also) don't find it terrible.
Damn am I so old school that I prefer real voice (and believe me, Skype over Hotel networks is awful (and floss alternatives are no better), but that's better than nothing). Automating that part of my life seems so soulless...
I like voice better of course but what I didn't mention is that the cost per minute if I call her is $0.60 and that quickly adds up and she doesn't have internet over there, so if a text costs me $0.003 I might as well be using it
Ahhhh... Now I get it. And was bout to post something along the lines : "well, I shouldn't have judged like that, I don't the complete picture, maybe he has some good reasons...

Now, to be more constructive, where do you get your jokes ? Do you write them yourself or have you some kind of database ?

No reason to be so harsh. She's married to a techie. This is a techie thing to bring a little bit of happiness is all.

You're acting like he used a markov bot to reply to all his wife's messages.

No point arguing over whether this was harsh or justified--what matters is how GGP's spouse feels about it.
Imagine two Neural Nets trained by husband and wife to do the usual conversations. Now add a solarcell and a speaker- and some noise generator for starters on a gravestone- and long after the couple is gone, the beloved ones arguing goes on.

This is brilliant! No, it is not, this is one of your worser ideas. Oh, Madam is constructive again today. You want me to say my true opion or not.. This is how you always swing that- no matter how rude - its freedom of expression in danger.

I feel like this is an SMBC comic not yet illustrated.
You might have a case if 'hellothere007 doesn't write the jokes. I interpreted their post as meaning they write the jokes, queue them up with the cron job, and use it to schedule them for delivery at some time more appropriate to the wife's timezone.
Reminds me of the day when, while helping debugging stuff on my father's old Solaris server, I came across a email_birthday.sh script run by a cronjob every year at my mother's birthday.

They are happily married for more than 40 years and counting ^^.

this is another webjob I did but for my father's business, it sends the company's clients an email and text wishing them happy birthday :)
I recently made a bot that scapes the local apartment listings every five minutes, filters by price and area, and then sends me the new ones in the form of Telegram messages with the basic details, a GIF of the photos (scaled to mobile size), and a map widget.

Getting push notifications with the new apartments is really great, and I'll definitely be making more Telegram bots in the future...

mind sharing any more detail? heard of someone doing this before, but just started searching for a new place
My top-level post covers a similar approach to this.
You could charge for this if you expanded it out to other areas and websites. Might have to work with the data providers to ensure you're not breaking their TOS by scraping their websites, though.
Not sure if this counts because I didn't actually code anything: but using gmail filters to automate my personal email flow has had a huge effect on my day.
I'd say it counts.

My favorite filter is anything containing "unsubscribe" goes to a "Mailers" folder never to be seen.

I don't understand how people can deal with having unread emails in their inbox all the time.

This is a great heuristic vs tediously defining something more precise. Nice.
Am I the only one who clicks the unsubscribe link? I live by Inbox Zero and I've been giving out my email address for over a decade (500+ sites and services in 1Password), but I very rarely receive marketing emails because I always unsubscribe. In the US, it's a law that businesses must comply with opt-out requests.

Do most people feel their inbox is too far gone to manage manually?

I ignore them mainly because it's easier. Facebook alone might send me 10 emails a day begging me to come back.

If someone was smart, clicking the unsubscribe link would only validate that the address the mailer was sent to was being used. I suspect that several services do this either via the unsubscribe link or a pixel tracker.

Yeah, but that's now illegal, so only the real reprobates do it.
Trouble is there are just so many reprobates... (See also robocalls)
Most of the unwanted mail I see (at least what makes it past the basic automated filters) is from legitimate companies who think I'd like to hear about product updates every two days rather than Viagra pills or whatever.
I attempt the click the unsubscribe link for everything I get but some sites seem to double down on the emails after the unsubscribe
I think this is an urban legend.
Might be an urban legend, but I do notice subscribing doesn't stop certain emails
> but I very rarely receive marketing emails

How much of other kinds of spam do you receive? Any chance it's correlated with clicking Unsubscribe on some piece of email?

Unsubscribe has worked great for me too. I was not familiar with the phrase Inbox Zero before, but that is exactly how I maintain my primary email address I use for almost everything now. I typically only receive a handful of emails each day.
This has a very dangerous failure mode: legitimate emails, such as people's replies to Google Groups (and similar), which either themselves end with

To unsubscribe from this group and stop receiving emails from it, send an email to GROUP+unsubscribe@googlegroups.com.

or which quote other email that ends with the above.

I set up a bunch of these types of filters. Now my inbox is squeaky clean and everything is auto organized.
I track my visits to the gym with a geofence trigger with my phone--logs to a google spreadsheet through IFTTT.
(comment deleted)
This I would love to reproduce. How?
I use Tasker to do something similar. It checks visible cell towers when I unlock and turns on wifi if it sees the tower near my house. (Another script turns off WiFi when the network drops presumably because I've gone out of range).
IFTT mobile app > create recipe > set trigger "You enter an area" > Then "Add row to spreadsheet"

You have to do two "applets" though, one for entering and one for leaving, but you might be able to log to the same file

A few years ago I wrote something which went out and grabbed the top articles from the BBC, Guardian, Economist, Telegraph, and front page of HN and sent them to my Instapaper so I'd have stuff for my commute.

I'd love an app with a bunch of my feeds / socials plugged in which would then load up with content for my commute (which is offline/underground for large portions).

I've used ifttt monitoring rss feeds and pushing articles to Pocket for offline reading
I automated complaining once a month to the local water utility about a persistent puddle in the street in front of my home, caused by a leak.
Did it work? If so, how many months did it take? If not, how long has it been running for?
I had been running it for 4 months and last month they patched the pothole that the puddle created, so I suspended it. I think I may restart it though, water is starting to seep through the patching.
Why not once a week or once a day?
Ohh someone should do this for the pot holes in the Bay Area.
You could do what one guy did and start spray-painting penises around the pot holes.

(slightly NSFW) https://www.huffingtonpost.com/2015/04/27/artist-penis-potho...

Time to program the Roomba.. just add image recognition and spray paint module..
Too many potholes for a Roomba, need a drone with a spray paint can.

Hell, just scrape seeclickfix for reported pothole locations, have the drone fly there and draw a dong, and boom, instant fix.

Ah, yes, this will not end well, but I will enjoy reading about it!
IIRC, boston wrote a mobile app that people could install to auto report potholes. http://www.streetbump.org/

This was five years ago, donno if they've improved it.

That thing was awesome. I lived in Boston at the time and loved reporting potholes- they would usually fix them within a week and post a picture of the "after." Made it really fun to participate.
So the Shawshank Redemption method, eh?
I use www.freshfitnessfood.com to supply food for me, preparing your own meals is for losers! A guy creeps up to my house every morning and drops off delicious and healthy breakfast/lunch/dinner (not a paid advertiser i promise, ha!)
I go to a crossfit gym where you have to "check in" for a spot in your desired class using their app. Sometimes these spots fill up fairly quickly so I automated that. I'm also in the process of making a web interface for my script so all my friends can use it and we are able to attend the same classes.
Laundry. Just put your dirty clothes into a plastic bag and take them to dry cleaners. Pick up washed and ironed the next day. A huge time savings well worth the cost of service. Also no need to own washing machine, dryer, ironing board etc.

EDIT: Now that I think about it, this was a bad example of automation. Please don’t downvote me!

This is the norm in NYC if you have a job and no washing machine. However, our wash and fold did screw up my clothes more often than I find acceptable.
Find a new wash. I also had this issue but then I switched to another one just around the corner and never had issue with them.
I just moved to a place with laundry. I prefer it to sending it out actually, but anything is better than going to the laundromat.
thats outsourcing, not automating
Well to me it’s automated as I don’t have to do it manually. I see your point, it’s still done by a human but from my point of view it has been automated.
Well now you need to automate dropoff and pickup as well as payment.
I feel like you're dehumanizing the people actually doing the work for you.
That was not my intention. Perhaps there is a language barrier as English is my second (or third) language.

To automate something to me means getting the same result without me manually having to do it.

Like hiring a professional to translate a document for me. I’d call that automation but I know now that’s incorrect.

> Perhaps there is a language barrier as English is my second (or third) language.

Ah, that's understandable then.

As someone else said in another comment, passing the work off to another human is usually referred to as "outsourcing". Automation typically refers to passing the work off to a robot or computer.

In that case, I've also automated flying my own commercial airliner. I just pay someone $400 and I'm automatically flown anywhere in the continental US! Also, I automated bread baking. I just go to the supermarket and go to the bread aisle, and hey presto! Automatic bread.
I see your point. Now that I think about it laundry was a bad example of automation.

But to me it feels like automation as I used to do it all myself manually. The amount of time I saved still surprises me. Especially ironing.

Well, I agree that it's convenient. I do this for my work shirts and wash everything else because I'm cheap. But not automation, unless you consider Roman eunuchs to be automated child care.
I empathize with that feeling! I recently "automated" washing dishes by upgrading to an apartment with a dishwasher, and it's an amazing quality of life improvement!
You can take that one step further an order food every day. Or go eat out. Then you don’t need kitchen and dishes.
To be fair I’d imagine that bread making is quite automated these days. There’s a lot of machinery involved and much less people than few decades ago.
It IS a useful exercise to rope that in as automation. Just because a human is playing the part of the levers and pullies or some black box doesn't mean the underlying control system isn't interesting or worth examining in the context of automation.
The word "automatic" literally means without human intervention. It's antonym is "manual," which literally refers to hands. Yes, your subjective experience of having a servant or whatever is similar to the subjective experience you have with automation. But that's pretty close to magical thinking. Outsourced and automated just aren't the same thing. Especially if you're the human stuck making the widget.
I have a cron job which scrapes a bunch of pages and sends me the results to a telegram chat. That includes checking fb messages (because I'm never gonna install the fb app or messenger on my phone), checking for upcoming public holidays, checking when bitcoin goes above/below preset thresholds.
* Liking posts on facebook * Scraping friends that have unfriend/blocked/added me * Scraping messaging history because APIs don't support it * Aggregating location data * Running tests for projects * Finding code blocks that are too long * Downloading personal data * Logging in to every site I have an account with
I used a raspberry pi to control my TV using HDMI-CEC and exposed a subset of the controls through a web API allowing me to turn on/off my TV from my phone or voice controlled from a google home.

I did this because a chromecast will turn on my TV and set it to the correct input, but it wouldn't turn off the TV. Turning the TV off was the only reason I needed to touch my remote control at all. But just recently google added the turning off functionality to chromecasts... so I guess my little project fade away.

> But just recently google added the turning off

Thanks for posting this. I was thinking about attaching an IR blaster to a Raspberry Pi to do the same thing.

No problem. ive been thinking of doing the ir blaster recently as well. Id like to be able to change the input on my audio receiver without using the remote.
Side note: what TV do you have? I've found that most Samsungs and many other TVs don't respond to the HDMI-CEC off signal. Was quite disappointed.
You should be able to enable the off signal within the Anynet settings, but then for it to stick you also have to disable auto updates.
Hey, I have a Sony. it supports being turned on and to the correct input by a Chromecast using HDMI-CEC. I think, like the other guy said, there may be a setting to enable it on your Samsung. I know someone with a Samsung that it works for (the turning on works for sure, not sure about the changing input and turning off). It may be called something different in your tv settings though... I'm sure you can google it. Good luck!
I was going to build a "smart-home" style personal solution using my chromecast, but it turns out building a chromecast app requires a $5 registration. Not a lot of money but it was just enough friction to trigger my laziness and I moved on to other things
Hi, I'm a co-founder of https://snips.ai, we are building a 100% on-device Voice AI platform

If you want to use your Raspberry Pi with voice control without relying on Google, you can use the platform for free! We will open-source the code over time

Automated almost all my bill payments to use my rewards card. I set up alerts on my online banking site so I get texted when each one clears. Saves me a couple hours of grumpy time each month, plus I get a substantial 1% cash back that ends up being about $200/year. Also, you can dispute charges on a credit card if they get it wrong. Can't do that with bill payment service.
How did you automate this? Did you use some sort of API or just set it up through the bank's website?
also curious how
No coding. I'm just one of the lucky people who has almost all forward-thinking billers who support auto-pay with a credit card. There's one exception that only allows using a bank account for auto-pay, so I pay that manually through my bank's bill pay service. I've stopped giving out my 20+ year old bank account number to any service provider, because it's no fun to close an account for fraud.

The text message alert is set up on the online banking site - I set it up to send a text message whenever there's a debit >$1. There are a few banks (Chase is one) that even offer real-time alerts where you get texted as soon as the transaction happens, but most will send the alerts at some time of the day. It's a shame that more banks don't implement and advertise that feature to prevent fraud. To me it's comforting to get a text as soon as the card gets swiped.

I've found that some bills (mostly rent -- I still rent) charge a percent fee for paying with credit cards.
My landlord charges a flat fee for just using their online portal and my checking account. There's another 3% fee for using a card.
That's barbaric! But I guess it's understandable. Credit card companies and ISPs charge your landlord for providing their services, so he passes on the convenience costs to you rather than the people who have more time than money, and can shove an envelope fill of cash under his door.
My gas company and electric company are subsidiaries of the same company, and they use identical (read: equally terrible) websites with the same payment gateway. One of them lets me use a credit card and the other makes me pay from a bank account. ¯\_(ツ)_/¯
Citi Double Cash will give you 2% cash back.
An alias into my terminal emulator gives me weather, scrapes some news feeds, collects my public IP address, updates a couple of things, and adds stuff like the IP address, along with date and time, to a text file.

Silly things like that.

It no longer gives me a random quote using cowsay. I figured I was too old for that and it was time for me to grow up.

Buying a Roomba has been the greatest upgrade to my household in years!
I have a number of old bookmarks on pinboard that I realized I never visit after I bookmarked it. Some of them I would like to clean up. So I have a heroku job that emails me a random half-dozen bookmarks every morning. I can visit them, and if I don't care about it anymore, delete the bookmark.
I wrote a bash script to generate a directory structure and some stub files for each semester.

I use feh for my desktop background. I have a directory ~/.wallpapers where I keep symlinks of all the images randomly selected by a cron job to use for my wallpaper. (they can come from various directories) Anyway, whenever I download an image from the internet, I put it in it's relevant directory. And if I think it will also make a good wallpaper, then I prefix the filename with "add_" I have written a python script to search for all image files starting with "add_", and it then renames the file without the prefix, and adds a symlink to the ~/.wallpapers directory

I used to have a bash script on my old laptop that would send an email everyday to a certain government organization, telling them they were assholes.

Probably a few other similarly small things that I have forgotten about, because I automated them.

I have a USB stick 4G modem and I automated the connection setup; it has a web app (starts a small embedded webserver when you plug it in) which I "reverse engineered" and I wrote a small script which makes HTTP requests so I don't need to go to the web interface, login, enter PIN code and click connect every single day multiple times. I just run "telekom connect" and that's it. What a time saver! :D
That's one thing I love about Vimperator: its macro system. If you can do the steps using the keyboard, you can just start recording and do it once. Next time a simple key combo will repeat your steps.

I've automated logging in to public Wifi networks and filling in many forms with it.

but you still need to open the url in the browser right? which is way slower
I always have my browser open; loading the URL in a new tab (and closing it after) is done by the macro too. So not really :)

I guess it could be slower if the site has many large resources (CSS, images, etc) that a script would not download. But since I do it regularly, most of it is cached anyway.

I automated downloading and reconciling my financials from all my bank accounts.

https://disjoint.ca/projects/ledger-reconciler

This is great, would love to see support for more data sources.
Thanks! Unfortunately I can only add support for things I have access to (bank accounts and such) and I do plan on adding a few more.

To work around this I tried to make it as developer-friendly as I could so we'll see!

Holy cow, I've been looking for this but for the US. Anybody know of any?
If you're up for it, you can add your own bank/creditcard company/whatever as a plugin to it - I think the examples there are decent. I could also help if need be!
Haha thanks! The problem is in the US most banks would need screen-scraping; they don't have APIs, so it's a lot more work to do such a thing.
ledger-reconciler uses headless chrome underneath to screen-scrape all its information from banking/creditcard websites. That's how all the plugins hook into it.

It does not use any public or private banking APIs.

Hope that helps!

Oh dang I didn't know! I'll check it out at some point then, thanks! :)
Many actually do have APIs, they're just poorly documented in public.
Many US banks support OFX (though they may call it QFX, DirectConnect, or simply advertise Quicken support). The OFX spec is a bit of a pain, but there are a number of open-source libraries to query/parse it. I wrote one in Go: https://github.com/aclindsa/ofxgo
Transaction pull can be done in GNUCash with aqbanking. It's not fully automated, as it's a GUI and there's a manual review step. And also the aqbanking interface is terribad.
This might be helpful, though I haven't looked at it in a very long time: https://github.com/madhat2r/plaid2text

Essentially it is some python to download transactions using the plaid API (and requires an account to do so).

On a related note, I have gnucash set up to autocreate a ton of transactions 90 days in advance. Rent, salary, typical bills, student loan repayment, etc.

At some point my plan is to automate the following tasks:

1. Sweep checking into savings based on forecasted transactions. Useful since interest is like 10x more in savings. 2. Update asset values daily. 3. Update autocreated transactions as the invoices are emailed to me. 4. Calculate a rebalancing strategy that factors in allowed rollovers and expense ratios.

> On a related note, I have gnucash set up to autocreate a ton of transactions 90 days in advance. Rent, salary, typical bills, student loan repayment, etc.

Why do you need to do the transactions? In Germany, I can simply create a recurring transaction for rent and loan repayment, and utility/phone bills are directly debited from my bank account.

You misunderstand. They're already scheduled largely. This is about writing down in the books in January that I'm going to spend in March. GNUCash's summary view has a column 'future minimum' for each account that uses this data; looking at it informs you when you might go negative without corrective action. Or conversely, tells you how much money you can safely shift out of checking.
Perhaps something you've already considered, but if you're going to spend time on automation of sweeping extra out of checking, you might want to put that into some index funds rather than a savings account to optimize on return.
I've been working on my own classifier for updating my ledger because I struggled too much trying to get other people's stuff to work. I'm getting about ~90% accuracy using a SVM from scikit-learn, but it can only ever be semi-automated. My plan is that every month I'll go through my various accounts and help to update my ledger. One thing that I don't think other software does is automatically remove the duplication when transferring between bank accounts/credit cards.

How does yours deal with transfers between accounts?

I really want a nice auto-completing thing to type in the account names when the classifier gets them wrong (or to add a new account if necessary). The best UI for this is ido or ivy in emacs. But it would be nice to have a tool that runs outside emacs. The best I've found is fzf but it doesn't support tab completion which is a shame.

I handle transfers between accounts manually - as in when I see duplicates show up, I remove one of them. A neat thing that ledger-reconciler does is to print the balance (as listed on the banking website) for each account. That information combined with Ledger's balance report tells me immediately whether something is off and if investigation is needed.

This in itself has saved me so much time that I can deal with manually editing the occassional duplicate entry (internal account transfers). I also keep all my ledger data in git so it's very easy to see what has changed, etc.

Have you looked at the reckon gem[0] for auto-classification? That is basically what this program uses.

[0]: https://github.com/cantino/reckon

I tried reckon amongst other things but couldn't get it to read my CSV files properly. I got frustrated enough that I thought writing my own would be easier.

Putting the account balances in the ledger file is certainly a good idea. At least one of my bank CSVs provides the balances with each transaction. It doesn't seem too hard to automatically merge the transfers between accounts, though. But maybe there is a difficult I haven't thought of yet.

Where there will definitely need some manual tweaking is on the those transactions where ledger really shines: many to many transactions. Have you built in some functional to flag a transaction as TODO when you know it will need manual tweaking later?

In college everyone's class registration would open at once, and classes would fill up quickly. Some people would even register for more than they were gonna take, to hold it for friends or just to figure their schedule out. If I didn't get into a class I wanted, I had a HTTPS script set to attempt registering for it every 5 minutes. As soon as somebody dropped it - boom it was mine.
I did something super similar: In order to graduate on time I had to take an accelerated Spanish course (hard requirement despite years of Spanish in grade school and high school). Problem: The class had a pre-requisite that I hadn't taken yet. Solution: The Uni's registration system allowed for a 4 digit numeric code to be entered to bypass registration restrictions. I wrote a script to brute force that code, registered successfully and graduated on time. Muy bueno! :)

Edit: spelling

For classes that I needed/wanted to take which had prereqs I tried to show up on the first day of class and get an override signed by the teacher at the end of class. It usually worked. For example in a low-level music theory class I showed up and answered questions during the class (I think I correctly wrote out a d-flat major scale on the board). That was enough to prove to the teacher that I'd be okay in the class.
We had a similar system. The problem wasn't in the classes filling up (though that happened too) but that the system was built for steady-state load and not peak load: if you weren't in and out within 10 seconds of registration starting, you were in for minutes of panic as the registration pages failed to load again and again while the classes you wanted were filled by those luckier than you.

Instead I made an autohotkey script to input my chosen course IDs and submit. Just pasting in a value, <TAB>, pasting in a value, <TAB>, etc.

All done in less time than even the savvy registrants who would copy/paste as fast as they could. An earlier iteration used a programmable keyboard macro: AHK wasn't on the lab computers for my first year.

I wrote a script to log in to my brokerage account nightly and check for new purchases or dividend payments, log all of that to a database, and provide an interface allowing me to see all kinds of statistical information about my investments. I love getting the cron email in the morning saying I got a dividend payment from a stock :)
Cool script. Do you have it on github ?