Smart Plug Battery Auto Charge (IFTTT, Full)

by Liz Calkins

Version 1 (December 29, 2020)

Download (8 downloads)

This is a flow that lets you combine Automate, IFTTT, and IFTTT-compatible smart plug(s) to keep your device in that sweet 20-80% spot for optimal battery life. It comes in two parts:

1. The "Core Charging" required part. First get your smart plug service hooked up to IFTTT, then make two applets:

Webhook "Receive a web request" with "{eventname}on" ("plugon", for example) > Service - "Switch on"
Webhook "Receive a web request" with "{eventname}off" ("plugoff", for example) > Service - "Switch off"

Make note of both the Event Name (everything before the "on/off", "plug", for example) you used and your Maker Key from My Services > Webhooks > Documentation in the IFTTT app.

Then run just the "Core Charging" flow. It'll ask for your Maker Key and Event Name, put them both in. And that's it. No more worrying about overcharging, especially overnight. (Note that you do have to set your internet in Android to never sleep.)

2. The "Morning Top-Off" optional part.

Once you get an average idea of how long it takes your device to go from 20-80% overnight, then start this flow. It'll ask for said average in minutes, then ask around what time you usually get up. You can then leave your device plugged into your smart plug overnight and the flow will kick in to top off your phone for you right before you get up.

If you want to turn on/off more than one plug, either create scenes for all of them to go on/off and have those as the Then in your IFTTT applets, or in the case of SmartThings, create a Virtual Switch for IFTTT to turn on and off in SmartApps > three dots menu > SmartThings Labs, then also set up an Automation in the SmartThings app to have all your plugs turn on/off when the Virtual Switch does.

Note: If you want a more basic version of this idea with fewer blocks and bells and whistles, try out this flow: https://llamalab.com/automate/community/flows/38090