Automatically Controlling a Dehumidifier with a Nest

Red Davis
Red Davis
Sep 15, 2016 · 2 min read
This is my desk.

Originally posted here.

On the desk I have a Nest. For those that don’t know, the Nest is a “smart” thermostat. Along with being able to do Thermostat things smartly, it can also detect humidity.

Wouldn’t it be cool if, when the Nest detects that the humidity has risen past a certain threshold, the dehumidifier is turned on and is turned off again when it goes below the threshold? Of course it would be…

Graphs are awesome too, so let’s throw a graph in there, showing outside temperature, inside temperature and humidity.

To get started, you’re going to need a few things:


I created two recipes; one to turn on the dehumidifer and one to…well…turn off the dehumidifer.

The recipes are simple. They use the Maker channel and the Wemo switch channel.

The Maker channel basically exposes a URL that we can trigger by sending POST or GET requests too.

Installing Recipes

Off Recipe

- Visit here
- Set Event Name to low_humidity
- Select your Dehumidifier’s Wemo Switch
- Click Add

On Recipe

- Visit here
- Set Event Name to high_humidity
- Select your Dehumidifier’s Wemo Switch
- Click Add

Maker URL’s

You need to get your Maker URL. You can get this by:
- Visiting here
- Click “How to Trigger Events”

Now copy that URL. It should look something like:{event}/with/key/XXXXXX

Next, we need to create two URL’s. One with low_humidity event and one with high_humidity. You should now have:

Deploy To Heroku

- Go to this Github repo
- Click the magic Deploy To Heroku button

Almost there, just two more things. Heroku should now ask you for some environment variables.

  • Nest email address
  • Nest password
  • IFTTT turn on URL (high_humidity event)
  • IFTTT turn off URL (low_humidity event)
  • Humidity threshold
  • Forecast IO API Key

Last but not least you need to setup the Heroku Scheduler.

When viewing your application in Heroku, there should be a “Heroku Scheduler” addon. Click it. Add a job to run rake collect_reading every 10 minutes. It should look something like this.


You should now have a webpage.

To test everything out, you can go to your application settings in Heroku and change the HUMIDITY_THRESHOLD config variable to something really low. When the scheduler next runs your dehumidifer should turn on!

Now if I could only automate emptying the dehumidifer…

I’m currently availble for iOS and macOS contracting. Contact me

Red Davis


Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store