Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: What do you automate in your life and work?
244 points by gcj on Oct 28, 2019 | hide | past | favorite | 192 comments
Just curious about scripts and things you guys have automated

Lots of home automation fun with Home Assistant (https://www.home-assistant.io)

* Self-hosted security system that e-mails me when triggered. It arms when everyone disconnects from the wifi and disarms when anyone in the home reconnects to wifi. Totally passive. Also arms at night when the kitchen lights have been out for 5 minutes after a certain time and disarms when motion patterns that can only be someone waking up are sensed.

* E-mails work and personal when smoke alarm goes off or when water is detected in basement

* E-mails pic from front door camera when doorbell pressed (yeah, like Ring, but with a ESP8266 monitoring my normal doorbell)

* Voice reminder on garbage day

* Northern loon call exactly at each sunset

* Ambient jungle noises and lights on when I wake up and it sees me

* Laundry timer + reminders

* Vacation mode random lights on/off

* Plays a Ship's bell chime on the hour, but only during daytime (ambiance)

* Tones when any outside door in the house opens. Optionally: random Seinfeld bass transitions

* Alert for power outage

* Alert if my mom's house temperature goes too low in winter when she's away (I've called the plumber to fix the furnace thanks to this)

* Turn on A/C if temperature above threshold at 4:00pm in anticipation of my return from work

Stuff like that. Loads of fun. Lots of fiddling.

> Tones when any outside door in the house opens. Optionally: random Seinfeld bass transitions

Dear Lord yes, that is FUN! I'd love to see 'walk up music' like in MLB, but for anyone and changing randomly from time to time.

I like the your ambient noise approach. What are you using for sounds do you have your config online?

I am looking to make my house more reactive as well. One area where HA has been a godsend was integration with TV/Music/idle off. Whereas there wasn't one solution which would shut off the TV and stereo in my set up once they were in Harmony Hub I could add idle timeouts for them in HA.

Another was theater lighting when the TV starts. In the theme of ambience I am looking at switching the lights to something more colorful when paused.

Sounds great. So do you need one raspberry pi per automation ? Or are you somehow linking all these diverse processes with one raspberry pi ?

One raspberry pi for all! The devices are connected via zwave wireless with a USB stick zwave controller. Actually I moved the main server from a pi to my home server a while ago but it was all working fine on a pi 3.

Could you recommend some resources to get skilled with such suff? Also what tech stack you are using? (both hardware and software)


* Raspberry Pi (I've since moved to a Ubuntu server, but Pi was perfectly capable on this entire setup)

* Aeotech Z-wave z-stick (for controlling the wireless sensors)

* Lots of z-wave sensors (door, motion, temperature, humidity, flood, one that listens for my smoke alarms going off, a whole house power sensor in the circuit breaker box, ...)

* Lots of z-wave switches (some where I replaced light switches with smart switches, others where I just piggied a z-wave relay between the wall and the thing)

* A few Phillips HUE lights for fun color BS

* an old 433 MHz temperature sensor that the previous tenant left without the weather station (read through a $5 USB TV receiver)

* Another Raspberry pi sitting on my stereo hooked to Snapcast to pipe synchronized wifi audio throughout the house from a single source.

* Mopidy as the central music server to pipe stuff through Snapcast

* OpenWRT router running some scripts for presence detection

* Cellphones via web interface for control

* Also a fun little LED dot-matrix display for fun displays

* A few Amcrest IP cameras (with cloud crap disabled)

Software is very Home Assistant heavy, with lots of little auxiliary scripts, some home-built, many others from other enthusiasts. The central community is the Home Assistant crew. But also:

* MQTT on a remote MQTT broker ($5 VPS) for communicating with external devices (like my mom's house and my cellphone when off-site)

* Owntracks for GPS-driven automations

* Self-hosted e-mail (totally unnecessary, just a hobby)

I think that's about it.

For getting started, yeah just start small. Get a z-wave usb stick and a pi and a few little sensors. Hook it up to your stereo and wifi and start fiddling based on the examples from home-assistants forum and docs. Then it just slowly bootstraps up to something elaborate, if you're enjoying it.

Care to elaborate on the loon call!

Northern Loons make this eerie call that happens a lot in my childhood hometown. I set up am automation that plays a recording of one over the stereo at sunset. It's fun, and helpse keep track of the changing time of sunset.

The "Wail" recording here, in particular: https://www.syracuse.com/indepth/2008/07/audio_hear_the_call...

Interesting, although I don't have the amount of time required to do these things.

It's definieltely a hobby thing. I have time for it because I choose to set aside other stuff for it.

Once it was all set up it just runs itself with little tweaks and additions one a month.

Wow that is really impressive. Home assistant is something I’ve been meaning to get in to for a while, but the amount of time it seems like it would take to set all that up and maintain it seems daunting. Sounds fun though!

The nice thing is, you can start small. Thats how everyone does it really, just add one thing at a time, most of which is fairly simple. Just some hue motion sensors and lights can make for some nice automations.

I used Home Assistant to graph my pool temp, and control my pump so that I made most use out of our solar heaters.

Can you elaborate on the doorbell? Also where do you host your Home Assistant setup?

I hosted Home Assistant on a Pi2+ at first, and then Pi3 for a long time. Eventually I wanted to use the Pi3 for something slightly different and had a low-powered home server at that point so I migrated to that. It's basically just running on a Ubuntu box that I use for NAS and workstation stuff now.

As for Doorbell, it's pretty much like this: https://partofthething.com/thoughts/making-my-analog-doorbel...

Do you have a power adapter for the doorbell monitoring ESP?

It is powered from the same circuit that powers the doorbell chime coils.

> Ambient jungle noises

I like this.

Example 1 (custom hardware).

My wife and I run https://littlebird.com.au and ship 25K orders per year. We found that it was taking too long to fulfil each order using Australia Post.

So I built our own custom WebUSB postage scales and label printer. Creating a consignment is now 1-click.

This enabled us to take the fulfillment process down from 5 minutes to 5 seconds. Across 25K parcels this equals 11-months of work time.

Being a WebUSB based solution, they "just work" with anything running the Blink rendering engine, even Android phones.

You can see the WebUSB Scales and Label Printer in action here:

(30 sec video) https://vimeo.com/334547755/c387957a25

Longer demo:


Shopify liked the demo and I got to demo it to their CEO and various teams in Ottawa.

The minimum order quantities on the Postage Scale hardware was 100 units, so let me know if you'd like one :)

Example 2:

I've automated the lodgement of "Australia Post Inquiries" to get a refund when they miss their SLAs. The numbers add up quick over a year.

Damn, I attended one of your Raspberry Pi workshops in Mount Kuring-gai about 3 years ago.

Unless I'm completely mistaken, who knows.

Awesome, thanks for coming! We're now in Hornsby (needed a bigger factory/warehouse).

Excellent! Love the name - Checkout Chick :). Perfectly suits the little bird brand as well!

Cheers! We were thinking of a rename because only Australians/NZers know what a "Checkout Chick" is. :-)

Very cool.

I like the auto-lodgement, wonder if anyone's made an auto-lodgement for when Metro misses their monthly train SLAs :D

Haha, Australia Post didn’t! On the day we ran the script for the first time we were 90% of their tickets.

Auspost normally give you the option of a free prepaid satchel or a credit.

Their head of customer service ended up giving me a call asking (paraphrasing): “can we just give you credits instead replying back on each ticket”.

My typing. In my work I tend to type a lot of the same things over and over again. So I automate that with AutoHotKey. Ctrl+Tab becomes RightAlt. Two words become entire paragraphs. Even simple things like "You're welcome" are just 'ywyw' or 'tyvm' becomes "Thank you very much". I know it sounds silly, but while trying to avoid RSI's, the less typing the better.

I also use autohotkey to help me remember to Linux commands that I don't remember of are awkward to type. Like 'awk1' becomes "awk '{print $1 }'" and then I can modify it as needed.

This has worked extremely well for me for many years. Ymmv.

I wonder if it would be possible to build an app that's effectively a self-installed keylogger given access to your entire stream of writing, and after a few days, it starts to recommend candidate strings for automation with Autohotkey.

This was the idea behind the Blackberry Android keyboard.

Source: Was there, wrote code for it.

sounds like code that could be useful to this day at least the concepts. That's the downside of closed source. It's gone now.

I think it could. It could log words for a certain amount of time, give a list of recommendations, and export it as a AutoHotkey file.

It would be a neat project at the very least.

My Samsung keyboard on my S6 does this.

Autohotkey doesn’t get enough attention. Great software.

Are you using wsl because AutoHotkey doesn't work on Linux...

Back when I was on Windows I used to have ctrl-c, ctrl-v mapped to F1 and F2 keys (using AHK). Why they don't have dedicated keys I don't know

I'm on Windows 10. When I'm using it in Linux, it's via SSH through Mobaxterm, which is a fantastic and free Windows shell manager.

are you using it for remotely accessing linux boxes? mintty+wsl-bridge aka wsltty has really come a long way in a short time, and i'm beginning to use it even for remote work alongside using it for wsl. call me shallow but it really boils down to it looking far, far better when staring at a vim buffer for hours...

i absolutely love mobaxterm, but there's alot of cases where it seems like overkill for my purposes. that being said, nothing beats mobax when it comes to a stupid easy X server for windows. vcxserv and x410 are both nice and getting nicer, but you gotta sit down and work out kinks to make either one really useful

Yup, logging into web servers at work. I haven't messed with WSL much except for having a local Linux environment for local work. I have a home server for anything more serious than that such as hard drive recoveries and the like. I discovered Mobaxterm some years back and have stuck with it. It really is nice. While it may be overkill, I've had to do things like open up RDP on multiple boxes and wow... it Just Works. It's a hidden gem.

mobaxterm helped me get serious about security when i ran the ssh server once and used the easy menu options to view who was knocking on my doors, and... man. people think the robocallers are persistent...

i did a little screenshot ( https://i.imgur.com/HndJDqg.png ) to demonstrate how far WSL has come - though i must admit i am using the paid ($10) 'pengwin/wlinux' distro that was built specifically for WSL, basically debian with some tweaks and a config menu not unlike the 'raspi-config' menu on an RPi. i would say that it has absolutely been worth it though. it will be some time before being able to install something from a debian repository, and then open it from my windows start menu, ceases to just leave me in awe.

Awesome :)

I do the same on my android with app Textpander (no affili, just a happy user). I also listed my shortcut phrases at https://dav.today/my-text-shortcut-phrases/

You are welcome is yawc Ty is Thank You

I have a folder on my mail server called “Dead”. If I move an email to that folder then all subsequent emails to the same address as the first one go into “Dead/Match”. It’s driven by procmail and a script.

When used with one-off email addresses you get a behavior that’s like unsubscribing, but without having to trust any “unsubscribe” links or processes, and also without having to edit any config files (it’s all driven from iOS Mail.)

1/ book your hotel using the email address $RANDOM@yourdomain

2/ receive booking conformation and enjoy holiday

3/ when you eventually get marketing spam, file it in Dead and never be bothered again.

Interesting ... that is superior to my own method, which is to simply add the From: address to my blacklist file:

  * ? formail -x"From" -x"From:" -x"Sender:" \
  -x"Reply-To:" -x"Return-Path:" -x"To:" \
  | egrep -is -f /usr/home/john/.blacklist.txt

Would you mind sharing the code you're using for that?

I've been half tempted to build an email client just to have similar functionality to that.

Until you book again at that hotel chain or third party agent like Priceline and never receive another email again right? I like the premise but the details seem like they would cause more trouble than the solution solves.

Same thing happened with me twice.

Long time ago I setup workflowy.com to send me emails of daily changes; gmail filter to mark as read, apply label, archive & forward to Trello board. So twice I forgot the password, asked password reset link; & it is not coming to my inbox; because that filter was auto reading & archiving it.

This would be true, but in practice I sign up with a brand new email address each time.

I am certainly missing out on loyalty / reward points, but I don’t travel often enough for it to matter.

This might sound a little-bit stupid, but I automate locking/unlocking internet access on my phone and computer.

That is to say, every night my computers and phone will lock me out[0] at a set time. Then in the morning I have to log 30 minutes of exercise (tracked by my heartrate on fitbit) to unlock internet access.

I also have certain time-wasting sites like Reddit and Netflix locked out until I complete a sufficiently difficult problem on leetcode, projecteuler, or wechall


I was just finding it hard to keep myself going to bed at a decent hour when I have no constraints like a 9-5 job and to keep an exercise routine going. So this automation has helped me.

[0] My computers are basically totally locked, my phone keeps the phone, messaging, camera, and skype accessible

What do you use to lock/unlock your gadgets?

Kaspersky Safe Kids. I chose it after experimenting with a bunch of options, it was the only one that wasn't trivial to bypass on my phone.

Basic setup is that I wrote a script (against Kaspersky ToS) that can login and change the lock/unlock schedule and enable/disable website/application restrictions.

So it unlocks after I tell it to check Fitbits API, and disables restrictions after I tell it to check one of the challenge websites. Locking happens on at a configured time each night.

Interesting. Might be useful to me as well. What software(s) do you use for this?

Its really just two components

- Kaspersky Safe Kids - Does the actual locking/restrictions

- Custom Python Script - Communicates with Fitbit/leetcode/projecteuler/wechall and can update a the restrictions on the Kaspersky website.

Shopping for groceries. I made a website which lets my wife and I pick recipes and any "one off" items we need for the week. The code figures out which ingredients it should buy (preferring organic / sale items) and then calls the "APIs" of our local grocery store's website to make the purchase. We then just have to pick up the pre-packed groceries on our way home from work.

It costs $5 for the packing service, but it's worth it to avoid the burden of shopping. No more tedious math on which is the better deal. No getting lost trying to find avocado oil. And no lines. I wish I had done this years ago.

What grocery store APIs are you using?

I've been thinking about doing the same thing, but I want to automate it in such as a way that it knows what food is still unused in the house. Haven't found a solution for that yet, but maybe with smart fridges and/or image recognition we're not far off. Unless the hn crowd knows an existing solution.

You could try scanning the UPC codes and saving those in a database. I guess then you would have to scan them again to remove them which could be tedious. Maybe that idea will spark some inspiration though.

I was trying to do the same (grocery for the office) but the store changed their "API" so there's hardly any way to interact with their catalog anymore.

Also how do you deal with the membership and payment process?

This is downright brilliant!

I went through a phase of trying to automate _all_ aspects of my life. If I did a task more than 3 times, and it could be automated, I went ahead and wrote some scripts for that.

Anyone will quickly learn there is a trade-off between managing the time it takes to maintain automation and the time you would spend just "doing" said task.

After this realization, I started manually performing tasks, timing them, and storing them in a glorified spreadsheet. Any time automation broke, I timed how long it took to fix, and also put it in the spreadsheet.

I deprecated all automation tasks that did not save me either 10% or more time, or tasks that I found at least some enjoyment in (such as messaging my wife when I would be home, reading my child's school reports regardless of their result).

I have over 140 automation scripts in tact. Some are software-only (interacting with APIs, emails, SMS, scraping) and some have associated hardware (sensors attached, etc).

I have become obsessed with data being generated by this automation, so I now log all events and meta information where possible. This gives me pretty good insight on where pointless items exist in my life (which allows me to just stop doing them, automated or manually) and where important parts also exist.

Would you mind sharing which automated tasks offered the highest ROI, and some information about how you run them all (i.e., do you use cloud services, or an always on RPi that you run the scripts on)? Also, which libraries have you used for scraping?

To be honest, given the description, who would not be interested with that description on the top list?

Not author but I found scrapping super easy with jsdom in node.

Help me understand the rationale behind the original automation effort on reading your child's school reports? I would have thought that is an event that is pretty infrequent, quite important, with not enough historical data to train a useful model.

Could you share how you are able to scrape emails in particular?

There are plenty of other ways to do this, but...

I have a CC specifically for reoccurring bills. It’s automatically paid off every month and just by looking at that one debit it’s easy to notice if something odd happens and then track down what changed. Plus by adding it all together I tend to trim what services I keep paying for.

Your bank has an API for that?

You don't need an API. Most bills can be put on a CC. Most banks have automatic bill pay. Having all the recurring bills on one CC is the life hack b/c it's very easy to see in the total each month if something requires investigation.

I use cron to send myself birthday reminder emails:

  0 0 9 11 *      /usr/bin/mail -s "REMINDER: Nov 9 is Marks birthday" me@mydomain.com
Or just annual reminders or warnings I want to heed:

  0 0 1 8 *       /usr/bin/mail -s "REMINDER: MAKE christmas St. Francis reservations NOW for good pricing..." me@mydomain.com
Sometimes, instead of /usr/bin/mail, I use 'smsme' which is a small script that interfaces with twilio:

  /usr/local/bin/curl -X POST -d "Body=$msg" -d "From=$from" -d "To=$to" "https://api.twilio.com/2010-04-01/Accounts/$accountsid/Messages" -u "$accountsid:$authtoken"
(that's not the entire script, but you get the idea)

What’s wrong with reminder apps that are default with all smart phones?

I've been building this crontab since 1996.

How many phones have you gone through since 1996 ?

Emails are easier to deal with as task items, and he probably wrote this before smart phones were a thing.

Also reminder apps for smart phones suck, just read some internet reviews, e.g. first half of https://www.ipitaka.com/blogs/news/does-your-calendar-remind....

Notifications/interruptions don't tend to be at a good time and get swiped away, if you get an email you can check it at an actionable time, assuming you disable email interuptions.

It's easy to keep in git along with other configs so it survives phone refreshes without relying on third parties who are probably snooping on that data.

What's wrong is that it's not default, in Android at least:


Phone apps and phones themselves are temporary, not suitable for this timescale of things.

I automate most things I do more than a dozen times.

Marketing for my wife's uncle was a pain, so we automated CL and FB posts to fire from Quickbooks Inventory on a schedule.

I'm full-time remote, so I have a spreadsheet that tracks my expenses from a google form, does currency conversions for my location and forex analysis to tell me the best day to pull money from an ATM, tells me how much I have to spend on food each morning...

There's a script I send quotes I like to, and it randomly sends me one from the list via Telegram every day at 6am.

I'm also a swing-trader who hates staring at charts, so my watchlist generates via news and sentiment, then I run TA on that watchlist to send me alerts if a signal is generated, then all I have to do is hit buy/sell on my inline keyboard and it sends off a market order; it auto-exits after a target or stop loss is hit.

Recently formed an agency with a few other automation devs who do similar stuff if you want to check it out: https://weautomatestuff.com

> Recently formed an agency with a few other automation devs who do similar stuff if you want to check it out: https://weautomatestuff.com

Would love to hear more about the business side of this, because this sounds like the ideal side project for natural born tinkerers!

It may be too soon in the project's lifetime for any insights, but if there's any wisdom nugget you can share it would be really nice :)

I would love to hear more about your trading scripts and your TA assessment. Which API do you use?

I write custom scripts for strategies, pulling data from places like Alpaca, IB, CCXT; charting using bokeh, plotly, mpl and other repos; zipline for backtesting... It really depends on the need; and the speed.

Back when Tinder's API was more open, I had a Python script that would autoswipe everyone in the match queue. Then I'd go through all my matches, manually filter the ones I didn't like, and message the ones I did.

It was highly efficient, increased my conversation rate, but didn't really impact my end metrics ;)

There was a hilarious article a few years back about someone who automated every part of the dating process, including the actual dating using a bot on a segway and automatically ordering sex toys. Anyone know what I'm talking about?

Link below. It was written by Rob Rhinehart, the founder of Soylent:


You can pay for Tinder Gold and Boosts, which effectively does the same thing but for money

I live in a condo complex with a dog and no lawn. We learned after getting our dog that this place doesn’t want dogs going to the bathroom on any of the common area (makes sense but annoying to dog owners). We used to get a small patch of grass delivered every week but it was a hassle to swap each time. Also it was disgusting by the end of the week. Then I discovered porch potty. Got the version that is hooked up with a sprinkler system and a drain. Set up an auto timer so it gets completely flushed every night. Saves us a bunch of money and time. Highly recommend. https://www.porchpotty.com/

> We used to get a small patch of grass delivered every week

haha, WHAT??

Sod-as-a-Service (SaaS)

I know it’s crazy. https://doggielawn.com/ Wasn’t cheap either

Could make some song lyrics out of that, am I right, Ol’ Wheeler?

Have an ultrasonic sensor on top of my monitor that's used as a presence sensor to tell the computer when I’m in front of it or not.

Pauses the music player when I walk away and starts again when I return.

More details here: https://www.michevan.id.au/posts/are-you-there/

I've used Automate App (https://play.google.com/store/apps/details?id=com.llamalab.a...) to set my android phone to silent mode in office and loud at home based on the wifi ssid.

For those on iOS, built-in Shortcuts app can do this as well.

That Google/Android tracks everywhere I go, sends me an email at the end of the month about it, and still can't silent/remind when I get into proximity of a location bugs the shit out of me.

That tracking that's so profitable for them is an afterthought when it comes to my own convenience.

I mean, Google Assistant absolutely supports location reminders. Just ask "remind me <x> when I get to work" and it'll... mostly work. Sometimes it's a bit late, but it mostly works. For silent, I think that'd be more of a Tasker/Automate thing, like OP.

Makes sense I missed it then, I hate using the assistant. It feels like asking someone else to scratch my nose.

Oh! I did not know that Google Assistant can do that. Thanks a lot. Will try it for sure. #TIL

I’ll checkout automate.. have used Tasker in the past.

Nothing fancy or involved at all, but in my personal finance spreadsheet, I dynamically pull in Zillow's current estimate of my home value (which I take with a grain of salt obviously).

I also use IFTTT to pause my robovac if my doorbell rings.

Right now I'm working on a Mint scraper to automate the rest of my personal finance data entry, but running into headaches getting Selenium to work properly on Catalina.

Do you need to scrape Mint when it's just using Plaid?

My understanding from Plaid's somewhat confusing docs is that the Free tier gives transaction and balance data from cash accounts, but I need it from all of my asset accounts, which you seem to need to be on the $500/mo plan for. Since this is just for personal use, I can't really justify that.

All I care about is monthly account balances and month ending amounts for historic months for ALL accounts (cash, assets, debt) and then the net worth and net income monthly stats.

If I understand Plaid's pricing correctly, it's $500/mo to get what I want but I could be misunderstanding their docs. Would love to be told I'm wrong!

I think you're wrong (yay!) about plaid's pricing.

My startup uses them, and we are very low volume, and we pay $1.50 for an auth and $0.30 / month for each active account we pull transactions from. Getting balance costs $0.10 / call though.

We signed up probably about 6 months ago.

Oh wow--is this the Pay as you Go plan? And is this the same whether the account is a checking account vs. an investment account (ie. Assets product)?

Also, while this gets me net worth through math, I'm not quite sure if it gets me my monthly expense totals in summary format. Is it all raw transaction data I'd have to pull and do math on? Or is it trivial to pull the equivalent of monthly Mint summaries for net income and such via Plaid?

I wish I could help, but it sounds like I misread in the other direction! I have not actually tried it out, it's on my list of todos. Good luck!

There appears to already be a mint scraper on github

Can you share a link? My understanding is the one I've found available pulls in transaction data. I actually don't care about transaction data at all. I explicitly just want monthly account balances (including what historic months closed at), and some of the net worth and net income summaries. Nothing I've found yet offers that.

Puppeteer is way better for scraping.

I just started a new scrapy project with:


best of all worlds

Can you share your thoughts on why?

Not exactly a script, but if I really think about it the largest thing I've automated in my life is investing--- via index funds. No picking individual stocks, no rebalancing (Vanguard and others have "target date" funds that rebalance automatically).

If I recall, target date funds have taken quite a bit of flack for their fee-adjusted performance compared to a minimalist simple 2 or 3 fund fund portfolio approach.

This is the smallest thing that will have the biggest impact on your life significantly decades from now. I like phrase "pay yourself first".

Don’t you just end up with a portfolio weighted with half below average stocks? Seems like you could beat this just by buying stuff you’ve heard of. I’m sitting her with my Apple phone, using Verizon internet, burning electricity from a publicly traded utility that probably won’t go broke next week, wearing my Nike shoes and drinking a Coke. That portfolio probably beats your index and requires zero brains or effort.

Every time you buy your stocks for those individual companies you're accruing fees. You're also extremely susceptible to sudden loss due to lack of diversity. And even if you had the time, energy and knowledge to pick what you think is the best half of the Russell 3000, you still wouldn't beat the index - https://www.fool.com/investing/2018/01/03/warren-buffett-jus...

The problem is there's no way for you to pick the winners and losers accurately. Most people who spend their whole career picking stocks actually don't beat the market indices. It's not as trivial a problem as you seem to think it is.

The problem isn't always knowing what to buy, but when to sell. For some who don't have the time of researching and rebalancing an index fund or ETF that does it for you is a good value prop.

Example where that strategy might run into problems - hindsight is 20/20: https://pbs.twimg.com/media/EH6la6VWoAIC0cM?format=jpg&name=...

Index funds don't try to time the market. Which ETFs are you thinking about? Hedge funds?

Over the past 5 years, Nike has gone up by 100%, coke by 20%, Verizon by 15%, and apple by ~125%. The s&p500 has gone up by ~50%.

So if you invested 100 in an index fund, you'd have 150, if you invested 100 split evenly in those 4 stocks, you'd have 165. Of course, if you invested in GE, you'd have lost money. And if you invested in Amazon alone, you'd have $500.

This analysis is flawed in two respects: 1. It neglects dividends. 2. The S&P 500 as presently constituted omits all the companies that were excluded during that time period (eg., went broke).

If you just buy good solid companies that pay dividends, you do ok.

> If you just buy good solid companies that pay dividends, you do ok.

What are the good, solid companies 10 years from now? 20 years? When should I dump my current good, solid companies?

Echoing this, the median amount of time a given S&P500 sits in the S&P500 is less than 20 years. This becomes a tricky problem.

> 1. It neglects dividends.

True, but if I replaced S&P500 with VTSMX (a Vanguard index fund, which got marginally higher than 50% returns over the same time period) would not.

> 2. The S&P 500 as presently constituted omits all the companies that were excluded during that time period (eg., went broke).

The current S&P 500 does, but watching the S&P500 index over time does not. And index funds generally rebalance to take these things into account.

As another user mentioned: knowing which companies are "good solid companies" is a trillion dollar industry. No simple strategy beats the market over the long term, other wise passive investors would all do it, and start beating the market.

It does not. If it was that simple, there wouldn't be an entire trillion dollar industry based on it.

I read a lot of articles by saving them to Pocket and reading via my ereader. I wrote a little PHP browser based application that interfaces with the Pocket and hn.algolia.com APIs that helps me to follow up on articles in related forums such as Hacker News and track my reading habits.

Naturally I called it Pocket Lint.

Hire a cleaner once every 10-11 days to clean my apartment and do the laundry. Its surprising how much time you have if you don’t have to do dishes.

How do you not do the dishes for 10+ days?

That said, my wife and I do the same thing. Plus have a Roomba. All told it means everything stays clean and we're only on the hook for laundry.

The cleaners probably all draw straws to see who has to go to the house with the 10 day old dishes in the sink.

My house is a mess after a week. How’d you come up with 10-11 days?

Thats when he finally runs out of dishes.

mine after a day, with a toddler around. And 10+ old days dishes smell as hell. No thanks, I do dishes as soon as I can, because hygiene first

What's the pricing like for something like this? Do you use a large service for this?

[Not really automation, but I'm hijacking the opportunity to tell the story.]

I'm a terrible morning person and I noticed that I need much longer to get up and dressed and everything than it reasonably should take. On the order of "taking 1 hour to do stuff that can be done in 15 minutes". I seem to have ADHD (disclaimer: not formally diagnosed, just going off of symptom lists and descriptions from other people), and that in combination with morning drowsiness seems to make me really ineffective at this point.

So I wrote down a list of all the things that I need to do in the morning, together with an upper estimate of how long this is going to take. Think something like this:

  { "tasks": [
    { "label": "Make the bed", "duration": "60s" },
    { "label": "Morning wash", "duration": "3m" },
    { "label": "Get dressed", "duration": "2m" },
I built an application for my desktop PC that just runs down this playbook and always shows the current task, together with a timer for the current task as well as the overall playbook, in comically large fonts to fill the screen:


  Current: 04:45/05:00
  Total: 16:45/59:30
There is no "Pause" button, only "Skip" for when a task is shorted than the alloted time. Also, the application can beep to signal "3-2-1-Over" at the end of each task, and each task can have a configurable beeping interval. The whole point of the system is to be breathing down my neck to stop me from procrastinating, and it works perfectly in that regard.

Since starting with this tool a few weeks ago, my morning routine has gotten a bit shorter, but I also get more stuff done at the same time. I have a slot for meditation, so I'm now doing that semi-regularly in the morning. (I still skip it too often. Maybe I should make that task unskippable.) I have a slot for preparing a packed lunch, so I don't have to eat out as much and save some money in the process. With the time saved, I've switched my commute from tram to walking. I'm still tweaking the playbook here and there, but it already feels great to arrive at work in the morning knowing that I've already done several positive things for my well-being, rather than the bare minimum as it used to be.

I need this in my life. Is the source code public somewhere, or can you make it public?

I haven't gotten around to polishing the repo enough to make it public. If you follow me on GitHub, you should see it once I publish it. The name of the app is Monastery, so it's going to be https://github.com/majewsky/monastery.

I use a 20 line Python script to convert Outlook .ics calendars into billable hour count. It looks for a company name (the client) and calculates start and end time. All it needs now is to fill a .pdf invoice template and I can get rid of HR :D

Shameless plug: I’m working on FormAPI [1], which can help you set up the PDF invoice template. We provide a Python client library, so you can add that to your script with a few lines of code.

[1] https://FormAPI.io

Use DocAssemble... it has an API and can fill PDF templates.

I have a website that tells me when the next train leaves and if I need an umbrella: http://mazu.ai/

Probably a good idea for a startup actually, a 90s style "web portal" for urban commuters that tells you the weather, transit situation, and downloads some news articles for when you're in the tunnel.

I have a pretty good system for knowing if I need an umbrella! If I forget it at home, it always rains!

That is very cool!

Beware of the indulging in ease, avoiding labor and exertion, becoming habitually idle, lazy, inactive, as, an indolent man!

The use of manual labor is one which never grows obsolete. Manual labor is the study of the external world. Labor is God’s education. No separation from labor can be without some loss of power and of truth to the seer himself. (Emerson)

The simplicity of life, language, and habits empowers people, but luxurious lifestyle, pretentious language and effeminate habits lead to weakness and death. (John Ruskin)

It’s not by meeting your idle desires that freedom can be achieved, but, on the contrary, by freeing yourself from the desires. (Epictetus)

People are constantly looking for new entertainments and pleasures, hoping that way to quiet their worries and reach happiness. But this way they can't get satisfaction, because a man looking for his own pleasure is never satisfied: having received what he wanted, he is not settling down, but right away feels the new desires, which are not yet satisfied. (Tolstoy)

I drop photos (from whatever device) into a folder on my NAS and they get automatically sanitized of EXIF data, and resized/bordered ready for posting to the internet.

It's simply a cron & bash script on a server that monitors one NAS folder, then drops the output into a second folder where I can pick them up and use them.

It uses ImageMagick & Exiftool.

I use Philips Hue for light automation quite extensively.

- 6:30am to 7:00am during weekdays, the bedroom and living room lights fade on slowly, emulating sunrise. They switch off automatically when I leave home for work on a morning.

- 45 minutes before sunset, the living room lights fade on to full brightness over a 30 minute period. The bedroom lights do the same, but to a dimmer setting.

- At 10:30pm, the bedroom lights fade themselves to a brighter but warmer relaxing light setting, in preparation for going to bed.

- If I'm not home when 11:00pm comes around, based on the location of my phone, the lights will all switch themselves off again.

- The hallway lights turn themselves using a motion sensor on if motion is detected and the ambient light level is low enough - they come on fairly bright during evening hours, but the dimmest possible night light setting after 11pm and through the night. After a minute or two of detecting no motion, they switch themselves off again.

Probably not as exciting as the other comments here: I automated the startup routine at my work computer. It sets up VPN, clears out the HTTP proxy settings, clears the routing table to allow local network access, then starts up Visual Studio, SSMS, Outlook, Firefox, OneNote and some other auxiliary apps.

Other than that, I got consumer-style automation with IKEA Tradfri which responds via HomeKit and Apple shortcuts to me turning off my wake up alarm. And I use shortcuts to send a SMS home with my expected arrival time so my wife knows when she can start with dinner.

what do you use for this?

Very mundane tasks but it saves me some time:

* Automatically clean Windows desktop from garbage and temporary files that are older than 15 minutes

* Download and parse Ngnix web-logs every day, extract notable events

* Send myself email notifications about certain currency rates hitting certain thresholds

* Backup certain folders on schedule

* Pull data submitted by others from Google Sheets, export it into a database

All this done using EasyMorph (https://easymorph.com) - the visual data preparation and automation tool that I'm working on.

> Download and parse Ngnix web-logs every day, extract notable events

Would you mind expanding on this? Sounds interesting

Nothing extra-ordinary to be honest. The application has built-in tools for fetching weblogs over SFTP and creating business rules for parsing different types of events in the logs - e.g. downloading the installer, reading tutorial, etc. The events are then aggregated and inserted into a database that contains various historical metrics that allow me to get an idea about user engagement and trends. Visually designing the logic provides the advantage of flexibility - I can quickly experiment and fine tune the parsing algorithms and metrics without coding, as well as do ad hoc calculations in order to answer spontaneous questions.

You could check logreducer.

There’s another tool, but I can’t think of the name right now.

I have a list of questions that I like to be thinking about and have an automated system that texts me one of those questions at random during my waking hours.

I use IFTTT to do a few things like this.

Mostly motivational sort of stuff.

I like this idea of asking myself questions.

Yeah, I used to email myself my core life principles, but it felt like unsolicited advice even when it came from me. Questions on the other hand are mostly engaging especially when you don’t know what it’s going to be.

I like that idea of questions.

I do have one that says something like make a list, writer out 2 or 3 things and do them.

Indian here who travels abroad (but within Asia) for work, and we need to submit a lot of documents along with a visa application (invitation letter from a colleague in the host country; NOC from the employer; tax returns etc.) for a business/work visa. The applications are the same, the data is (almost) the same, apart from the dates. So my friend built a small tool to automate the entire process. All we do now is

1. select the country that we are visiting from a dropdown 2. enter the dates that we will be arriving on and departing at 3. provide an itinerary is possible and click a button that says "magic"

And automatically all the necessary documents are emailed to the respective stakeholders (read HR and travel desk) in a snap. Otherwise, it is usually a 2-3 day process. Ask the travel desk for documents, email overseas colleague, email HR, collect all, print, write, scan, email, get them reviewed, edit/correct/modify/facepalm and finally submit.

We are now making a web app of it and putting it online.

P.S.: I realize that I might be a bit of an oddball here because it is possible that a USA passport doesn't require such mundane stuff.

Human context switching. I'm being cheeky; I mean closing down and bringing up all relevant applications, their state (open windows, tabs, files...) and so on for working on a given task or project.

Sort of like a workspace manager for the OS. Releasing an open beta this winter.

There's a short, low-res demo that kinda illustrates the basic concept on https://cleave.app

nice, looks pretty cool


I automate my todos. In the best tradition of getting things done, I have a single list for all my todos. It is in Trello and it uses Butler for automation. I have Inbox, Today, This week, Done and Later lists. The Done one gets emptied every day at 2am. Wherever I move a task to Today I get assigned to it and the due date is set to the evening of today. It's not much, but keeps me kinda organized.

These are a wonderful invention.


I also use these.


I have made other serious efforts to automate my life and generally found that trying to catch time with homemade Rube Goldberg machines is a bit like trying to catch water with a properly engineered sieve.

After your basic appliances, I've found it's actually quite hard to exchange money for time. A great value I've found is meal prep companies. They are expensive but cheaper than a cook or cleaner and they remove many chores. Debating what to eat, menu planning, grocery shopping and actual prep cooking are greatly relieved.

I have setup a crawler acommpanied by a discord bot to notify me and my friends about new posts on each faculty class website. These posts usually include stuff like exam results, schedules and other notifications. Really helpful. Stopped us from manually checking each website when we anticipate schedules and results for each exam.

Home Assistant:

- Water garden if no rain

- Lower curtains as sun sets

- Rotate pin codes on door for abnb property when bookings end

- Log in correct user when TV turned on nielsentam box

> - Rotate pin codes on door for abnb property when bookings end

Nice! Is that a lockbox or an actual electronic lock? Would you mind saying which model?

I use automatic bill pay and some scripts to fix video player settings, that's about it for full automation.

A lot of things are semi-automated, as in I have a script / specialized software to handle them, but I still run them by hand. I have a paperweight suitable for holding down the enter key which comes in handy sometimes.

I use the repeating events feature in Google Calendar a lot, that seems to mystify people who think I put them all in by hand.

The automation people seem to fall into a few camps: smart home, enterprise data, and vacation. The last is referring to the sort of people who build a business, hire some low-paid folks to do all the work "automatically", and take a vacation. This seems like cheating to me but whatever.

Just in case you might not be aware (this has caught me out):

Google Calendar repeating events has no way to set up a "repeat every x" (day,week,month,etc..) forever. It will stop after something like 1 year with no warning.

I use it for an important daily email reminder, and did not notice it had stopped until a day or two after.

Usually, my download folder is quite messy. I wrote a rudimentary script to re-organize a folder using a simple cli. It also has a config that can be updated to account for different file types or categories.

Wrote a program that tracks Australian movie release dates for movies I'm interested in. Sends a daily email if a release date moves, or there a new movies for me to flag my interest in.

Interfaces with themoviedb.org for plot summary, cast and crew info and such. Interfaces with Google Calendar for writing entries for each movie I'm tracking.

The code is available although a bit rough. https://github.com/evmcl/movieschedule

My job is to advertise on classified ads my local business: heard of OLX? I have macros in JavaScript that does that automatically (I only have to sit and write the captcha)

1. I wrote a cron job to auto commit my code to their repos if I haven’t edited a file in 12 hours.

2. I started a while business getting news emails on more niche topics (works better than other services IMO): https://lettergram.net/

3. Automated emails sent to customers thanking them for feedback.

4. Important emails are texted to me (as determined by my classifier)

How does 1 cope with branches? Also, do you never e.g. leave a piece of code commented out for a couple of days whilst fixing a related bug in a different file?

It’s what ever active branch I’m on. I do a branch per feature / issue, then merge to master. Not really a problem.

I also have all critical stuff setup to auto deploy after tests.

I’m a one man shop, everything has to be automated or I don’t have enough time lol

I have a motion light at the bottom of the basement steps.

I also write scripts to compare OpenStreetMap to external datasets and surface interesting differences.

I use textexpander mainly for email support, it saves me ~80 hours per month of typing something I already typed in the past

You might want to checkout Alfredapp.com . I recently moved all my snippets to Alfred’s snippet/expansion system. It is way more powerful.

Report generation that need to be done through some poorly designed web frontend (even to a point where you abstract the automation process and the return of the data as an api). Have been worked at various companies over the past decade, I found that this kind of automation is the most valuable.

Whenever I turn on my work laptop it launches sites and applications I use on a day to day basis, like Jira (for our ticket), Hacker News (daily dose of information), Slack, Outlook etc. Very simple to create with python and just something I wanted to make.

I use the same laptop for job and personal work/usage, so I use an app called Workspaces (https://www.apptorium.com/workspaces) that let me setup group of apps/websites/commands that I can launch with a few clicks or using url-schemes.

For websites, I used to set Firefox start page as different websites separated by pipes, i.e. www.google.com|www.outlook.com|news.ycombinator.com

I automate my garden. In the summer I have it configured with an automatic drop. I still get to play in my garden and there's always more annual maintenance to do, but the general watering and care is easily automated with a drip timer from home depot.

Any tips on automating watering herbs in a small apartment?

Minor stuff. Any logins that require password (git/ssh), all the command line operations that I do more than one time (I start with moving them to text file and when it gets tedious - to shell scripts, saves surprising lots of time).

I had trouble getting a DMV appointment. Wrote a script that would alert when one was available. The site wasn't busy enough to warrant building out the booking. Only used the script once.

I bought a vacuum robot that cleans up daily. I saved a lot of time daily, I do just a ground good cleanup once in a week. Best investment ever.

Pre-authorized payments for bills (phone, gas, electricity etc). There are so many upsides to this:

- Zero stress

- Avoids late charges

- Improves credit rating (see previous point)

Edit: formatting

I use Alexa to turn on ambient music and lights. It removes tedious screentime in a place I consider a sanctuary-esc.

Worth the $75 rig.

I did the same with Mycroft https://mycroft.ai/ using the routine skill https://github.com/ChristopherRogers1991/mycroft_routine_ski... and integration with Home Assistant I can have it play my music set up in the morning.

I have a goal to eventually have most of my high tech stuff not involve a general screen either being a simple remote or voice so I don't get pulled down the rabbit hole.

deleting emails in gmail. It's unnecesarily complex but i can add a marker such as _delete_ in emails or use filters to get them auto-labeled, and then i have to use a google script to delete those after a month. It sounds like something that should be trivial for everyone to do, but it's not.

I use tmuxinator to auto open my terminals and start my services in separate panes in tmux

Automating menial work of Fax reading/processing in US healthcare by applying the ML.

Autohotkey to save PDF copy of a webpage along with a link in the folder currently open.

Automagically chimes and closes garage door after being left open too long

Simple stuff so far.

* I have my browser automatically launch on boot-up [linux]. Saves me a click each time, xkcd's "is it worth the time" be darned in this specific instance for me.

* I have scripts that webscrape stock//etf//mutual_fund stock prices for personal financial tracking reasons. I just want the numbers, not all the hassle of getting the information for each stock//etf//mutial_fund for each financial house every single time.

* I have a mutable script to download a large swath of a podcast's episode archive so I don't have to "click and save" hundreds of individual episodes. Modify, execute, go take a shower or make lunch, come back and modify the metadata so it works on my .mp3 player.

... stuff like this. Nothing major, but "automating the pain away" type of thing.

Note: this is ignoring the "fun programming" I do for myself as per question.

Sending server error via pushover to my phone

I built a page poller, that scrapes any web page periodically to check if some particular part of it is changed and then email it to me. Use it to have new xkcd pics delivered to my mail among other stuff.


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