
How I Helped Potty-Train My Kid Using Twilio and an AWS IoT Button - gregorymichael
https://twilio.com/blog/2018/03/iot-poop-button-python-twilio-aws.html
======
spacestuff387
This is hilarious! But very practical. Buttons are a simple user interface to
say one thing. And the phone call on the other side of the system is great.
Google's Paper Signals project allow for a more complex input: voice commands.
[https://papersignals.withgoogle.com/](https://papersignals.withgoogle.com/) I
can see demand for tons of customized versions of both of these projects. The
business model is broken though. Customized hardware or software is expensive.
If you could build a cookie-cutter style app creator using emoji-style
software blocks (for those with zero programming ability) and stick with off-
the-shelf hardware from other creators (Amazon) or even Arduino kits, you
could build a business model to support semi-custom products with a mix of
hardware and software for many many uses.

~~~
gregorymichael
Didn't know about Papersignals. Looks awesome (also, for kids). Have you built
anything with it yet? What's the developer experience like?

~~~
stuntkite
I can't believe I haven't seen this. I consider myself pretty connected, I
read HN and have a robust set of reddits and githubs. They should have done
more press for this!

This is such a neat project. I want to get some paper signals going up at my
house tomorrow. I just so happen to have a jar full of 30 microservos from a
project that didn't work out and a couple of the same microcontrollers they
are using sitting here... but still, papercraft + IoT. I really like it.

I like the idea of making paper signals for my development team related to
sprints, epics, and other task countdown. I think there's something about it
that would really make a difference in work.

------
jjeaff
I love stuff like this, but I can't help but think you would save a lot of
time by just getting an $11 wireless doorbell.

[https://www.amazon.com/gp/aw/d/B00M8AQLZS/ref=mp_s_a_1_14?ie...](https://www.amazon.com/gp/aw/d/B00M8AQLZS/ref=mp_s_a_1_14?ie=UTF8&qid=1520478047&sr=8-14&pi=AC_SX236_SY340_FMwebp_QL65&keywords=wireless+doorbell)

~~~
Waterluvian
And likely more reliable. But here's the thing I learned when I got into
hacking/makering/hobbying: if you want your widget to be cheaper or more
reliable than what's out there, you're going to get discouraged fast.

There's simply no competing with what China can produce. You have to be in it
for the joy of the build.

------
Waterluvian
I just looked up the IoT button. $20, non-replaceable battery, not shipping to
Canada.

I don't have the skill or resources to assemble it in a nice form factor, but
how are there not dozens of cheap Chinese alternatives? An ESP8266 is like $5
and the rest of the parts are probably less than a dollar.

I guess it's just a bit surprising that I cannot find a cheap alternative to
buy a dozen of.

~~~
fludlight
The Amazon button probably has higher build quality than anything you can
replicate or buy for $5+1. That's probably overkill for most applications
aimed at adult users, but it's worth it here.

Is that cheap Chinese alternative toddler-survivable? Will the enclosure break
and will delicious shiny metal sharps fall out? Is it reasonable water
resistant? Is it coated in cheap lead paint that will come off when (not if)
your toddler chews on it it?

~~~
Waterluvian
Has the Amazon button been validated for any of those things? Ignoring for a
moment that we're just assuming product quality of the Amazon product, that's
not really my point. For prototyping and hacking, how am I not able to source
$5 or $10 wifi buttons with a replaceable battery?

------
zwieback
Love it, great use of technology and the poop emoji! I probably just forgot
but I don't remember our kids getting up in the middle of the night during
potty training. Of course we didn't even try until they were 3, you know what
they say: potty training a 3 yr old takes a couple days, potty training a 2 yr
old takes about a year.

~~~
pfarnsworth
That's not true at all:

"But over the last few decades, the age at which toddlers become diaper-free
has been creeping upward. In 1957, 92 percent of children were toilet-trained
by the age of 18 months, studies found. Today the figure for 2-year-olds is
just 4 percent, according to a large-scale Philadelphia study. Only 60 percent
of children have achieved mastery of the toilet by 36 months, the study found,
and 2 percent remain untrained at the age of 4 years."

[http://www.nytimes.com/1999/01/12/us/two-experts-do-
battle-o...](http://www.nytimes.com/1999/01/12/us/two-experts-do-battle-over-
potty-training.html)

The biggest difference that affects potty-training today is the time available
for parents to dedicate to it, it has nothing to do with the children.

~~~
jakobegger
I think modern diapers also make a difference. They are so good at absorbing
liquid that they barely feel wet at all.

I think toddlers might have been a lot more motivated to learn using the potty
when the alternative is sitting in wet cotton cloth.

~~~
Spare_account
My son will be three in May. We only just got around to potty training him. He
was genuinely surprised to find out that liquid comes out of his penis. The
nappy (sorry, I'm British) is so effective at absorbing liquid that he had no
idea. A week in, he makes it through the daytime without wetting himself but
number twos are catching him out frequently which is fun to deal with.

------
lifeisstillgood
I remember years ago someone on here talking about how companies needed to
pony up for 8 devs a year if they wanted 24/7 support - the phrase was "only
two people on the planet get to wake me at 2 am without paying".

this is now literally true.

I still rely on on Toddler Lungs 1.0 :-)

~~~
gregorymichael
> I still rely on on Toddler Lungs 1.0 :-)

As the proud owner of a three year old, I feel you.

------
jweather
My IoT button is stuck to the washing machine. It uses AWS Step Functions and
SNS to text me an hour after it's pushed to tell me the laundry is done.
Unnecessary? Completely. Useful? Heck yeah.

~~~
ada1981
I'd like you to find a way to get an alert when it's done without having to
press the button first.

~~~
paultopia
Motion sensor seems like the easy solution there. My washer dryer shake a lot
when they're going...

~~~
stevekemp
Yup that's what I did in my toy-project:

[https://steve.fi/Hardware/washing-machine-
alarm/](https://steve.fi/Hardware/washing-machine-alarm/)

I tried using a microphone at one point too, but that was not as reliable as
just taping a sensor to the back of the machine and alerting after movement
stopped.

------
the_unknown
Huh, the AWS IOT Button doesn't ship to Canada. And it isn't available on
Amazon.ca.

Not to be a party pooper... but, huh? Why not?

------
kevin_b_er
If author is here, your code for the pip3 install was corrupted by some form
of markdown common on blogs. pip3 will not understand —target. That's an em-
dash there instead of --.

~~~
stevekemp
Remember not to copy commands from web-pages into your terminal:

[http://thejh.net/misc/website-terminal-copy-
paste](http://thejh.net/misc/website-terminal-copy-paste)

~~~
giancarlostoro
I doubt Twilio would do something malicious, but you're still technically not
wrong, of course do you trust your browser plugins not to maliciously change
your clipboard contents? ;)

------
mlevental
this is funny and a good use of off the shelf apis but it strikes me as a rube
Goldberg solution: he's going through AWS to twilio to his cell provider.
they're in the same building. he could've hooked up any number of things
involving things like RF, Arduino, or whatever. I mean yes you don't get to
play with twilio and AWS iot but those are just apis...

~~~
whoisjuan
Probably because a call is the most reliable way of getting the alert. There
are many places in my apartment in which I can't get enough reception to
browse a webpage but still can receive and place calls.

~~~
jjeaff
I don't think that's what the poster meant.

For example, a much easier solution would be an $11 wireless doorbell

[https://www.amazon.com/gp/aw/d/B00M8AQLZS/ref=mp_s_a_1_14?ie...](https://www.amazon.com/gp/aw/d/B00M8AQLZS/ref=mp_s_a_1_14?ie=UTF8&qid=1520478047&sr=8-14&pi=AC_SX236_SY340_FMwebp_QL65&keywords=wireless+doorbell)

~~~
whoisjuan
He changed his original comment. It was more vague hence my reply.

------
hodl
The internet of shit

~~~
jrs235
Remember the 's' in IoT stands for security.

------
giancarlostoro
It's kind of cool they sell AWS IoT buttons, guess they liked what one guy was
doing with the Amazon Dash devices to keep track of their baby's sleep cycle
so he could try to sync naps with theirs. Of course someone else mentioned
it's a bit pricey and no ability to replace the battery?... What? If I had to
guess the Dash button is likely more reliable and not tied to AWS (you kinda
hook it up to a Pi Router and MITM the requests instead - or similar).

I much rather some company would make a nice kit for the Raspberry Pi Zero W
to make your own IoT button (with a nice case), at least then you know what
you're getting and you feel like you have total control over it.

------
mankash666
It's a nice article, but seems like a deliberate cook-up by the twilio PR
team. In light of the recently announced twilio-AWS partnership, the article
seems even more concocted

~~~
stuntkite
True! He probably had the child just because of the AWS kickbacks.

~~~
mankash666
That and your sycophancy here.

~~~
stuntkite
I could care less about amazon or twillio. There literally just aren't easily
accessible other buttons / SMS tools if you go look. Nothing about this is
pandering to them, I just think it's a bit reductive to say this guy made this
post as a promo.

Alternate reality version of the post:

Here's my kubernetes SIP/XMPP/WebRTC orchestration to do SMS and an arduino
button I designed with STL files so you can 3D print it yourself. Everything
is open source to toilet train your kid! I definitely used my time
appropriately!

EDIT: After re-review I realize this man could just not have a child at all.
It could definitely be contrived and potty training probably doesn't need
Amazon's weird button that orders more soap. I guess all I'm saying is that I
could see myself trying out the same thing and the solution doesn't feel that
contrived to me.

~~~
dgouldin
Author here.

I don't want to interrupt a good flame war, but I am just a normal dude who
posted a tweet about a hack project and was asked by Twilio to write a post
about it after the tweet got popular.

I prefer not to post pictures of my kids publicly out of respect for their
privacy, so I won't _prove_ to you that I'm a dad, but some cursory twitter-
stalking should provide sufficient evidence that I'm not a marketing shill for
either AWS or Twilio.

~~~
stuntkite
I dig it. I would try the same thing. Then again I’m a sycophant. :) Thanks
for the write up!

------
BooneJS
I used a cereal bowl filled with mini-M&Ms. 1 for #1, 2 for #2.

------
saagarjha
> brew install python3

Homebrew now installs Python 3 when you run "brew install python". I'm not
sure if I agree with their choice, but it makes your guide a bit simpler.

~~~
gregorymichael
> I'm not sure if I agree with their choice

Ha! Keep holding out.

Great tip. Thank you. We'll update the post.

~~~
sushisource
Might also be worth changing the setup to use a venv. That way the weird bit
about making sure python2 isn't on your path gets handled for you.

------
scandox
One chocolate button for each successful use of the potty during the first
week also works. If someone could just build me a Raspberry Pi based dispenser
which detects success (and evaluates what kind of success) and then issues the
appropriate reward I'll really appreciate that.

------
mccolin
After working in DevOps and getting nightly calls from a paging service about
down servers, turning my toddler into another down server seems worse than the
current situation ;-) That said, this is a great, fun project for an Amazon
button.

------
bmpafa
Brilliant. Though if IoT botnets were bad, I'm terrified of what IoPeePee
botnets might be capable of.

------
skjerns
why not just use a wireless door bell? cheaper and easier.

